[GH-ISSUE #16817] issue: unhandled openrouter api exception #33584

Closed
opened 2026-04-25 07:29:08 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @nitanmarcel on GitHub (Aug 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16817

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Pip Install

Open WebUI Version

v0.6.24 (latest)

Ollama Version (if applicable)

No response

Operating System

Debian

Browser (if applicable)

Any

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

The error should be displayed in the web ui when raised.

Actual Behavior

Instead, the error only appears in the logs and in the web ui it shows like it's still waiting to respond. The error is actually displayed in the UI but only after a page refresh.

Also you can notice from the timestamp that the time before it makes a request and it gets a response is very long.

Steps to Reproduce

  1. Add OpenRouter has an openai base url
  2. Select OpenAI: GPT-5 as a model
  3. Seend a simple hello message

Logs & Screenshots

2025-08-22 11:22:18.187 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1 HTTP/1.1" 200
2025-08-22 11:22:18.248 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1 HTTP/1.1" 200
2025-08-22 11:22:18.482 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1/pinned HTTP/1.1" 200
2025-08-22 11:22:18.517 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1/tags HTTP/1.1" 200
2025-08-22 11:22:21.410 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "DELETE /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1 HTTP/1.1" 200
2025-08-22 11:22:21.520 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/all/tags HTTP/1.1" 200
2025-08-22 11:22:21.626 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/8.BH1K8Av7.js HTTP/1.1" 304
2025-08-22 11:22:21.794 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /ollama/api/version HTTP/1.1" 500
2025-08-22 11:22:21.880 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/all/tags HTTP/1.1" 200
2025-08-22 11:22:21.889 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200
2025-08-22 11:22:21.911 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/models HTTP/1.1" 200
2025-08-22 11:22:21.936 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/pinned HTTP/1.1" 200
2025-08-22 11:22:21.995 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-08-22 11:22:22.008 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2025-08-22 11:22:22.089 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-08-22 11:22:22.546 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200
2025-08-22 11:22:23.960 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/models HTTP/1.1" 200
2025-08-22 11:22:31.250 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/auths/ HTTP/1.1" 200
2025-08-22 11:22:31.264 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/chats/new HTTP/1.1" 200
2025-08-22 11:22:31.282 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/auths/ HTTP/1.1" 200
2025-08-22 11:22:31.393 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2025-08-22 11:22:31.558 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-08-22 11:22:31.582 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/chats/cace12f6-8c38-4d47-8b76-ec7a6ab98ad0 HTTP/1.1" 200
2025-08-22 11:22:31.662 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2025-08-22 11:22:31.760 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-08-22 11:22:31.985 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 404



2025-08-22 11:22:43.911 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/users/user/info/update HTTP/1.1" 200
2025-08-22 11:22:43.972 | INFO     | open_webui.utils.chat:generate_direct_chat_completion:72 - generate_direct_chat_completion
2025-08-22 11:22:43.975 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/chat/completions HTTP/1.1" 200
2025-08-22 11:22:44.054 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2025-08-22 11:22:44.116 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-08-22 11:22:44.158 | INFO     | open_webui.utils.chat:generate_direct_chat_completion:109 - res: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}}
2025-08-22 11:22:44.167 | ERROR    | open_webui.tasks:cleanup_task:88 - Task exception was never retrieved
future: <Task finished name='Task-3242' coro=<chat_completion.<locals>.process_chat() done, defined at /home/debian/open-webui/lib/python3.11/site-packages/open_webui/main.py:1490> exception=HTTPException(status_code=400, detail="{'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}}")>
Traceback (most recent call last):

  File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1496, in process_chat
    response = await chat_completion_handler(request, form_data, user)
                     │                       │        │          └ UserModel(id='33fc980f-d6b7-4df6-a850-12ff9ae02ea3', name='Marcel Alexandru Nitan', email='nitan.marcel@gmail.com', username=...
                     │                       │        └ {'stream': True, 'model': 'openai/gpt-5', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'user', '...
                     │                       └ <starlette.requests.Request object at 0x7f292848a150>
                     └ <function generate_chat_completion at 0x7f2962027ce0>
  File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/utils/chat.py", line 195, in generate_chat_completion
    return await generate_direct_chat_completion(
                 └ <function generate_direct_chat_completion at 0x7f29621d2b60>
  File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/utils/chat.py", line 141, in generate_direct_chat_completion
    raise Exception(str(res))
                        └ {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/in...

Exception: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}}


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

> File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1536, in process_chat
    raise HTTPException(
          └ <class 'fastapi.exceptions.HTTPException'>

fastapi.exceptions.HTTPException: 400: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}}



2025-08-22 11:23:09.163 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/version.json HTTP/1.1" 304



2025-08-22 11:23:52.128 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/usage HTTP/1.1" 200
2025-08-22 11:23:54.040 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/3.DNus98UV.js HTTP/1.1" 200
2025-08-22 11:23:54.044 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/9.e9qUYAtM.js HTTP/1.1" 200
2025-08-22 11:23:56.312 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/26.0DnyhDJ9.js HTTP/1.1" 200
2025-08-22 11:23:56.313 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/6.C4HleKVS.js HTTP/1.1" 200
2025-08-22 11:23:57.345 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/chunks/z2zm9mqq.js HTTP/1.1" 200
2025-08-22 11:23:59.102 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /ollama/api/version HTTP/1.1" 500
2025-08-22 11:23:59.220 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/version/updates HTTP/1.1" 200
2025-08-22 11:24:09.623 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/version.json HTTP/1.1" 200
2025-08-22 11:24:30.046 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 49.13.130.29:0 - "HEAD / HTTP/1.1" 200
2025-08-22 11:25:09.627 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/version.json HTTP/1.1" 304
Image

Additional Information

No response

Originally created by @nitanmarcel on GitHub (Aug 22, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16817 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version v0.6.24 (latest) ### Ollama Version (if applicable) _No response_ ### Operating System Debian ### Browser (if applicable) Any ### 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 The error should be displayed in the web ui when raised. ### Actual Behavior Instead, the error only appears in the logs and in the web ui it shows like it's still waiting to respond. The error is actually displayed in the UI but only after a page refresh. Also you can notice from the timestamp that the time before it makes a request and it gets a response is very long. ### Steps to Reproduce 1. Add OpenRouter has an openai base url 2. Select OpenAI: GPT-5 as a model 3. Seend a simple hello message ### Logs & Screenshots ``` 2025-08-22 11:22:18.187 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1 HTTP/1.1" 200 2025-08-22 11:22:18.248 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1 HTTP/1.1" 200 2025-08-22 11:22:18.482 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1/pinned HTTP/1.1" 200 2025-08-22 11:22:18.517 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1/tags HTTP/1.1" 200 2025-08-22 11:22:21.410 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "DELETE /api/v1/chats/aea9dbde-9334-42b2-a3f1-3a0770ed4df1 HTTP/1.1" 200 2025-08-22 11:22:21.520 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/all/tags HTTP/1.1" 200 2025-08-22 11:22:21.626 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/8.BH1K8Av7.js HTTP/1.1" 304 2025-08-22 11:22:21.794 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /ollama/api/version HTTP/1.1" 500 2025-08-22 11:22:21.880 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/all/tags HTTP/1.1" 200 2025-08-22 11:22:21.889 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 2025-08-22 11:22:21.911 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/models HTTP/1.1" 200 2025-08-22 11:22:21.936 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/pinned HTTP/1.1" 200 2025-08-22 11:22:21.995 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200 2025-08-22 11:22:22.008 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2025-08-22 11:22:22.089 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200 2025-08-22 11:22:22.546 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 2025-08-22 11:22:23.960 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/models HTTP/1.1" 200 2025-08-22 11:22:31.250 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/auths/ HTTP/1.1" 200 2025-08-22 11:22:31.264 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/chats/new HTTP/1.1" 200 2025-08-22 11:22:31.282 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/auths/ HTTP/1.1" 200 2025-08-22 11:22:31.393 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2025-08-22 11:22:31.558 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200 2025-08-22 11:22:31.582 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/chats/cace12f6-8c38-4d47-8b76-ec7a6ab98ad0 HTTP/1.1" 200 2025-08-22 11:22:31.662 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2025-08-22 11:22:31.760 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200 2025-08-22 11:22:31.985 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 404 2025-08-22 11:22:43.911 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/v1/users/user/info/update HTTP/1.1" 200 2025-08-22 11:22:43.972 | INFO | open_webui.utils.chat:generate_direct_chat_completion:72 - generate_direct_chat_completion 2025-08-22 11:22:43.975 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "POST /api/chat/completions HTTP/1.1" 200 2025-08-22 11:22:44.054 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2025-08-22 11:22:44.116 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/v1/folders/ HTTP/1.1" 200 2025-08-22 11:22:44.158 | INFO | open_webui.utils.chat:generate_direct_chat_completion:109 - res: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}} 2025-08-22 11:22:44.167 | ERROR | open_webui.tasks:cleanup_task:88 - Task exception was never retrieved future: <Task finished name='Task-3242' coro=<chat_completion.<locals>.process_chat() done, defined at /home/debian/open-webui/lib/python3.11/site-packages/open_webui/main.py:1490> exception=HTTPException(status_code=400, detail="{'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}}")> Traceback (most recent call last): File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1496, in process_chat response = await chat_completion_handler(request, form_data, user) │ │ │ └ UserModel(id='33fc980f-d6b7-4df6-a850-12ff9ae02ea3', name='Marcel Alexandru Nitan', email='nitan.marcel@gmail.com', username=... │ │ └ {'stream': True, 'model': 'openai/gpt-5', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'user', '... │ └ <starlette.requests.Request object at 0x7f292848a150> └ <function generate_chat_completion at 0x7f2962027ce0> File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/utils/chat.py", line 195, in generate_chat_completion return await generate_direct_chat_completion( └ <function generate_direct_chat_completion at 0x7f29621d2b60> File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/utils/chat.py", line 141, in generate_direct_chat_completion raise Exception(str(res)) └ {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/in... Exception: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}} During handling of the above exception, another exception occurred: Traceback (most recent call last): > File "/home/debian/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1536, in process_chat raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}} 2025-08-22 11:23:09.163 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/version.json HTTP/1.1" 304 2025-08-22 11:23:52.128 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/usage HTTP/1.1" 200 2025-08-22 11:23:54.040 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/3.DNus98UV.js HTTP/1.1" 200 2025-08-22 11:23:54.044 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/9.e9qUYAtM.js HTTP/1.1" 200 2025-08-22 11:23:56.312 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/26.0DnyhDJ9.js HTTP/1.1" 200 2025-08-22 11:23:56.313 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/nodes/6.C4HleKVS.js HTTP/1.1" 200 2025-08-22 11:23:57.345 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/immutable/chunks/z2zm9mqq.js HTTP/1.1" 200 2025-08-22 11:23:59.102 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /ollama/api/version HTTP/1.1" 500 2025-08-22 11:23:59.220 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /api/version/updates HTTP/1.1" 200 2025-08-22 11:24:09.623 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/version.json HTTP/1.1" 200 2025-08-22 11:24:30.046 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 49.13.130.29:0 - "HEAD / HTTP/1.1" 200 2025-08-22 11:25:09.627 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.157.186.92:0 - "GET /_app/version.json HTTP/1.1" 304 ``` <img width="1580" height="950" alt="Image" src="https://github.com/user-attachments/assets/11897307-e969-4543-9ad2-c4fbe69ceca1" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 07:29:08 -05:00
Author
Owner

@tjbck commented on GitHub (Aug 22, 2025):

@nitanmarcel have you tried using system-level connections instead of direct connections?

<!-- gh-comment-id:3214240540 --> @tjbck commented on GitHub (Aug 22, 2025): @nitanmarcel have you tried using system-level connections instead of direct connections?
Author
Owner

@Classic298 commented on GitHub (Aug 22, 2025):

Error says right here?

fastapi.exceptions.HTTPException: 400: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}}

