Expand description
Context overflow detection utilities
Detects when an LLM response indicates the input exceeded the model’s context window. Supports error-based detection (most providers) and silent overflow detection (z.ai, Xiaomi MiMo).
Functions§
- is_
context_ overflow - Check if an assistant message represents a context overflow error.