Expand description
The suggest_budget MCP tool’s static model→window table (V2a-3 quick
win). No dependency on anything else in the pipeline — a pure lookup.
A static, committed model → context-window table (V2a-3 quick win).
No notion of “which model am I compiling for, and how big is its
context window” exists anywhere in the crate — an agent calling
compile_context has to guess token_budget from scratch. This module
gives it a documented starting point instead: a small table, compiled
into the binary, dated “as of” so staleness is visible at a glance.
Never a network call — extending or refreshing the table is a code
change (a new release), not a runtime lookup.
Structs§
- Suggested
Budget - Output of the
suggest_budgetMCP tool: a startingtoken_budgetfor a target model, derived from the static table alone.
Functions§
- model_
window - The context window of
model, in tokens —Nonewhen it is not in the static table (never a guess). - suggest_
token_ budget - Look up
target_model’s window and suggest a budget that reservesreserve_tokensfor the response. Never touches the network. An unknown model reports both fieldsNone— an honest “I don’t know”, never a guessed default.