bsolo
04/23/2025, 2:08 AMjson: cannot unmarshal string into Go struct field .embed.startSpeakingPlan.smartEndpointingEnabled of type map[string]interface {}
and for calls:
{"cost":0,"type":"knowledge-base","model":{"model":"gemini-1.5-flash","provider":"google"},"promptTokens":0,"completionTokens":0} cannot be deserialized as a *api.CallCostsItemVapi Support Bot
04/23/2025, 2:10 AMsmartEndpointingEnabled field in the startSpeakingPlan configuration. The SDK is expecting this field to be a map (map[string]interface{}), but it's receiving a string value instead.
According to the [documentation I found](https://docs.vapi.ai/api-reference/calls/create), smartEndpointingEnabled should actually be a boolean value (true or false), not a map. The suggested solution is to explicitly set this field to a boolean value in your configuration:
json
"startSpeakingPlan": {
"waitSeconds": 0.8,
"smartEndpointingEnabled": false
}
or
json
"startSpeakingPlan": {
"smartEndpointingEnabled": true,
"waitSeconds": 0.8
}
It's also worth noting that smartEndpointingEnabled might only work for English transcriptions, so if you're using a different language, setting it to false might be necessary.
## Call Listing Error
For the call listing error, the issue is with deserializing the call cost information into the api.CallCostsItem struct. This might be related to recent changes in the call cost information structure.
According to the [changelog](https://docs.vapi.ai/changelog/2024/10/9), there were recent updates to call cost information, including the introduction of call.costs[type=vapi].subType to determine if a VAPI cost is normal or an overage. This change could be affecting the deserialization if the SDK hasn't been updated to handle the new structure.
## General Troubleshooting Steps
Here are some general steps to troubleshoot these unmarshaling errors:Vapi Support Bot
04/23/2025, 2:10 AMbsolo
04/23/2025, 4:05 PMVapi
04/24/2025, 12:42 PMVapi
04/24/2025, 12:43 PMembed.startSpeakingPlan.smartEndpointingEnabled and api.CallCostsItemVapi
04/24/2025, 12:44 PMbsolo
04/24/2025, 1:38 PMbsolo
04/25/2025, 12:44 PMVapi
04/25/2025, 9:00 PMbsolo
04/25/2025, 11:17 PMVapi
04/27/2025, 9:21 PMbsolo
04/28/2025, 2:11 AMbsolo
04/30/2025, 6:22 PMbsolo
04/30/2025, 6:23 PMbsolo
05/02/2025, 8:34 PMShubham Bajaj
05/05/2025, 10:45 PMbsolo
05/07/2025, 2:08 PMVapi
05/08/2025, 2:39 AMbsolo
05/10/2025, 1:32 PMShubham Bajaj
05/11/2025, 1:54 AMbsolo
05/11/2025, 5:50 PM