mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 06:12:10 +03:00
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.
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user