Openrouter GPT-5 model is not available just like that, you need to add your openai key to your openrouter account

This is not an Open WebUI error.

<!-- gh-comment-id:3214275568 --> @Classic298 commented on GitHub (Aug 22, 2025): Error says right here? fastapi.exceptions.HTTPException: 400: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}} Openrouter GPT-5 model is not available just like that, you need to add your openai key to your openrouter account This is not an Open WebUI error.
Author
Owner

@nitanmarcel commented on GitHub (Aug 22, 2025):

@nitanmarcel have you tried using system-level connections instead of direct connections?

I'm sharing the instance with someone so the OpenRouter connection is local not global. I can try the global one very fast a little later if it's needed for debugging

<!-- gh-comment-id:3214357430 --> @nitanmarcel commented on GitHub (Aug 22, 2025): > [@nitanmarcel](https://github.com/nitanmarcel) have you tried using system-level connections instead of direct connections? I'm sharing the instance with someone so the OpenRouter connection is local not global. I can try the global one very fast a little later if it's needed for debugging
Author
Owner

@nitanmarcel commented on GitHub (Aug 22, 2025):

Error says right here?

fastapi.exceptions.HTTPException: 400: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}}

Openrouter GPT-5 model is not available just like that, you need to add your openai key to your openrouter account

