Context Window Management
Overflow Strategies
When a request exceeds a provider's context window:
| Strategy | Behavior |
|---|---|
route_to_larger | Route to a compliant provider with a larger context window |
summarize | Summarize older messages to fit within the window |
truncate | Remove oldest messages (preserving system prompt) |
Configuration
context_management:
strategy: route_to_larger
max_summarization_ratio: 0.5
preserve_system_prompt: true
preserve_last_n_messages: 3
Fail-Closed Behavior
If route_to_larger is configured but no compliant provider has a sufficient context window, the request is rejected — it will not route to a non-compliant provider.