Call getting discconected (VAPI+Gemini-Flash 2.5)
# support
m
Details: I am creating a recruitment bot using Gemini-Flash 2.5 and VAPI. During the conversation, it keeps breaking with the error shown in the attachment. It has been two days and I still haven’t been able to resolve it. With Gemini-Flash 2.0, it works well. Call ID: 019abb65-1aa5-788e-b615-f786b2e7a538 time: 1764081022769 Response Expected: Next set of question Error: Please see attached. Console error is pasted below: could not emit {action: 'error', errorMsg: 'Meeting has ended', error: {…}, callClientId: '17640821643690.5208472250220907'}action: "error"callClientId: "17640821643690.5208472250220907"error: details: undefinedmsg: "Meeting has ended"type: "ejected"[[Prototype]]: ObjecterrorMsg: "Meeting has ended"[[Prototype]]: Object Error: Unhandled error. (undefined) at Y.emit (index.js:38:16915) at gu.emit (index.js:38:44170) at r. (index.js:38:48219) at i.emit (index.js:2:4192) at r.value (index.js:30:33247) at r.value (index.js:30:27805) at o (index.js:22:16504) https://cdn.discordapp.com/attachments/1442895592731705437/1442895593084031078/vapi.png?ex=6989507d&is=6987fefd&hm=dd6063fc53899dfec7346006379298c2a3998bea96e89c14e060b2012efecc74&
v
Suggestion: The "Meeting has ended" error is often caused by an invalid or missing assistant ID in your API call, especially when switching to a new model like Gemini-Flash 2.5. Make sure you explicitly set the correct assistantId when starting the call:
Copy code
javascript
const response = await vapi.calls.create({
  workflow: { id: "your-workflow-id" },
  assistantId: "your-assistant-id", // Ensure this is set and valid for Gemini-Flash 2.5
  to: "+1234567890"
});
Double-check that the assistantId matches the one configured for Gemini-Flash 2.5 in your Vapi Dashboard. For more details, see the [Discord discussion](https://discord.com/channels/1211482211119796234/1367883431266095104). Source: - [Discord discussion about Assistant not valid error](https://discord.com/channels/1211482211119796234/1367883431266095104)
m
I understand it. However same issue persists for the assitant (ID: c188cbb0-2a0d-489f-8444-a1461f125c60) I have created on VAPI app as well.
c
Hi Manish, thanks for sharing your details. Our team will look into it and get back to you soon with an update.
m
Hi Praveen, did your team get a chance to look into the issue?
c
Could you also provide a call id for the call where it has this issue on VAPI? The logs will help us better identify the issue
m
Kyle, the Call IDs are: 1. 019b1190-56a6-7aaf-8e65-c14b9807eea5 2. 019b118a-cb08-7ffd-8a73-9895e91d3d44
Also I am getting some error in log in every call even when we are not using flash 2.5 { "id": "log-1734", "level": 50, "time": 1765475433936, "timestamp": 1765475433936000000, "severityText": "ERROR", "severityNumber": 17, "body": "Google GenerateContent error", "attributes": { "category": "model", "callId": "019b0e7c-9297-7227-9b2b-11dd983f09ec", "orgId": "ba805a32-a2fb-48ab-a01f-0ef698420bd6", "provider": "google", "model": "gemini-2.5-flash", "error": { "message": "{\"error\":{\"code\":403,\"message\":\"Your API key was reported as leaked. Please use another API key.\",\"status\":\"PERMISSION_DENIED\"}}", "name": "ApiError", "stack": "ApiError: {\"error\":{\"code\":403,\"message\":\"Your API key was reported as leaked. Please use another API key.\",\"status\":\"PERMISSION_DENIED\"}}\n at throwErrorIfNotOK (/app/node_modules/@google/genai/dist/node/index.cjs:13653:30)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /app/node_modules/@google/genai/dist/node/index.cjs:13429:13\n at async Models.generateContent (/app/node_modules/@google/genai/dist/node/index.cjs:14697:24)\n at async googleCompletion (/app/dist/libs/core/src/thirdPartyFunctions/googleFunctions.js:348:20)\n at async modelCompletionSequenceRun (/app/dist/libs/core/src/functions/modelFunctions.js:135:28)\n at async structuredDataGet (/app/dist/libs/core/src/functions/assistantFunctions/assistant.analysisPlanFunctions.js:188:37)\n at async Promise.all (index 1)\n at async streamBundleArtifacts (/app/dist/libs/core/src/functions/liveCallFunctions/liveCallFunctions.streamBundleArtifacts.js:117:193)\n at async LiveCallPipeline.end (/app/dist/libs/core/src/components/liveCallPipeline/liveCallPipeline.js:531:27)\n at async LiveCallManager.endAsync (/app/dist/libs/core/src/components/liveCallManager.js:989:13)" }, "metrics": { "latencyMs": 486 } } }
c
We are seeing this in the logs:
Copy code
🔵 07:58:52:088 [streamBundleArtifacts] Using Google model override for post-call analysis: model = gemini-2.5-flash
For post-call analysis, our default LLM is claude 3.5 sonnet but its being overridden for gemini 2.5 flash which is using your google API key. We recommend removing your google API key or generating a new one to see if you are still getting that 403 error.
m
Kyle: did you see Call IDs for disconnecting calls or this is related with what you have mentioned above. 019b1190-56a6-7aaf-8e65-c14b9807eea5 019b118a-cb08-7ffd-8a73-9895e91d3d44 most recent case is 019b2bd7-a077-7338-a224-b10c6f491f2a. In this google key is not used.
c
From the logs it says the ended-reason is
assistant-ended-call
so its a different reason.
Copy code
🔵 10:26:37:314 Bot Said End Call Phrase But Bot Is Still Speaking. Waiting For Bot To Finish Speaking Before Ending Call...