You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LiteLLM Proxy: Vertex AI Gemini models fail for tools with empty parameters #9233
When using OpenCode with LiteLLM proxy configured for Vertex AI Gemini models (e.g., gemini-3-pro-image-preview), tool calls fail because function declarations with empty parameters don't include "type": "object" in the parameters schema. Vertex AI strictly requires this field, while OpenAI-compatible APIs typically accept schemas without it.
Error Message
litellm.ServiceUnavailableError: litellm.BadRequestError: Vertex_ai_betaException BadRequestError -
{
"error": {
"code": 400,
"message": "Unable to submit request because `todoread` functionDeclaration parameters schema should be of type OBJECT. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling",
"status": "INVALID_ARGUMENT"
}
}
Vertex AI Gemini requires:
{
name: todoread,
description: Use this tool to read your todo list,
parameters: {
type: object, // ← REQUIRED
properties: {},
required: []
}
}
All of these issues relate to tools with empty parameters not including the required "type": "object" field in the parameters schema, which causes validation failures on strict backends like Vertex AI, SGLang, Antigravity API, and others.
Feel free to ignore if your specific case differs from these issues.
Activity
github-actions commentedon Jan 18, 2026
This issue might be a duplicate of existing issues. Please check:
All of these issues relate to tools with empty parameters not including the required "type": "object" field in the parameters schema, which causes validation failures on strict backends like Vertex AI, SGLang, Antigravity API, and others.
Feel free to ignore if your specific case differs from these issues.
geoHeil commentedon Jan 19, 2026
even without the image - even when texting Hi it fails for me. Is there any workaround?
wenkangjing commentedon Jan 20, 2026
the same behaviour on my side, just "Hi", no images fails as well.
fix(google): sanitize unsupported JSON Schema keywords for Gemini API
github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.