Google Gemini custom API key: Tool schemas truncat...
# support
d
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.
j
That’s a nasty blocker, stripping nested schemas basically makes complex tools unusable with custom Gemini keys. I can help you validate where Vapi is mutating the payload and suggest workarounds that keep schemas intact. Are you seeing this across all models or only specific Gemini versions? Also, are you sending tools via OpenAI-style or native Google format? @dunecat
c
Hi, could you please provide a call id where you experienced this issue? We would like to review the logs to identify the cause.