mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-29 21:33:01 +08:00
- Normalize Google/Gemini invalid_request_error input token limit messages in claudeErrorDetailFromText by prepending Anthropic's canonical "prompt is too long: " prefix so Claude Code can trigger automatic compaction. - Match "input token count" followed by an optional parenthesized count and "exceeds the maximum" while avoiding double-prefixing and preserving non-matching errors. - Add regression tests covering JSON responses, committed SSE errors, parenthesized count variants, idempotency, non-400 statuses, and output-token-limit false positives. Closes: #8003