feat: Improve Antigravity quota monitoring and fix Droid CLI compatibility

This commit is contained in:
decolua committed 2026-02-05 22:15:26 +07:00
1 parent 32aefe5a76
commit 3c65e0c5f2
6 files changed
+41 -31

No files matched your search

+2 -1
View File
@@ -470,7 +470,8 @@ export async function handleChatCore({ body, modelInfo, credentials, log, onCred
let transformStream;
// For Codex provider, always translate response from openai-responses to openai format
// This ensures clients like Cursor get the expected chat completions format
const needsCodexTranslation = (provider === 'codex' || provider === 'openai') && targetFormat === 'openai-responses';
// BUT: skip translation if client already sent in openai-responses format (like Droid CLI)
const needsCodexTranslation = (provider === 'codex' || provider === 'openai') && targetFormat === 'openai-responses' && sourceFormat !== 'openai-responses';
if (needsCodexTranslation || needsTranslation(targetFormat, sourceFormat)) {
// For Codex, translate FROM openai-responses TO openai (client's expected format)
const responseSourceFormat = needsCodexTranslation ? 'openai-responses' : targetFormat;