Skip to main content

Module overflow

Module overflow 

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