[GH-ISSUE #23319] issue: Anthropic API : GET + x-api-key = authorization failure #58612

Closed
opened 2026-05-05 23:33:01 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Touffman78 on GitHub (Apr 1, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23319

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.8.12

Ollama Version (if applicable)

v0.17.8-rc4

Operating System

Linux

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When using Anthropic-compatible client with Open-WebUI API get model list should work on /v1/models URL using x-api-key header

NB : x-api-key header is well recognized when POSTing to /v1/messages

Actual Behavior

When using Anthropic-compatible client with Open-WebUI API get model list doesn't work on /v1/models URL with x-api-key header : return 401 Unauthorized

Steps to Reproduce

make a GET request on Anthropic-compatible API endpoint to get model list using x-api-key header:
curl -sS -v -H "Content-Type: apcation/json" -H "x-api-key: sk-f8....a2" 'http://127.0.0.1:3000/api/v1/models'

Logs & Screenshots

curl -sS -v -X GET -H "Content-Type: apcation/json" -H "x-api-key: sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models'
*   Trying 127.0.0.1:3000...
* Connected to 127.0.0.1 (127.0.0.1) port 3000
> GET /api/v1/models HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/8.5.0
> Accept: */*
> Content-Type: apcation/json
> x-api-key: sk-f8...a2
> 
< HTTP/1.1 401 Unauthorized
< date: Wed, 01 Apr 2026 12:02:17 GMT
< server: uvicorn
< content-length: 30
< content-type: application/json
< x-process-time: 0
< 
* Connection #0 to host 127.0.0.1 left intact
{"detail":"Not authenticated"}

But works fine with Authorization header (with the same token) :

curl -sS -v -X GET -H "Content-Type: apcation/json" -H "Authorization: Bearer sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models'
*   Trying 127.0.0.1:3000...
* Connected to 127.0.0.1 (127.0.0.1) port 3000
> GET /api/v1/models HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/8.5.0
> Accept: */*
> Content-Type: apcation/json
> Authorization: Bearer sk-f8...a2
> 
< HTTP/1.1 200 OK
< date: Wed, 01 Apr 2026 12:08:38 GMT
< server: uvicorn
< content-length: 7205
< content-type: application/json
< vary: Accept-Encoding
< x-process-time: 0
< 
{"data":[{"id":"qwen3.5:35b" ....}

Additional Information

No response

Originally created by @Touffman78 on GitHub (Apr 1, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23319 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.8.12 ### Ollama Version (if applicable) v0.17.8-rc4 ### Operating System Linux ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When using Anthropic-compatible client with Open-WebUI API get model list should work on /v1/models URL using x-api-key header *NB : x-api-key header is well recognized when POSTing to /v1/messages* ### Actual Behavior When using Anthropic-compatible client with Open-WebUI API get model list doesn't work on /v1/models URL with x-api-key header : return 401 Unauthorized ### Steps to Reproduce make a GET request on Anthropic-compatible API endpoint to get model list using x-api-key header: `curl -sS -v -H "Content-Type: apcation/json" -H "x-api-key: sk-f8....a2" 'http://127.0.0.1:3000/api/v1/models'` ### Logs & Screenshots ``` curl -sS -v -X GET -H "Content-Type: apcation/json" -H "x-api-key: sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models' * Trying 127.0.0.1:3000... * Connected to 127.0.0.1 (127.0.0.1) port 3000 > GET /api/v1/models HTTP/1.1 > Host: 127.0.0.1:3000 > User-Agent: curl/8.5.0 > Accept: */* > Content-Type: apcation/json > x-api-key: sk-f8...a2 > < HTTP/1.1 401 Unauthorized < date: Wed, 01 Apr 2026 12:02:17 GMT < server: uvicorn < content-length: 30 < content-type: application/json < x-process-time: 0 < * Connection #0 to host 127.0.0.1 left intact {"detail":"Not authenticated"} ``` But works fine with Authorization header (with the same token) : ``` curl -sS -v -X GET -H "Content-Type: apcation/json" -H "Authorization: Bearer sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models' * Trying 127.0.0.1:3000... * Connected to 127.0.0.1 (127.0.0.1) port 3000 > GET /api/v1/models HTTP/1.1 > Host: 127.0.0.1:3000 > User-Agent: curl/8.5.0 > Accept: */* > Content-Type: apcation/json > Authorization: Bearer sk-f8...a2 > < HTTP/1.1 200 OK < date: Wed, 01 Apr 2026 12:08:38 GMT < server: uvicorn < content-length: 7205 < content-type: application/json < vary: Accept-Encoding < x-process-time: 0 < {"data":[{"id":"qwen3.5:35b" ....} ``` ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-05 23:33:01 -05:00
Author
Owner

@dylanmorris1231ho-spec commented on GitHub (Apr 1, 2026):

Thanks for the detailed report and for providing clear reproduction steps.

On Wed, Apr 1, 2026, 7:13 AM Touffman78 @.***> wrote:

Touffman78 created an issue (open-webui/open-webui#23319)
https://github.com/open-webui/open-webui/issues/23319
Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and
    found no related items (your issue might already be addressed on the
    development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone
Open WebUI Version

v0.8.12
Ollama Version (if applicable)

v0.17.8-rc4
Operating System

Linux
Browser (if applicable)

No response
Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and
    environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting,
    environment variable, and command-line option that influences my setup

    (such as Docker Compose overrides, .env values, browser settings,
    authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are
    precise, sequential, and leave nothing to interpretation
    . My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords
    if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When using Anthropic-compatible client with Open-WebUI API get model list
should work on /v1/models URL using x-api-key header

NB : x-api-key header is well recognized when POSTing to /v1/messages
Actual Behavior

When using Anthropic-compatible client with Open-WebUI API get model list
doesn't work on /v1/models URL with x-api-key header : return 401
Unauthorized
Steps to Reproduce

make a GET request on Anthropic-compatible API endpoint to get model list
using x-api-key header:
curl -sS -v -H "Content-Type: apcation/json" -H "x-api-key: sk-f8....a2" '
http://127.0.0.1:3000/api/v1/models'
Logs & Screenshots

curl -sS -v -X GET -H "Content-Type: apcation/json" -H "x-api-key: sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models'

  • Trying 127.0.0.1:3000...
  • Connected to 127.0.0.1 (127.0.0.1) port 3000

GET /api/v1/models HTTP/1.1
Host: 127.0.0.1:3000
User-Agent: curl/8.5.0
Accept: /
Content-Type: apcation/json
x-api-key: sk-f8a29c1b3d4e5f6709a8b7c6d5e4f3a2

< HTTP/1.1 401 Unauthorized
< date: Wed, 01 Apr 2026 12:02:17 GMT
< server: uvicorn
< content-length: 30
< content-type: application/json
< x-process-time: 0
<

  • Connection #0 to host 127.0.0.1 left intact
    {"detail":"Not authenticated"}

But works fine with Authorization header (with the same token) :

curl -sS -v -X GET -H "Content-Type: apcation/json" -H "Authorization: Bearer sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models'

  • Trying 127.0.0.1:3000...
  • Connected to 127.0.0.1 (127.0.0.1) port 3000

GET /api/v1/models HTTP/1.1
Host: 127.0.0.1:3000
User-Agent: curl/8.5.0
Accept: /
Content-Type: apcation/json
Authorization: Bearer sk-f8a29c1b3d4e5f6709a8b7c6d5e4f3a2

< HTTP/1.1 200 OK
< date: Wed, 01 Apr 2026 12:08:38 GMT
< server: uvicorn
< content-length: 7205
< content-type: application/json
< vary: Accept-Encoding
< x-process-time: 0
<
{"data":[{"id":"qwen3.5:35b" ....}

Additional Information

No response


Reply to this email directly, view it on GitHub
https://github.com/open-webui/open-webui/issues/23319?email_source=notifications&email_token=B7VFZEEUV53WRZTGRMV2E7D4TUBU5A5CNFSL4Z3JMQ5C6L3HNF2C22DVMIXUS43TOVSS6NBRHA3DIMZZGY4DPJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/B7VFZED7PPSPHDPUOHFHTYT4TUBU5AVCNFSM6AAAAACXJDSQ3CVHI2DSMVQWIX3LMV43ASLTON2WKOZUGE4DMNBTHE3DQNY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:4170302019 --> @dylanmorris1231ho-spec commented on GitHub (Apr 1, 2026): Thanks for the detailed report and for providing clear reproduction steps. On Wed, Apr 1, 2026, 7:13 AM Touffman78 ***@***.***> wrote: > *Touffman78* created an issue (open-webui/open-webui#23319) > <https://github.com/open-webui/open-webui/issues/23319> > Check Existing Issues > > - I have searched for any existing and/or related issues. > - I have searched for any existing and/or related discussions. > - I have also searched in the CLOSED issues AND CLOSED discussions and > found no related items (your issue might already be addressed on the > development branch!). > - I am using the latest version of Open WebUI. > > Installation Method > > Git Clone > Open WebUI Version > > v0.8.12 > Ollama Version (if applicable) > > v0.17.8-rc4 > Operating System > > Linux > Browser (if applicable) > > *No response* > Confirmation > > - I have read and followed all instructions in README.md. > - I am using the latest version of *both* Open WebUI and Ollama. > - I have included the browser console logs. > - I have included the Docker container logs. > - I have *provided every relevant configuration, setting, and > environment variable used in my setup.* > - I have clearly *listed every relevant configuration, custom setting, > environment variable, and command-line option that influences my setup* > (such as Docker Compose overrides, .env values, browser settings, > authentication configurations, etc). > - I have documented *step-by-step reproduction instructions that are > precise, sequential, and leave nothing to interpretation*. My steps: > - Start with the initial platform/version/OS and dependencies used, > - Specify exact install/launch/configure commands, > - List URLs visited, user input (incl. example values/emails/passwords > if needed), > - Describe all options and toggles enabled or changed, > - Include any files or environmental changes, > - Identify the expected and actual result at each stage, > - Ensure any reasonably skilled user can follow and hit the same issue. > > Expected Behavior > > When using Anthropic-compatible client with Open-WebUI API get model list > should work on /v1/models URL using x-api-key header > > *NB : x-api-key header is well recognized when POSTing to /v1/messages* > Actual Behavior > > When using Anthropic-compatible client with Open-WebUI API get model list > doesn't work on /v1/models URL with x-api-key header : return 401 > Unauthorized > Steps to Reproduce > > make a GET request on Anthropic-compatible API endpoint to get model list > using x-api-key header: > curl -sS -v -H "Content-Type: apcation/json" -H "x-api-key: sk-f8....a2" ' > http://127.0.0.1:3000/api/v1/models' > Logs & Screenshots > > curl -sS -v -X GET -H "Content-Type: apcation/json" -H "x-api-key: sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models' > * Trying 127.0.0.1:3000... > * Connected to 127.0.0.1 (127.0.0.1) port 3000 > > GET /api/v1/models HTTP/1.1 > > Host: 127.0.0.1:3000 > > User-Agent: curl/8.5.0 > > Accept: */* > > Content-Type: apcation/json > > x-api-key: sk-f8a29c1b3d4e5f6709a8b7c6d5e4f3a2 > > > < HTTP/1.1 401 Unauthorized > < date: Wed, 01 Apr 2026 12:02:17 GMT > < server: uvicorn > < content-length: 30 > < content-type: application/json > < x-process-time: 0 > < > * Connection #0 to host 127.0.0.1 left intact > {"detail":"Not authenticated"} > > > But works fine with Authorization header (with the same token) : > > curl -sS -v -X GET -H "Content-Type: apcation/json" -H "Authorization: Bearer sk-f8...a2" 'http://127.0.0.1:3000/api/v1/models' > * Trying 127.0.0.1:3000... > * Connected to 127.0.0.1 (127.0.0.1) port 3000 > > GET /api/v1/models HTTP/1.1 > > Host: 127.0.0.1:3000 > > User-Agent: curl/8.5.0 > > Accept: */* > > Content-Type: apcation/json > > Authorization: Bearer sk-f8a29c1b3d4e5f6709a8b7c6d5e4f3a2 > > > < HTTP/1.1 200 OK > < date: Wed, 01 Apr 2026 12:08:38 GMT > < server: uvicorn > < content-length: 7205 > < content-type: application/json > < vary: Accept-Encoding > < x-process-time: 0 > < > {"data":[{"id":"qwen3.5:35b" ....} > > Additional Information > > *No response* > > — > Reply to this email directly, view it on GitHub > <https://github.com/open-webui/open-webui/issues/23319?email_source=notifications&email_token=B7VFZEEUV53WRZTGRMV2E7D4TUBU5A5CNFSL4Z3JMQ5C6L3HNF2C22DVMIXUS43TOVSS6NBRHA3DIMZZGY4DPJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/B7VFZED7PPSPHDPUOHFHTYT4TUBU5AVCNFSM6AAAAACXJDSQ3CVHI2DSMVQWIX3LMV43ASLTON2WKOZUGE4DMNBTHE3DQNY> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58612