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: prevent mutation of original request body in Claude passthrough
Prakersh Maheshwari1bdabf43db9e
diff --git a/open-sse/handlers/chatCore.ts b/open-sse/handlers/chatCore.tsindex 666ba975b0..671c773a06 100644--- a/open-sse/handlers/chatCore.ts+++ b/open-sse/handlers/chatCore.ts@@ -53,7 +53,9 @@ export function shouldUseNativeCodexPassthrough({}): boolean {if (provider !== "codex") return false;if (sourceFormat !== FORMATS.OPENAI_RESPONSES) return false;- return String(endpointPath || "").toLowerCase().endsWith("/responses");+ return String(endpointPath || "")+ .toLowerCase()+ .endsWith("/responses");}/**@@ -191,7 +193,7 @@ export async function handleChatCore({// Claude-to-Claude passthrough: forward body completely untouched.// No translation, no field stripping, no thinking normalization.// We are just a gateway -- do not interfere with the request in any way.- translatedBody = body;+ translatedBody = { ...body };log?.debug?.("FORMAT", "claude->claude passthrough -- forwarding untouched");} else {translatedBody = { ...body };