Repository navigation
Show what tools and memory take of the context; warn when Ollama's window is too small - #422
Merged
currentbits merged 2 commits intoNov 6, 2026
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fad4042135
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ndow is too small (#211) - mimir doctor and the bot page: tools offered, about how many tokens, and standing memory. Warn above ~8k tool tokens, naming the biggest tool servers. - Ollama bots: read the window from /api/ps (loaded) or the model's num_ctx, and warn when tools + memory leave too little for the conversation. - routine_create's description: 2,851 -> 1,667 characters. - A test keeps the built-in tools' definitions under 28,000 characters (26,433 now). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… gets Only this bot's memories (not ones kept for another bot), plus the household's when the chat is in one, as lib.rs builds the prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
currentbits
force-pushed
the
coder/show-how-much-of-the-context-tools-and-m-63c372
branch
from
November 6, 2026 17:51
2d19bbc to
05e0aff
Compare
currentbits
deleted the
coder/show-how-much-of-the-context-tools-and-m-63c372
branch
November 6, 2026 19:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #211.
What you see
mimir doctorand the bot page (under What it can do): "tools offered: 24, about 3.7k tokens; standing memory about 0.4k tokens".How
/api/ps(the size the model is loaded with), else the model's ownnum_ctx(/api/show). When neither says, there's no warning: Ollama picks its default from GPU memory (4k / 32k / 256k), so a guess would nag people with big GPUs.routine_create's description: 2,851 → 1,667 characters. The rare options (watch,keep,for,until,followup) are now explained in one line each.Not done
num_ctxthrough Ollama's own/api/chat. Only if the warning isn't enough./api/psfield name (context_length) is from Ollama's docs.Checks:
cargo test -p mimir-core --lib(326 passed), clippy clean,tscclean.🤖 Generated with Claude Code