/** * Context-overflow detection — merged from Pi's `utils/overflow.ts` (v0.80.3) * and moss's existing Chinese + inline patterns. * * Used by `isContextOverflowError` (errors.ts) and `matchContextLengthExceeded` * (error-classify.ts) to trigger compaction / escalation when the prompt * exceeds the model's context window. * * Pi contributes precise per-provider regex patterns (Anthropic, OpenAI, * Bedrock, Google, xAI, Groq, OpenRouter, Together, llama.cpp, LM Studio, * GitHub Copilot, MiniMax, Kimi, DS4, Cerebras, Mistral, z.ai, Ollama). * moss contributes Chinese patterns (上下文过长, 输入超限, tokens过多, etc.) * and a few moss-specific English patterns. */ /** * Detect context-overflow from an error message string. Tests against all * known provider patterns (Pi's 25+ regexes + moss's Chinese + moss-specific). * Case-insensitive. */ export declare function isOverflowMessage(message: string): boolean; /** Exported for testing — returns the full pattern list. */ export declare function getOverflowPatterns(): RegExp[]; //# sourceMappingURL=overflow-patterns.d.ts.map