Skip to main content

Module model_windows

Module model_windows 

Source
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§

SuggestedBudget
Output of the suggest_budget MCP tool: a starting token_budget for a target model, derived from the static table alone.

Functions§

model_window
The context window of model, in tokens — None when it is not in the static table (never a guess).
suggest_token_budget
Look up target_model’s window and suggest a budget that reserves reserve_tokens for the response. Never touches the network. An unknown model reports both fields None — an honest “I don’t know”, never a guessed default.