issue: Incorrect API key provided (in logs) or SyntaxError: Unexpected token ':', ": OPENROUT"... is not valid JSON in UI with non-openai endpoint #4339

Closed
opened 2025-11-11 15:51:49 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @mnbf9rca on GitHub (Mar 9, 2025).

Check Existing Issues

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

Installation Method

Docker

Open WebUI Version

v0.5.20

Ollama Version (if applicable)

No response

Operating System

ubuntu 22.04

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 listed steps to reproduce the bug in detail.

Expected Behavior

Requests are sent to the OpenAPI compatible endpoint associated with the model

Actual Behavior

Although i'm able to successfully test/verify the connection, requests appear to be sent to OpenAI

Steps to Reproduce

  1. Sign up for together.ai and generate an API key (user profile)
  2. in admin settings > connections, add together.ai's endpoint - https://api.together.xyz/v1 and your API key as an OpenAI endpoint
  3. go to Models and confirm that there are models listed
  4. start a new chat. Select a model (e.g. a free one such as https://www.together.ai/models/deepseek-r1-distilled-llama-70b-free)
  5. error produced

Logs & Screenshots

Image Image Image
2025-03-09 08:21:41.154 | ERROR    | open_webui.routers.openai:get_models:508 - Unexpected error: External Error: {'message': "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'} - {}
Traceback (most recent call last):

  File "/usr/local/bin/uvicorn", line 10, in <module>
    sys.exit(main())
    │   │    └ <Command main>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ ()
           │    └ <function BaseCommand.main at 0x7ce9f0a1dda0>
           └ <Command main>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         │    │      └ <click.core.Context object at 0x7ce9f16f0390>
         │    └ <function Command.invoke at 0x7ce9f0a1e980>
         └ <Command main>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           │   │      │    │           │   └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
           │   │      │    │           └ <click.core.Context object at 0x7ce9f16f0390>
           │   │      │    └ <function main at 0x7ce9f05f2f20>
           │   │      └ <Command main>
           │   └ <function Context.invoke at 0x7ce9f0a1d300>
           └ <click.core.Context object at 0x7ce9f16f0390>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
                       │       └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
                       └ ()
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
    run(
    └ <function run at 0x7ce9f0a33e20>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
    server.run()
    │      └ <function Server.run at 0x7ce9f0891260>
    └ <uvicorn.server.Server object at 0x7ce9f095fd10>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
    return asyncio.run(self.serve(sockets=sockets))
           │       │   │    │             └ None
           │       │   │    └ <function Server.serve at 0x7ce9f0891300>
           │       │   └ <uvicorn.server.Server object at 0x7ce9f095fd10>
           │       └ <function run at 0x7ce9f0da0b80>
           └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           │      │   └ <coroutine object Server.serve at 0x7ce9f07bdd50>
           │      └ <function Runner.run at 0x7ce9f0c10720>
           └ <asyncio.runners.Runner object at 0x7ce9f05fb650>
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           │    │     │                  └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai...
           │    │     └ <cyfunction Loop.run_until_complete at 0x7ce9f0634380>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0x7ce9f05fb650>
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
          │    │   │      │                      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7ce983da3d80>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          │    └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7ce9840969d0>
          └ <open_webui.main.RedirectMiddleware object at 0x7ce9842a41d0>
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
          │                            │    │    │     │      │        └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7ce983da3d80>
          │                            │    │    │     │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │                            │    │    │     └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          │                            │    │    └ <starlette.requests.Request object at 0x7ce983d58f90>
          │                            │    └ <fastapi.routing.APIRouter object at 0x7ce9b950d150>
          │                            └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7ce9840969d0>
          └ <function wrap_app_handling_exceptions at 0x7ce9edc92f20>
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
          │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          └ <fastapi.routing.APIRouter object at 0x7ce9b950d150>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
          │    │                │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720>
          │    │                │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │    │                └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          │    └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7ce9b950d150>>
          └ <fastapi.routing.APIRouter object at 0x7ce9b950d150>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
    await route.handle(scope, receive, send)
          │     │      │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720>
          │     │      │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │     │      └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          │     └ <function Route.handle at 0x7ce9edc605e0>
          └ APIRoute(path='/openai/models/{url_idx}', name='get_models', methods=['GET'])
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
          │    │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          │    └ <function request_response.<locals>.app at 0x7ce9c00df060>
          └ APIRoute(path='/openai/models/{url_idx}', name='get_models', methods=['GET'])
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
          │                            │    │        │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720>
          │                            │    │        │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │                            │    │        └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          │                            │    └ <starlette.requests.Request object at 0x7ce983d588d0>
          │                            └ <function request_response.<locals>.app.<locals>.app at 0x7ce983da37e0>
          └ <function wrap_app_handling_exceptions at 0x7ce9edc92f20>
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
          │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da2d40>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c...
          └ <function request_response.<locals>.app.<locals>.app at 0x7ce983da37e0>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
                     │ └ <starlette.requests.Request object at 0x7ce983d588d0>
                     └ <function get_request_handler.<locals>.app at 0x7ce9c00defc0>
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                         └ <function run_endpoint_function at 0x7ce9edc623e0>
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
                 │         │      └ {'user': UserModel(id='26611c5d-40c1-4eb6-a968-68b1c02e34bf', name='r a', email='<removed>', role='admin', profile_...
                 │         └ <function get_models at 0x7ce9bb5c5300>
                 └ Dependant(path_params=[ModelField(field_info=Path(PydanticUndefined), name='url_idx', mode='validation')], query_params=[], h...

> File "/app/backend/open_webui/routers/openai.py", line 477, in get_models
    raise Exception(error_detail)
                    └ 'External Error: {\'message\': "Incorrect API key provided: \'\'. You can find your API key at https://platform.openai.com/ac...

Exception: External Error: {'message': "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}

Additional Information

No response

Originally created by @mnbf9rca on GitHub (Mar 9, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.5.20 ### Ollama Version (if applicable) _No response_ ### Operating System ubuntu 22.04 ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior Requests are sent to the OpenAPI compatible endpoint associated with the model ### Actual Behavior Although i'm able to successfully test/verify the connection, requests appear to be sent to OpenAI ### Steps to Reproduce 1. Sign up for together.ai and generate an API key (user profile) 2. in admin settings > connections, add together.ai's endpoint - `https://api.together.xyz/v1` and your API key as an OpenAI endpoint 3. go to `Models` and confirm that there are models listed 4. start a new chat. Select a model (e.g. a free one such as https://www.together.ai/models/deepseek-r1-distilled-llama-70b-free) 5. error produced ### Logs & Screenshots <img width="1073" alt="Image" src="https://github.com/user-attachments/assets/bc609e4c-01d8-4626-9bcf-f9ad95de8915" /> <img width="459" alt="Image" src="https://github.com/user-attachments/assets/19cb08d0-ab6a-4768-a305-11716cb9ef3b" /> <img width="1071" alt="Image" src="https://github.com/user-attachments/assets/e2f4aaf6-a43c-477c-b504-f6424f9d7327" /> ``` 2025-03-09 08:21:41.154 | ERROR | open_webui.routers.openai:get_models:508 - Unexpected error: External Error: {'message': "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'} - {} Traceback (most recent call last): File "/usr/local/bin/uvicorn", line 10, in <module> sys.exit(main()) │ │ └ <Command main> │ └ <built-in function exit> └ <module 'sys' (built-in)> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <function BaseCommand.main at 0x7ce9f0a1dda0> └ <Command main> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0x7ce9f16f0390> │ └ <function Command.invoke at 0x7ce9f0a1e980> └ <Command main> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... │ │ │ │ └ <click.core.Context object at 0x7ce9f16f0390> │ │ │ └ <function main at 0x7ce9f05f2f20> │ │ └ <Command main> │ └ <function Context.invoke at 0x7ce9f0a1d300> └ <click.core.Context object at 0x7ce9f16f0390> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... └ () File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main run( └ <function run at 0x7ce9f0a33e20> File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run server.run() │ └ <function Server.run at 0x7ce9f0891260> └ <uvicorn.server.Server object at 0x7ce9f095fd10> File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run return asyncio.run(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ <function Server.serve at 0x7ce9f0891300> │ │ └ <uvicorn.server.Server object at 0x7ce9f095fd10> │ └ <function run at 0x7ce9f0da0b80> └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'> File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) │ │ └ <coroutine object Server.serve at 0x7ce9f07bdd50> │ └ <function Runner.run at 0x7ce9f0c10720> └ <asyncio.runners.Runner object at 0x7ce9f05fb650> File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai... │ │ └ <cyfunction Loop.run_until_complete at 0x7ce9f0634380> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7ce9f05fb650> File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro await self.app(scope, receive_or_disconnect, send_no_error) │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7ce983da3d80> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7ce9840969d0> └ <open_webui.main.RedirectMiddleware object at 0x7ce9842a41d0> File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) │ │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7ce983da3d80> │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... │ │ │ └ <starlette.requests.Request object at 0x7ce983d58f90> │ │ └ <fastapi.routing.APIRouter object at 0x7ce9b950d150> │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7ce9840969d0> └ <function wrap_app_handling_exceptions at 0x7ce9edc92f20> File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... └ <fastapi.routing.APIRouter object at 0x7ce9b950d150> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__ await self.middleware_stack(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7ce9b950d150>> └ <fastapi.routing.APIRouter object at 0x7ce9b950d150> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app await route.handle(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... │ └ <function Route.handle at 0x7ce9edc605e0> └ APIRoute(path='/openai/models/{url_idx}', name='get_models', methods=['GET']) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... │ └ <function request_response.<locals>.app at 0x7ce9c00df060> └ APIRoute(path='/openai/models/{url_idx}', name='get_models', methods=['GET']) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) │ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da0720> │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... │ │ └ <starlette.requests.Request object at 0x7ce983d588d0> │ └ <function request_response.<locals>.app.<locals>.app at 0x7ce983da37e0> └ <function wrap_app_handling_exceptions at 0x7ce9edc92f20> File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7ce983da2d40> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7ce983da2ac0> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.0', 'server': ('172.20.0.4', 8080), 'c... └ <function request_response.<locals>.app.<locals>.app at 0x7ce983da37e0> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) │ └ <starlette.requests.Request object at 0x7ce983d588d0> └ <function get_request_handler.<locals>.app at 0x7ce9c00defc0> File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app raw_response = await run_endpoint_function( └ <function run_endpoint_function at 0x7ce9edc623e0> File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function return await dependant.call(**values) │ │ └ {'user': UserModel(id='26611c5d-40c1-4eb6-a968-68b1c02e34bf', name='r a', email='<removed>', role='admin', profile_... │ └ <function get_models at 0x7ce9bb5c5300> └ Dependant(path_params=[ModelField(field_info=Path(PydanticUndefined), name='url_idx', mode='validation')], query_params=[], h... > File "/app/backend/open_webui/routers/openai.py", line 477, in get_models raise Exception(error_detail) └ 'External Error: {\'message\': "Incorrect API key provided: \'\'. You can find your API key at https://platform.openai.com/ac... Exception: External Error: {'message': "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'} ``` ### Additional Information _No response_
GiteaMirror added the bug label 2025-11-11 15:51:49 -06:00
Author
Owner

@rgaricano commented on GitHub (Mar 9, 2025):

on user or in admin config?
https://github.com/open-webui/open-webui/discussions/11053

@rgaricano commented on GitHub (Mar 9, 2025): on user or in admin config? https://github.com/open-webui/open-webui/discussions/11053
Author
Owner

@mnbf9rca commented on GitHub (Mar 9, 2025):

admin config - but #11053 is the same error and the websocket fix worked - i didnt find it because the underlying error text isnt included. I dont know now where I found the nginx config, because the one on the site looks correct :)

@mnbf9rca commented on GitHub (Mar 9, 2025): admin config - but #11053 is the same error and the websocket fix worked - i didnt find it because the underlying error text isnt included. I dont know now where I found the nginx config, because the one on the site looks correct :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4339