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
OpenCode 2: Gemini requests fail with 400 Unknown name "exclusiveMinimum" when a submitted tool schema has an exclusive bound #36
On OpenCode 2 with v3.0.2, a request to an Antigravity Gemini model fails when any of its submitted tool declarations still has exclusiveMinimum. OpenCode 2's built-in webfetch tool is one such case. Its timeout parameter is Schema.isGreaterThan(0) (packages/core/src/tool/plugin/webfetch.ts), which becomes "exclusiveMinimum": 0. Ordinary sessions include that tool, so their Gemini requests fail.
The endpoint rejects the request:
Invalid JSON payload received. Unknown name "exclusiveMinimum" at
'request.tools[0].function_declarations[33].parameters.properties[2].value': Cannot find field.
Status: 400
Requested Model: antigravity-gemini-3.8-flash
Cause
applyGeminiTransforms (packages/core/src/transform/gemini.ts) moves numeric JSON-Schema keywords into the description only for GPT-OSS models:
For Gemini models, the numeric keywords stay in the schema. toGeminiSchema strips some unsupported keywords, but none of the numeric ones. The cleaner that does remove exclusiveMinimum, cleanJSONSchemaForAntigravity in packages/opencode/src/plugin/request-helpers.ts, runs only for Claude models.
Reproduction
Run OpenCode 2.0.28 with @cortexkit/opencode-antigravity-auth 3.0.2 as its plugin, with one Antigravity account.
Send a prompt to google/antigravity-gemini-3.8-flash in a session whose tools include the built-in webfetch.
The request fails with the 400 above.
A live retest succeeded with moveNumericConstraintsToDescription: true for all models handled by applyGeminiTransforms, including a turn that made a bash tool call. The constraint then becomes a hint appended to the description: "Optional timeout in seconds (maximum: 120) (exclusiveMinimum: 0, maximum: 120)".
Suggested fix
Move numeric constraints into descriptions for Gemini models as well as GPT-OSS. If that is too broad, at least strip exclusiveMinimum, which the endpoint rejects outright. exclusiveMaximum also passes through untouched for Gemini, and the Claude cleaner treats it as unsupported. I have not seen the endpoint reject it, but it should be handled the same way.
A unit test can call applyGeminiTransforms with model: 'gemini-3.8-flash' and a tool whose property has exclusiveMinimum, then assert that the keyword is gone from the declaration.
Activity
chrisolszewski commentedon Oct 14, 2026
Fixed in v3.0.3 by the tool-schema normalization (exclusive bounds now move into the description); confirmed on OpenCode 2. Closing.