Expand description
Context window management: policy-driven message truncation.
When conversation history exceeds the model’s context window budget, older messages are dropped while preserving tool-call/result pairs and a minimum number of recent messages.
Structs§
- Context
Window Policy - Context window management policy.
- Truncation
Result - Result of truncation.
Functions§
- truncate_
to_ budget - Truncate conversation history to fit within the context window budget.