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: resolve stream defaults and codex prompt mapping (#1873, #1872)
diegosouzapwfe25fdcfdce0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d5b422fc05..4707bf82ee 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -13,6 +13,8 @@### 🐛 Bug Fixes- **fix(gemini-cli):** separate Cloud Code transport from Antigravity (#1869 — thanks @dhaern)+- **fix(codex):** map prompt field to input array for Cursor compatibility (fixes #1872)+- **fix(core):** align stream parameter default to false per strict OpenAI spec (fixes #1873)### 🏆 Release Attribution & Retroactive Creditsdiff --git a/open-sse/executors/codex.ts b/open-sse/executors/codex.tsindex e84be095b6..2e7b6f35fe 100644--- a/open-sse/executors/codex.ts+++ b/open-sse/executors/codex.ts@@ -1198,6 +1198,21 @@ export class CodexExecutor extends BaseExecutor {}): [],}));+ } else if (!body.input && typeof body.prompt === "string" && body.prompt.trim()) {+ // Issue #1872: Cursor occasionally passes the request as `prompt` instead of `messages`.+ body.input = [+ {+ type: "message",+ role: "user",+ content: [{ type: "input_text", text: body.prompt }],+ },+ ];+ } else if (!body.input && Array.isArray(body.prompt)) {+ body.input = body.prompt.map((p: any) => ({+ type: "message",+ role: "user",+ content: [{ type: "input_text", text: typeof p === "string" ? p : JSON.stringify(p) }],+ }));}// ── Cache-aware system prompt handling (both paths) ──diff --git a/open-sse/utils/aiSdkCompat.ts b/open-sse/utils/aiSdkCompat.tsindex 91d284bfc1..5f0100b08f 100644--- a/open-sse/utils/aiSdkCompat.ts+++ b/open-sse/utils/aiSdkCompat.ts@@ -22,8 +22,10 @@ export function resolveStreamFlag(bodyStream: unknown, acceptHeader: unknown): b// Explicit body value always winsif (bodyStream === true) return true;if (bodyStream === false) return false;- // No explicit stream param — fall back to Accept header heuristic- return !clientWantsJsonResponse(acceptHeader);++ // No explicit stream param — default to false per OpenAI spec+ // (Fixes #1873 - previously relied on Accept header heuristic)+ return false;}/**