Bug: 'exec' tool schema uses 'patternProperties' causing 400 with Google Antigravity (Gemini)
Bug Report
Version: 2026.2.17 (e7fc2eb)
Affected Tool: exec (specifically the env parameter)
Affected Provider: google-antigravity with claude-* models (e.g., google-antigravity/claude-opus-4-6-thinking)
Description
The internal schema definition for the exec tool's env parameter appears to use patternProperties. When using the google-antigravity provider (which routes to Gemini API), this causes an API error because Gemini's function_declarations does not support patternProperties.
Error Log
Invalid JSON payload received. Unknown name "patternProperties" at request.tools[0].function_declarations[3].parameters.properties[2].value
Analysis
The path tools[0].function_declarations[3] corresponds to the exec tool (4th in standard list). The path parameters.properties[2] likely corresponds to env (after background, cwd). The use of patternProperties for the environment variable map is rejected by the Gemini API.
Workaround
Switching to native Gemini models (e.g., google-antigravity/gemini-3-pro-low) avoids the issue as they likely use a different tool definition path or the proxy handles them differently.
Proposed Fix
Update the exec tool definition to use additionalProperties or explicit string/object properties instead of patternProperties for the env parameter to ensure compatibility with Gemini-based proxies.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