[GH-ISSUE #21470] feat: Endpoint /models doesn't work for Anthropic #122804

Closed
opened 2026-05-21 01:49:42 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @WojtiStudent on GitHub (Feb 16, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21470

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

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:

{
  "x-api-key": "<YOUR API KEY>",
  "anthropic-version": "2023-06-01"
}

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

Originally created by @WojtiStudent on GitHub (Feb 16, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21470 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description I found little bug / inconsistency - according to the [docs](https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible#popular-compatible-servers-and-providers) 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: ``` { "x-api-key": "<YOUR API KEY>", "anthropic-version": "2023-06-01" } ``` 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_
Author
Owner

@Classic298 commented on GitHub (Feb 16, 2026):

  1. This is essentially the same question/issue as the following:

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

  1. docs issues should not be opened here but in the docs repository.
<!-- gh-comment-id:3908333556 --> @Classic298 commented on GitHub (Feb 16, 2026): 1) This is essentially the same question/issue as the following: 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: <ins>**This is not an Open WebUI issue**</ins> 2) docs issues should not be opened here but in the docs repository.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#122804