fix: resolve typecheck error and add missing hi translations

This commit is contained in:
zenobit
2026-04-01 01:17:25 +02:00
parent e2287fae58
commit e2d1b19216
2 changed files with 5 additions and 3 deletions

View File

@@ -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) : {};

View File

@@ -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": "ओम्निरूट",