This is not an Open WebUI error.

I appreciate the response but the issue as described here it's that the web UI does not show the error unless I refresh the page

<!-- gh-comment-id:3214362287 --> @nitanmarcel commented on GitHub (Aug 22, 2025): > Error says right here? > > fastapi.exceptions.HTTPException: 400: {'error': {'message': 'OpenAI is requiring a key to access this model, which you can add in https://openrouter.ai/settings/integrations - you can also switch to gpt-5-chat or gpt-5-mini.', 'code': 403}} > > Openrouter GPT-5 model is not available just like that, you need to add your openai key to your openrouter account > > This is not an Open WebUI error. I appreciate the response but the issue as described here it's that the web UI does not show the error unless I refresh the page
Author
Owner

@nitanmarcel commented on GitHub (Aug 22, 2025):

@nitanmarcel have you tried using system-level connections instead of direct connections?

Same issue, the error refuses to show in the chat unless the page is refreshed

<!-- gh-comment-id:3214799308 --> @nitanmarcel commented on GitHub (Aug 22, 2025): > [@nitanmarcel](https://github.com/nitanmarcel) have you tried using system-level connections instead of direct connections? Same issue, the error refuses to show in the chat unless the page is refreshed
Author
Owner

@tjbck commented on GitHub (Aug 28, 2025):

Should be addressed, keep us updated!

<!-- gh-comment-id:3232963161 --> @tjbck commented on GitHub (Aug 28, 2025): Should be addressed, keep us updated!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#33584