When using a custom Google Gemini API key (added via Provider Keys), Vapi strips nested schema properties from tool definitions before sending to Google's API.
ISSUE:
- Tool configured with complete schema including nested arrays/objects
- Request sent to Google is missing required "items" and "properties" fields
- Works fine with Vapi's shared Gemini quota
- Fails with custom API key: "GenerateContentRequest.tools[0].function_declarations[0].parameters.properties[items].items: missing field"
EXPECTED in request:
{
"items": {
"type": "array",
"items": { "type": "object", ... } // Full nested schema
}
}
ACTUAL in request:
{
"items": {
"type": "array" // Missing "items" field
}
}
Strict mode = ON doesn't help.
This breaks all tools with arrays or nested objects when using custom Google API keys.