forked from router-for-me/CLIProxyAPI
-
-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Description
Description
When using gemini-3.1-flash-image via the Anthropic /v1/messages endpoint, the model generates an image successfully (output_tokens > 0) but the response content field is null or empty.
Steps to Reproduce
curl -X POST http://localhost:8317/api/provider/agy/v1/messages \
-H 'Content-Type: application/json' \
-H 'x-api-key: <key>' \
-d '{
"model": "gemini-3.1-flash-image",
"max_tokens": 4096,
"messages": [{"role": "user", "content": "Draw a red circle on white background."}]
}'Actual Result
{
"content": null,
"usage": {"input_tokens": 14, "output_tokens": 1376}
}- Non-streaming:
content: nulldespiteoutput_tokens: 1376 - Streaming:
message_startsent with token count, but nocontent_block_start/content_block_deltaevents follow
Expected Result
The generated image should be returned as a base64-encoded content block, e.g.:
{
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/png",
"data": "..."
}
}
]
}Analysis
The Gemini API returns the image data successfully (tokens are consumed), but it appears the Gemini-to-Anthropic response translator drops inline image blocks since the standard Anthropic message format only defines text and tool_use content block types.
Environment
- CLIProxy version: v6.8.53-0
- Provider: Antigravity (
agy) - Model:
gemini-3.1-flash-image - Account tier: G1-ULTRA-TIER (model is registered and available in quota)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels