-
-
Notifications
You must be signed in to change notification settings - Fork 68.8k
[Bug]: Custom Provider Anthropic-Compatible 404 Error Due to Mismatch /v1 Behavior in Setup and Usage #21261
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Howdy! When setting up a custom provider and selecting "anthropic compatible", OpenClaw combines the base URL you enter with /messages. So, for something like Ollama you need to enter localhost:1234/v1, which then has /messages appended after.
BUT. Once you set that, OpenClaw then combines your base URL with /v1/messages! This causes the agent to fail. You can fix this by manually deleting the /v1 from the base URL in the config file.
Steps to reproduce
- Configure something like Ollama manually as a custom provider, selecting Anthropic compatible. The onboarding wizard will happily confirm that something like localhost:1234/v1 is a very valid and successful endpoint.
- Try using OpenClaw tui, you'll get a 404 not found error since it's hitting an invalid endpoint of /v1/v1/messages. Manually removing the /v1 from the config file will fix it.
Expected behavior
The setup script and regular usage of anthropic compatible providers should have identical behavior for calling models.
Actual behavior
Instead it appears they are different.
OpenClaw version
2026.2.15
Operating system
MacOS
Install method
No response
Logs, screenshots, and evidence
Logs from attaching a listener between Ollama and OpenClaw:
..z7Q:..POST /v1/v1/messages HTTP/1.1Impact and severity
No response
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.