Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
fix(combo): complete context truncation hotfix from PR #1480 (#1685)
Hernan Javier Ardila Sanchez58fb988c52e7
diff --git a/open-sse/services/combo.ts b/open-sse/services/combo.tsindex 00d31d9d3e..e74aef792e 100644--- a/open-sse/services/combo.ts+++ b/open-sse/services/combo.ts@@ -77,18 +77,18 @@ const COMBO_BAD_REQUEST_FALLBACK_PATTERNS = [/unsupported model/i,/model.*has no provider/i,// Function calling format error — model doesn't support this capability- /function\.?arguments.*(must be|should be|必须).*(json|JSON)/i,+ /function\.?arguments.*(must be|should be|\u5fc5\u987b).*(json|JSON)/i,/tool.*arguments.*invalid/i,/function.*parameter.*(invalid|format)/i,// Input length range error — model-specific context limit/range of input length/i,/input length should be/i,// Transient 400 errors from upstream — should fallback to next combo target- /服务遇到了一点小状况/i, // ModelScope/Qwen transient error- /抱歉.*?敏感内容.*?请检查/i, // ModelScope/Qwen content moderation with context- /内容.*?敏感.*?(?:无法|过滤)/i, // Content sensitivity block- /无法响应.*?请求/i, // "unable to respond to request"- /稍后重试/i, // "retry later" in Chinese+ /\u670d\u52a1\u9047\u5230\u4e86\u4e00\u70b9\u5c0f\u72b6\u51b5/i, // ModelScope/Qwen transient error+ /\u62b1\u6b49.*?\u654f\u611f\u5185\u5bb9.*?\u8bf7\u68c0\u67e5/i, // ModelScope/Qwen content moderation with context+ /\u5185\u5bb9.*?\u654f\u611f.*?(?:\u65e0\u6cd5|\u8fc7\u6ee4)/i, // Content sensitivity block+ /\u65e0\u6cd5\u54cd\u5e94.*?\u8bf7\u6c42/i, // "unable to respond to request"+ /\u7a0d\u540e\u91cd\u8bd5/i, // "retry later" in Chinese/temporary.*error/i,/transient.*error/i,/service.*unavailable/i,@@ -96,7 +96,7 @@ const COMBO_BAD_REQUEST_FALLBACK_PATTERNS = [// Rate limit errors — some providers return 400 instead of 429/\brate.?-?limit.?(?:exceeded|reached|hit)/i,/too many requests/i,- /请求过于频繁/i, // Chinese rate limit message+ /\u8bf7\u6c42\u8fc7\u4e8e\u9891\u7e41/i, // Chinese rate limit message// Tool call function name errors — model-specific, try next combo target/\bfunction'?s? name (?:can't|can not|is|has) (?:blank|empty|missing)/i,/function.*name.*(?:blank|empty|missing)/i,