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
refactor: replace `as any` casts with explicit inline types
Prakersh Maheshwari81e251943635
diff --git a/open-sse/translator/request/openai-responses.ts b/open-sse/translator/request/openai-responses.tsindex 650189a90c..7ffb756263 100644--- a/open-sse/translator/request/openai-responses.ts+++ b/open-sse/translator/request/openai-responses.ts@@ -206,7 +206,7 @@ export function openaiResponsesToOpenAIRequest(for (const m of messages) {const rec = toRecord(m);if (Array.isArray(rec.tool_calls)) {- for (const tc of rec.tool_calls as any[]) {+ for (const tc of rec.tool_calls as { id?: string }[]) {if (tc.id) allToolCallIds.add(String(tc.id));}}@@ -361,10 +361,12 @@ export function openaiToOpenAIResponsesRequest(// This happens when Claude Code compaction removes messages but leaves tool resultsconst knownCallIds = new Set(input- .filter((item: any) => item.type === "function_call" && item.call_id)- .map((item: any) => item.call_id),+ .filter(+ (item: { type?: string; call_id?: string }) => item.type === "function_call" && item.call_id+ )+ .map((item: { type?: string; call_id?: string }) => item.call_id));- result.input = input.filter((item: any) => {+ result.input = input.filter((item: { type?: string; call_id?: string }) => {if (item.type === "function_call_output" && item.call_id) {return knownCallIds.has(item.call_id);}