mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-09 03:01:34 -05:00
[GH-ISSUE #21470] feat: Endpoint /models doesn't work for Anthropic #122804
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @WojtiStudent on GitHub (Feb 16, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21470
Check Existing Issues
Verify Feature Scope
Problem Description
I found little bug / inconsistency - according to the docs Anthropic is compatible with Open WebUI. However getting available models from "/models" endpoint doesn't work.
I know, I can "uSe LiTeLlM", but there is a little flaw in docs / code. I also view Open WebUI as "all-in-one tool for fast RAG/chats deployment" not "good tool, but you need another 10 tools to make it useful".
Also, using "/models" endpoints allows for detecting deprecated models automatically (which is extremely useful).
Desired Solution you'd like
Prerequisites: Anthropic Completions API (https://api.anthropic.com/v1) DOESN'T require API key as Bearer, but following headers:
I have dug into your code and have found out that in
backend/open_webui/routers/openai.py(line 340, function: get_all_models_responses ) your code always uses Bearer token for requesting "/models" endpoints. So even if I add proper headers for Anthropic API in connection configuration, they won't be used in "/models" endpoint request, thus this request will always end up with 403 code response.Similar thing happens for Direct Connections in
src/lib/apis/openai/index.ts(line 211, function: getOpenAIModelsDirect).Desired solutions: just make those requests use headers that was specified in connection configuration.
Alternatives Considered
You can also leave note in docs or even do nothing. I just wanted to leave a note for maintainers and developers who struggle with similar problems.
Additional Context
No response
@Classic298 commented on GitHub (Feb 16, 2026):
https://github.com/open-webui/open-webui/issues/21230
https://github.com/open-webui/open-webui/issues/21257
The answer is: if the provider (here, Anthropic) does not have a 100% standard-conform API, then the connection verification á la models endpoint will not work. You will need to add the models manually using the whitelist feature below (similar to how is described here: https://docs.openwebui.com/tutorials/integrations/llm-providers/minimax#step-3-configure-connection-in-open-webui )
Anthropic offers an OpenAI compatible endpoint - and you can use it if configured correctly (aka add models to whitelist, and use it).
That the connection verification fails is a cosmetic issue which is mainly the fault of Anthropic for not implementing the /models API endpoint standard-conform.
I will add a short note that says that some providers, while offering an Completions API endpoint, are not 100% standard conform and some issues like this may happen. But either way: This is not an Open WebUI issue