Files
CLIProxyAPI/sdk/api
Luis Pater ff9339feaa fix(claude): prefix Google input token limit errors with prompt is too long
- 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
2026-11-25 11:07:25 +08:00
..