feat: Improve Antigravity quota monitoring and fix Droid CLI compatibility

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

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;

View File

@@ -23,7 +23,7 @@ import { createResponsesApiTransformStream } from "../transformer/responsesTrans
export async function handleResponsesCore({ body, modelInfo, credentials, log, onCredentialsRefreshed, onRequestSuccess, onDisconnect, connectionId }) {
// Convert Responses API format to Chat Completions format
const convertedBody = convertResponsesApiFormat(body);
// Ensure stream is enabled
convertedBody.stream = true;