From afefee2357a276605707bc1432c49fc8d50bc527 Mon Sep 17 00:00:00 2001 From: AndrewDragonIV Date: Wed, 1 Apr 2026 23:40:07 +0300 Subject: [PATCH 1/2] 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 8d4d2b40475a..bd54d43bd4c8 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: { From 56f1c53084cad4f272375b6307a5f467fde526cb Mon Sep 17 00:00:00 2001 From: AndrewDragonIV Date: Wed, 1 Apr 2026 23:54:10 +0300 Subject: [PATCH 2/2] fix: use snake_case mime_type to match Gemini API convention --- open-sse/translator/request/openai-to-gemini.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-sse/translator/request/openai-to-gemini.ts b/open-sse/translator/request/openai-to-gemini.ts index bd54d43bd4c8..8ce1c795c66b 100644 --- a/open-sse/translator/request/openai-to-gemini.ts +++ b/open-sse/translator/request/openai-to-gemini.ts @@ -435,7 +435,7 @@ function wrapInCloudCodeEnvelopeForClaude(model, claudeRequest, credentials = nu } else if (block.type === "image" && block.source) { parts.push({ inlineData: { - mimeType: block.source.media_type, + mime_type: block.source.media_type, data: block.source.data, }, });