Bug Report: Google Gemini Tool Schema Deadlock via Reserved Keyword "format"
Hi team,
I'm reporting a critical bug when using google-antigravity/gemini-3-flash where the tool pipeline deadlocks due to JSON Schema validation errors on the provider side.
The Problem:
If any tool in the schema contains a property named format, the Google Gemini API rejects the entire toolset. This results in the agent becoming "blind" β it silently fails to emit tool calls, and the gateway logs show an infinite loop of:
[agent/embedded] google tool schema has unsupported keywords
The Diagnostic Workaround:
We confirmed the cause by running a global sed to rename all instances of format: to outputFormat: in the src/ directory. While this allows the schema to pass validation, this is not a viable fix. It's a destructive manual patch that breaks compatibility with tools expecting the original property names and requires manual intervention on every update.
Observed Behavior:
Even after the sed patch allows the schema to be accepted, we are seeing cases where the model still fails to successfully trigger tool calls, suggesting a deeper mismatch in how the schema is being interpreted or handled once reserved keywords are involved.
Proposed Solution:
The Gateway's Google provider should implement a transformation layer to automatically sanitize/escape reserved JSON Schema keywords (like format, default, const) before dispatching the schema to the Google API, or we should rename these properties core-wide to safer alternatives.
