saketh_1201
01/11/2026, 11:49 AMChiranjeet Mishra
01/11/2026, 11:49 AMChiranjeet Mishra
01/11/2026, 1:49 PMknowledgeBaseNames is invalid for the Gemini API (e.g., incorrect type, items schema, or missing required fields).
• Inspect any tool you added that references knowledgeBaseNames (or a knowledge base tool). Validate its function_declarations JSON Schema against Google’s GenerateContentRequest expectations (arrays vs string, item schema, enums, etc.).
• If you can, share the tool JSON (function_declarations) or paste the callId: 019bacb3-67d6-755e-ad5f-8e805a7273c6 and I’ll review the tool payload and point to the exact field to fix.
Reference: Gemini model support and credential info in our changelog — see the Gemini docs here: https://docs.vapi.ai/providers/model/geminisaketh_1201
01/11/2026, 4:28 PMChiranjeet Mishra
01/13/2026, 10:13 PMChiranjeet Mishra
01/13/2026, 10:13 PM{ "type": "query", "function": { "name": "loan_details_search" // Add this required field }, "messages": [ // your existing messages ], "knowledgeBases": [ // your existing knowledge base config ]}
Model Compatibility Check
Important: Verify that "gemini-2.5-flash" is available for Google knowledge bases. The documentation shows examples using "gemini-1.5-flash". You may need to use:
"model": "gemini-1.5-flash" // Verify this model is supported
Complete Corrected Payload
{ "type": "query", "function": { "name": "loan_details_search", "description": "Search loan terms and conditions for customer inquiries" }, "messages": [ { "type": "request-start", "content": "Let me check your loan details. Please hold for just a moment." }, { "type": "request-failed", "content": "I am sorry, I am not able to answer your question. Please ask me something else or ask me after some time." }, { "type": "request-response-delayed", "content": "This is taking a bit longer than expected. Please bear with me" } ], "knowledgeBases": [ { "name": "Loan terms and conditions", "provider": "google", "description": "This collection outlines the operational and legal guidelines for loan recovery.", "fileIds": fileIds, "model": "gemini-1.5-flash" // Verify model availability } ]}Chiranjeet Mishra
01/13/2026, 10:13 PMsaketh_1201
01/15/2026, 2:46 PMsaketh_1201
01/15/2026, 2:46 PMsaketh_1201
01/15/2026, 2:46 PMsaketh_1201
01/18/2026, 5:18 AMChiranjeet Mishra
01/19/2026, 1:59 PM019bacb3-67d6-755e-ad5f-8e805a7273c6). There was the following error log when calling google's endpoint.
🔵 10:57:00:260 Couldn't Complete Completion Request (#1, provider: google, model: gemini-2.5-flash, region: undefined, credential: true) Error: {
"status": 400,
"statusText": "Bad Request",
"message": "[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse: [400 Bad Request] * GenerateContentRequest.tools[0].function_declarations[0].parameters.properties[knowledgeBaseNames].items: missing field.\n",
"stack": "Error: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse: [400 Bad Request] * GenerateContentRequest.tools[0].function_declarations[0].parameters.properties[knowledgeBaseNames].items: missing field.\n\n at handleResponseNotOk (/app/node_modules/@google/generative-ai/dist/index.js:434:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async makeRequest (/app/node_modules/@google/generative-ai/dist/index.js:403:9)\n at async generateContentStream (/app/node_modules/@google/generative-ai/dist/index.js:862:22)\n at async GoogleRequest.request (/app/dist/libs/core/src/components/liveCallPipeline/streams/completions/requests/googleRequest.js:83:22)"
}
After some investigation regarding this issue. it seems like a known issue from google's side, I will make sure to report it to the team so that they can look into it. Till then, as a workaround, could you try using another LLM provider like ChatGPT? Please let me know whether the issue still persists even after switching to another LLM.