Skip to content

fix(smith): use Ollama runtime context window - #1274

Merged
edwin-zvs merged 1 commit into
mainfrom
fix-ollama-context-window
Aug 19, 2026
Merged

fix(smith): use Ollama runtime context window#1274
edwin-zvs merged 1 commit into
mainfrom
fix-ollama-context-window

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary

  • preload Ollama models without inference and read the effective loaded context from /api/ps
  • include Smith fixed prompt/tool overhead in pruning, probing, and auto-compaction budgets
  • defensively cap malformed TUI context percentages at 100%
  • document the Ollama runtime-window requirement in spec 0104

Verification

  • cargo test -p construct-adapter-smith (226 passed)
  • cargo test -p construct-cli modeline_context_usage_shows_full_token_text_over_a_bar
  • cargo build
  • isolated live ollama:qwen3.8 run reported context 20118/32768 (previously 20106/8000)

No recording: the behavioral proof is the emitted context event; the UI rendering itself is unchanged apart from displaying the corrected denominator and percentage.

@edwin-zvs
edwin-zvs merged commit 53274bd into main Aug 19, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the fix-ollama-context-window branch August 19, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant