Skip to content

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

Merge fix/issue-711: provider max_tokens cap + upstream sync tasks (#711)

diegosouzapw98470e855171
diff --cc open-sse/config/constants.ts
index 2058233f69,26883ec879..6fa4b71ad3
--- a/open-sse/config/constants.ts
+++ b/open-sse/config/constants.ts
@@@ -66,6 -66,15 +66,15 @@@ export const DEFAULT_MAX_TOKENS = 64000
// Minimum max tokens for tool calling (to prevent truncated arguments)
export const DEFAULT_MIN_TOKENS = 32000;
+ export const PROVIDER_MAX_TOKENS: Record<string, number> = {
- groq: 16384, // Groq strict per-model enforcement
- openai: 16384, // GPT-4/4o standard
- anthropic: 65536, // Claude models
- gemini: 65536, // Gemini Studio
++ groq: 16384, // Groq strict per-model enforcement
++ openai: 16384, // GPT-4/4o standard
++ anthropic: 65536, // Claude models
++ gemini: 65536, // Gemini Studio
+ };
+
+ export const DEFAULT_PROVIDER_MAX_TOKENS = 32000;
+
// HTTP status codes
export const HTTP_STATUS = {
BAD_REQUEST: 400,