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
AI_APICallError: GenerateContentRequest.tools[0].function_declarations[32].parameters. required[0]: property is not defined with Gemini API #3140
The error suggests a schema validation issue where a function
declaration has a required parameter but the property name is not
properly defined in the parameters.required array.
This issue might be a duplicate of existing issues. Please check:
[bug] google provider not running due to tool call schema mismatches #365: [bug] google provider not running due to tool call schema mismatches - Both issues report the same type of Gemini API error with function_declarations schema validation failing, specifically around 'parameters.required' properties not being defined
Feel free to ignore if none of these address your specific case.
I am still getting this error.
I am trying to use Docker MCP toolkit as an aggregation for all my MCPs to stop it from eating the context window.
My current open code version is 1.0.167 @rekram1-node should this be reopened?
Docker MCP Gateway Issue (Not OpenCode)
The problem might actually be in Docker Desktop's MCP Gateway itself, not OpenCode. The Gateway is responsible for translating MCP server schemas into a format that AI models can consume. If Docker's Gateway has bugs in how it generates Gemini-compatible schemas, OpenCode can't fix that—Docker would need to release an update to their MCP Toolkit.
Specific MCP Servers Have Invalid Schemas
The MCP servers you enabled (GitHub, Neon, Next.js, etc.) might have invalid tool declarations in their own source code. When the Gateway passes these through to OpenCode and then to Gemini, the validation fails. This would require fixes from the individual MCP server maintainers.
What You Can Check
To determine where the issue actually is:
Check Your OpenCode Version
Run this command to see exactly which version you're on:
bash
opencode --version
The fix from commit 0331931 should be in version 1.0.137 or later (based on the Chocolatey package dated December 17, 2025).
Check Docker MCP Toolkit Version
The issue might be in Docker's MCP Gateway, not OpenCode. Check your Docker Desktop version:
Open Docker Desktop
Go to Settings → General
Look for "MCP Toolkit" or check the Docker version
Test Without Docker MCP Gateway
Temporarily remove the MCP_DOCKER configuration from your OpenCode config to see if errors persist with other tools. If errors disappear, it confirms the Gateway is the problem.
Check Which Specific Tools Are Failing
The error indices (13, 63, 103, 114) point to specific tools. You can inspect the actual schema being sent to Gemini by enabling debug logging in OpenCode or checking the Gateway's output directly.
Most Likely Scenario
Given that you're on the latest OpenCode version and the issue persists, this is almost certainly a Docker MCP Gateway bug, not an OpenCode bug. The Gateway is translating MCP server schemas incorrectly for Gemini's strict validation requirements.
Your current workaround (disabling problematic MCP servers) is the right approach until Docker releases an updated MCP Toolkit that properly formats function declarations for Gemini's API. Other AI models like Claude are more lenient with schema validation, which is why this specifically affects Gemini users.
Activity
github-actions commentedon Oct 13, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 13, 2025
Yeah this is due to mcp server tools, we can sanitize them but they aren't compatible with gemini api out of the box
rekram1-node commentedon Dec 1, 2025
This should fix it: 0331931
in next release
jeffscottward commentedon Dec 18, 2025
I am still getting this error.
I am trying to use
Docker MCP toolkitas an aggregation for all my MCPs to stop it from eating the context window.My current open code version is
1.0.167@rekram1-node should this be reopened?
Specifically, my error says exactly this:
Since I think I'm already at the latest version, and that this shouldn't be an issue, I asked AI, and it said this.
If you're already on a version that includes commit 0331931, then the issue is likely one of these scenarios:
Possible Explanations
The Fix Doesn't Cover All MCP Servers
The commit may have fixed specific servers mentioned in issue AI_APICallError: GenerateContentRequest.tools[0].function_declarations[32].parameters. required[0]: property is not defined with Gemini API #3140, but the Docker MCP Gateway itself might be generating malformed schemas for other MCP servers (like the ones you're using). The fix in 0331931 may have been targeted at OpenCode's built-in tool declarations, not the MCP Gateway's schema translation layer.
Docker MCP Gateway Issue (Not OpenCode)
The problem might actually be in Docker Desktop's MCP Gateway itself, not OpenCode. The Gateway is responsible for translating MCP server schemas into a format that AI models can consume. If Docker's Gateway has bugs in how it generates Gemini-compatible schemas, OpenCode can't fix that—Docker would need to release an update to their MCP Toolkit.
Specific MCP Servers Have Invalid Schemas
The MCP servers you enabled (GitHub, Neon, Next.js, etc.) might have invalid tool declarations in their own source code. When the Gateway passes these through to OpenCode and then to Gemini, the validation fails. This would require fixes from the individual MCP server maintainers.
What You Can Check
To determine where the issue actually is:
Run this command to see exactly which version you're on:
bash
opencode --version
The fix from commit 0331931 should be in version 1.0.137 or later (based on the Chocolatey package dated December 17, 2025).
The issue might be in Docker's MCP Gateway, not OpenCode. Check your Docker Desktop version:
Open Docker Desktop
Go to Settings → General
Look for "MCP Toolkit" or check the Docker version
Test Without Docker MCP Gateway
Temporarily remove the MCP_DOCKER configuration from your OpenCode config to see if errors persist with other tools. If errors disappear, it confirms the Gateway is the problem.
Check Which Specific Tools Are Failing
The error indices (13, 63, 103, 114) point to specific tools. You can inspect the actual schema being sent to Gemini by enabling debug logging in OpenCode or checking the Gateway's output directly.
Most Likely Scenario
Given that you're on the latest OpenCode version and the issue persists, this is almost certainly a Docker MCP Gateway bug, not an OpenCode bug. The Gateway is translating MCP server schemas incorrectly for Gemini's strict validation requirements.
Your current workaround (disabling problematic MCP servers) is the right approach until Docker releases an updated MCP Toolkit that properly formats function declarations for Gemini's API. Other AI models like Claude are more lenient with schema validation, which is why this specifically affects Gemini users.
fix(provider): strip properties/required from non-object types in Gem…