maxDurationSeconds not accepting any value
# support
a
As outlined in another post, the default for the API for the length of the call is 10 minutes but when checking the UI it seems to be 30 (for the same assistant 634a8822-71be-4309-b07a-a1a88a68decd). When trying to define the agent in Vapi's python sdk it returns an error for the argument maxDurationSeconds: 2100. In addition, the argument backgroundDenoisingEnabled also doesn't work. Maybe related, when creating agents with the python API I can select OpenAI models that work perfectly fine. If I select an Anthropic or Google model or if I change to an Anthropic or Google model in the UI it crashed after the first time the model trie to answe (same assistant 634a8822-71be-4309-b07a-a1a88a68decd)
s
@Armando Could you share your VAPI-related code in a GitHub repository so I can take a look? Both of the mentioned parameters exist in our SDK. Also, could you share the call ID for which it's crashing when using with the dashboard?
a
some example for which it's crashing: 98d3d607-c468-4f18-b688-d2a781f2b104, f5f8106f-3515-466f-8063-63a0718a6b20, and b6f3756a-48bd-4c9b-be68-ad7108a4bf54
does this do the job as well? "transcriber": { "provider": "deepgram", "language": "multi", "model": "nova-2", "codeSwitchingEnabled": True, }, "model": { "provider": "openai", "model": "gpt-4o", "maxTokens": 250, "temperature": 0.7, "toolIds": [], # Dynamically update this "messages": [], # Will be populated with prompt from PromptBuilder # for future, we can add knowledge base URL here # "knowledgeBase": {"server": {"url": ""}}, }, "voice": { "provider": "11labs", "voiceId": "sarah", "model": "eleven_multilingual_v2", "optimizeStreamingLatency": 4, }, "maxDurationSeconds": 2100, # this throws an error "backgroundDenoisingEnabled": True, # this also throws an error "first_message": "Hello, how can I assist you today?", "first_message_mode": "assistant-speaks-first", "name": "[CompanyName]", "server_url": "...", }
s
@Armando This error message is saying there’s an issue with how one of the "property keys" in your request is named. Property keys should follow a specific naming rule: they can only include letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-), and they can’t be longer than 64 characters. Check all the property keys in tools.0.input_schema.properties and make sure they follow the pattern. The allowed pattern is: ^[a-zA-Z0-9_-]{1,64}$.
logs
"error": { "type": "error", "error": { "type": "invalid_request_error", "message": "tools.0.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_-]{1,64}$'" } }, "message": "400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_-]{1,64}$'\"}}", "stack": "Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.0.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_-]{1,64}$'\"}}\n at APIError.generate (/app/node_modules/@anthropic- ... }
@Armando for the maxDurationSeconds can you share the complete error message and code your using so I can try to reproduce on my end?