Expand description
Hardcoded context-window lookup table (fallback when API doesn’t report). Model context window lookup.
Maps model names to their known context window sizes (in tokens). Falls back to a conservative default (100K) for unknown models.
Context window size drives:
- Output caps (see
crate::output_caps) — larger windows get more tool output - Auto-compaction threshold — triggers at ~80% of context window
- Microcompact aggressiveness — scales with remaining capacity
Functions§
- context_
window_ for_ model - Look up the context window size for a model by name.