Call widget does not support voice message with overrides
Shaun Mohindra
Currently, the widget supports mode="chat" with "assistant-overrides", but does not support mode="voice" with "assistant-overrides"
Expected: the assistant should be overridden with the variable values, and the widget should function, as the "chat" mode currently does.
Actual: pressing the "start" button causes a 400: Bad Request error
Minimal example using code from https://docs.vapi.ai/chat/web-widget:
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
</head>
<body>
<script src="https://unpkg.com/@vapi-ai/client-sdk-react/dist/embed/widget.umd.js" async type="text/javascript"></script>
<vapi-widget
public-key="xxxxx"
assistant-id="xxxxx"
assistant-overrides='{
"variableValues": {
"customerName": "John Doe",
"customerTier": "Premium"
}
}'
mode="voice"
theme="light"
></vapi-widget>
</body>
</html>
This HTML results in a response of:
{
"message": [
"assistant.property assistantId should not exist",
"assistant.property assistantOverrides should not exist"
],
"error": "Bad Request",
"statusCode": 400
}
Changing mode to "chat" works as expected, so the issue is specifically with voice mode.