From afefee2357a276605707bc1432c49fc8d50bc527 Mon Sep 17 00:00:00 2001 From: AndrewDragonIV Date: Wed, 1 Apr 2026 23:40:07 +0300 Subject: [PATCH] fix(antigravity): add image passthrough for Claude models The wrapInCloudCodeEnvelopeForClaude function converts Claude message blocks to Antigravity/Gemini parts format but only handles text, tool_use, and tool_result types. Image blocks (type: 'image' with base64 source) are silently dropped, causing Claude models routed through Antigravity to never receive image content. This adds handling for image blocks, converting them to inlineData format (the same format the Gemini path already uses successfully). Tested: Claude via Antigravity now correctly receives and describes image content that was previously invisible. --- open-sse/translator/request/openai-to-gemini.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/open-sse/translator/request/openai-to-gemini.ts b/open-sse/translator/request/openai-to-gemini.ts index 8d4d2b4047..bd54d43bd4 100644 --- a/open-sse/translator/request/openai-to-gemini.ts +++ b/open-sse/translator/request/openai-to-gemini.ts @@ -432,6 +432,13 @@ function wrapInCloudCodeEnvelopeForClaude(model, claudeRequest, credentials = nu for (const block of msg.content) { if (block.type === "text") { parts.push({ text: block.text }); + } else if (block.type === "image" && block.source) { + parts.push({ + inlineData: { + mimeType: block.source.media_type, + data: block.source.data, + }, + }); } else if (block.type === "tool_use") { parts.push({ functionCall: {