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

fix: resolve typecheck error and add missing hi translations

zenobite2d1b192167c
diff --git a/open-sse/handlers/responseTranslator.ts b/open-sse/handlers/responseTranslator.ts
index ef2fe7d3df..daa687b90a 100644
--- a/open-sse/handlers/responseTranslator.ts
+++ b/open-sse/handlers/responseTranslator.ts
@@ -402,12 +402,13 @@ export function translateNonStreamingResponse(
* Helper to convert an OpenAI chat.completion JSON object to Claude format for non-streaming.
*/
function convertOpenAINonStreamingToClaude(openaiResponse: JsonRecord): JsonRecord {
- const isChoicesArray = Array.isArray(openaiResponse.choices);
+ const choices = openaiResponse.choices as unknown[] | undefined;
+ const isChoicesArray = Array.isArray(choices);
if (!isChoicesArray && openaiResponse.object !== "chat.completion") {
return openaiResponse; // If it doesn't look like OpenAI, return as-is
}
- const choice = isChoicesArray ? openaiResponse.choices[0] : null;
+ const choice = isChoicesArray ? choices[0] : null;
const choiceObj = choice ? toRecord(choice) : {};
const messageObj = choiceObj.message ? toRecord(choiceObj.message) : {};
diff --git a/src/i18n/messages/hi.json b/src/i18n/messages/hi.json
index 588d0e0a2d..8a0a45e5ec 100644
--- a/src/i18n/messages/hi.json
+++ b/src/i18n/messages/hi.json
@@ -2512,7 +2512,8 @@
"waitingForIFlowAuthorization": "Waiting for iFlow authorization...",
"waitingForAntigravityAuthorization": "Waiting for Antigravity authorization...",
"Authorization": "Authorization",
- "exchangingCodeForTokens": "Exchanging code for tokens..."
+ "exchangingCodeForTokens": "Exchanging code for tokens...",
+ "waitingForQoderAuthorization": "Waiting for Qoder authorization..."
},
"landing": {
"brandName": "ओम्निरूट",