flat-fuchsia
flat-fuchsia5h ago

Bug report: Custom LLM appends /chat/completions to whatever URL you specify

When using custom LLM implementation, whatever URL you provide will end up as URL + "/chat/completions". VAPI should not alter this URL you should use the URL as is without modification.
2 Replies
Vapi Support Bot
Current Behavior:
Vapi automatically appends /chat/completions to the custom LLM URL you provide, as shown in the official documentation's Flask example:
@app.route("/chat/completions", methods=["POST"])
def chat_completions():
# Handle request
@app.route("/chat/completions", methods=["POST"])
def chat_completions():
# Handle request
At this time, there is no documented way to prevent this URL modification—Vapi expects your server to handle requests at the /chat/completions path.
For more details, see the Vapi Custom LLM integration guide. Source: - Vapi Custom LLM: Using Your Server
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
flat-fuchsia
flat-fuchsiaOP5h ago
This is bad design On assistant request, we construct a stateful URL to include chatId, agent type, etc. So VAPI urls always look like https://url.com/vapi/llm?chatId=1234&agent=chat/chat/completions. Your code is NOT acknowledging url parameters it simply appends the /chat/completions onto the end of the url creating a bad URL.

Did you find this page helpful?