[GH-ISSUE #11615] issue: error with integrating Azure OpenAI Dall E3 by LiteLLM #103292

Closed
opened 2026-05-18 00:42:21 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @highyield3011 on GitHub (Mar 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11615

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)

Version 134.0.6998.88

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

The image should be generated

Actual Behavior

Error happened using image generation function

Steps to Reproduce

  1. Start a new chat
  2. Check "Image" generation
  3. Send a message
  4. Error occurred

Logs & Screenshots

Image

2025-03-13 02:41:11.445 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /openai/models/3 HTTP/1.1" 500 - {}
2025-03-13 02:41:16.896 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "POST /openai/verify HTTP/1.1" 200 - {}
2025-03-13 02:41:31.607 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54596 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {}
2025-03-13 02:41:31.610 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54598 - "GET /api/v1/chats/63e5142e-aed8-4472-b554-dc08d2105cc2 HTTP/1.0" 200 - {}
2025-03-13 02:41:31.623 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54604 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {}
2025-03-13 02:41:31.647 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54612 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {}
2025-03-13 02:42:40.928 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44688 - "GET /api/config HTTP/1.0" 200 - {}
2025-03-13 02:42:40.952 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /manifest.json HTTP/1.1" 200 - {}
2025-03-13 02:42:40.980 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44706 - "GET /api/v1/auths/ HTTP/1.0" 200 - {}
2025-03-13 02:42:41.015 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44722 - "GET /api/config HTTP/1.0" 200 - {}
2025-03-13 02:42:41.040 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44724 - "GET /api/changelog HTTP/1.0" 200 - {}
2025-03-13 02:42:41.047 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44728 - "GET /api/v1/users/user/settings HTTP/1.0" 200 - {}
2025-03-13 02:42:41.063 | INFO | open_webui.routers.openai:get_all_models:379 - get_all_models() - {}
2025-03-13 02:42:41.203 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44744 - "GET /api/models HTTP/1.0" 200 - {}
2025-03-13 02:42:41.219 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44758 - "GET /api/v1/configs/banners HTTP/1.0" 200 - {}
2025-03-13 02:42:41.233 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44774 - "GET /api/v1/tools/ HTTP/1.0" 200 - {}
2025-03-13 02:42:41.264 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44806 - "GET /api/v1/auths/admin/config HTTP/1.0" 200 - {}
2025-03-13 02:42:41.265 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44800 - "GET /api/v1/channels/ HTTP/1.0" 200 - {}
2025-03-13 02:42:41.271 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44818 - "GET /api/webhook HTTP/1.0" 200 - {}
2025-03-13 02:42:41.279 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44832 - "GET /api/v1/auths/admin/config/ldap/server HTTP/1.0" 200 - {}
2025-03-13 02:42:41.283 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /static/favicon.png HTTP/1.1" 304 - {}
2025-03-13 02:42:41.299 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44854 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {}
2025-03-13 02:42:41.306 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44866 - "GET /api/v1/auths/admin/config/ldap HTTP/1.0" 200 - {}
2025-03-13 02:42:41.327 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44882 - "GET /api/v1/chats/pinned HTTP/1.0" 200 - {}
2025-03-13 02:42:41.328 | INFO | open_webui.config:save:237 - Saving 'ENABLE_LDAP' to the database - {}
2025-03-13 02:42:41.396 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44898 - "POST /api/v1/auths/admin/config/ldap HTTP/1.0" 200 - {}
2025-03-13 02:42:41.414 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44910 - "GET /api/v1/folders/ HTTP/1.0" 200 - {}
2025-03-13 02:42:41.416 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44904 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {}
2025-03-13 02:42:41.818 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44784 - "GET /api/version/updates HTTP/1.0" 200 - {}
2025-03-13 02:42:42.053 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44912 - "GET /api/version/updates HTTP/1.0" 200 - {}
2025-03-13 02:42:43.955 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34336 - "GET /api/v1/chats/63e5142e-aed8-4472-b554-dc08d2105cc2 HTTP/1.0" 200 - {}
2025-03-13 02:42:43.992 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34340 - "GET /api/v1/chats/421e3de1-cc92-4e94-8ce6-70c73f26549d HTTP/1.0" 200 - {}
2025-03-13 02:42:44.004 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34352 - "GET /api/v1/chats/12f2dfdb-7b76-4da0-872f-3f78043da7fd HTTP/1.0" 200 - {}
2025-03-13 02:42:44.017 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34366 - "GET /api/v1/chats/fa8d7639-c61e-4958-ac0e-1e09ff135d64 HTTP/1.0" 200 - {}
2025-03-13 02:42:44.054 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34372 - "GET /api/v1/chats/60c88240-086e-4960-8a60-ad262b26ca50 HTTP/1.0" 200 - {}
2025-03-13 02:42:44.190 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34384 - "GET /api/v1/chats/b6fb02b6-fc91-4842-8fdb-ecb510ba7d78 HTTP/1.0" 200 - {}
2025-03-13 02:42:44.238 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34388 - "GET /api/v1/chats/a91735c8-2635-4f0d-9c13-a50a0fd832f9 HTTP/1.0" 200 - {}
2025-03-13 02:42:44.303 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34400 - "GET /api/v1/chats/fe7a07b3-ee90-4cbf-ac98-5a97633f590c HTTP/1.0" 200 - {}
2025-03-13 02:42:46.862 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /ollama/api/version HTTP/1.1" 200 - {}
2025-03-13 02:42:47.093 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34410 - "GET /api/version/updates HTTP/1.0" 200 - {}
2025-03-13 02:43:25.170 | ERROR | open_webui.routers.openai:get_models:503 - Client error: Cannot connect to host api.x.ai:443 ssl:default [Connect call failed ('104.244.46.186', 443)] - {}
Traceback (most recent call last):

File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1115, in _wrap_create_connection
sock = await aiohappyeyeballs.start_connection(
│ └ <function start_connection at 0x7fab001bf600>
└ <module 'aiohappyeyeballs' from '/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/__init__.py'>
File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 115, in start_connection
raise first_exception
└ TimeoutError(110, "Connect call failed ('104.244.46.186', 443)")
File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 72, in start_connection
sock = await _connect_sock(
└ <function _connect_sock at 0x7fab001d1d00>
File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 197, in _connect_sock
await loop.sock_connect(sock, address)
│ │ │ └ ('104.244.46.186', 443)
│ │ └ <socket.socket [closed] fd=-1, family=2, type=1, proto=6>
│ └ <cyfunction Loop.sock_connect at 0x7fab02331490>
└ <uvloop.Loop running=True closed=False debug=False>
File "uvloop/loop.pyx", line 2633, in sock_connect
await fut
File "uvloop/loop.pyx", line 1108, in uvloop.loop.Loop._sock_connect_cb
raise OSError(err, 'Connect call failed %s' % (address,))

TimeoutError: [Errno 110] Connect call failed ('104.244.46.186', 443)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/usr/local/bin/uvicorn", line 10, in
sys.exit(main())
│ │ └
│ └
└ <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 0x7fab0270dda0>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x7fab033f03d0>
│ └ <function Command.invoke at 0x7fab0270e980>
└
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 0x7fab033f03d0>
│ │ │ └ <function main at 0x7fab022eef20>
│ │ └
│ └ <function Context.invoke at 0x7fab0270d300>
└ <click.core.Context object at 0x7fab033f03d0>
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 0x7fab0271be20>
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
server.run()
│ └ <function Server.run at 0x7fab02575260>
└ <uvicorn.server.Server object at 0x7fab0271c310>
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 0x7fab02575300>
│ │ └ <uvicorn.server.Server object at 0x7fab0271c310>
│ └ <function run at 0x7fab02a9cb80>
└ <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 0x7fab024b9d50>
│ └ <function Runner.run at 0x7fab028e8720>
└ <asyncio.runners.Runner object at 0x7fab022f7a90>
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 0x7fab02330380>
│ └ <uvloop.Loop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x7fab022f7a90>
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..call_next..send_no_error at 0x7faaa9307880>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7faaaa72b850>
└ <open_webui.main.RedirectMiddleware object at 0x7faaaab097d0>
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..call_next..send_no_error at 0x7faaa9307880>
│ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
│ │ │ └ <starlette.requests.Request object at 0x7faaa93417d0>
│ │ └ <fastapi.routing.APIRouter object at 0x7faaabb15bd0>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7faaaa72b850>
└ <function wrap_app_handling_exceptions at 0x7faaff936f20>
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..wrapped_app..sender at 0x7faaa97d9260>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
└ <fastapi.routing.APIRouter object at 0x7faaabb15bd0>
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..wrapped_app..sender at 0x7faaa97d9260>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
│ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7faaabb15bd0>>
└ <fastapi.routing.APIRouter object at 0x7faaabb15bd0>
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..wrapped_app..sender at 0x7faaa97d9260>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
│ └ <function Route.handle at 0x7faaff9945e0>
└ 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..wrapped_app..sender at 0x7faaa97d9260>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
│ └ <function request_response..app at 0x7faaab303240>
└ 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..wrapped_app..sender at 0x7faaa97d9260>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
│ │ └ <starlette.requests.Request object at 0x7faaa9340c10>
│ └ <function request_response..app..app at 0x7faaa97da340>
└ <function wrap_app_handling_exceptions at 0x7faaff936f20>
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..wrapped_app..sender at 0x7faaa97db560>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7faaa93049a0>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
└ <function request_response..app..app at 0x7faaa97da340>
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x7faaa9340c10>
└ <function get_request_handler..app at 0x7faaab3016c0>
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 0x7faaff9963e0>
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='150d5a63-3343-4705-b7d9-16cb1d8edf65', name='admin', email='admin@zailab.com', role='admin', profile_i...
│ └ <function get_models at 0x7faaaf358360>
└ 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 454, in get_models
async with session.get(
│ └ <function ClientSession.get at 0x7fab00242200>
└ <aiohttp.client.ClientSession object at 0x7faaa93fd150>

File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1425, in aenter
self._resp: _RetType = await self._coro
│ │ │ └ <member '_coro' of '_BaseRequestContextManager' objects>
│ │ └ <aiohttp.client._BaseRequestContextManager object at 0x7faaa8bdb0a0>
│ └ <member '_resp' of '_BaseRequestContextManager' objects>
└ <aiohttp.client._BaseRequestContextManager object at 0x7faaa8bdb0a0>
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 703, in _request
conn = await self._connector.connect(
│ │ └ <function BaseConnector.connect at 0x7fab001e89a0>
│ └ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50>
└ <aiohttp.client.ClientSession object at 0x7faaa93fd150>
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 548, in connect
proto = await self._create_connection(req, traces, timeout)
│ │ │ │ └ ClientTimeout(total=None, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5)
│ │ │ └ []
│ │ └ <aiohttp.client_reqrep.ClientRequest object at 0x7faaa9362190>
│ └ <function TCPConnector._create_connection at 0x7fab001e96c0>
└ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50>
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1056, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
│ │ │ │ └ ClientTimeout(total=None, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5)
│ │ │ └ []
│ │ └ <aiohttp.client_reqrep.ClientRequest object at 0x7faaa9362190>
│ └ <function TCPConnector._create_direct_connection at 0x7fab001e9e40>
└ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50>
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
raise last_exc
└ ClientConnectorError(ConnectionKey(host='api.x.ai', port=443, is_ssl=True, ssl=True, proxy=None, proxy_auth=None, proxy_heade...
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
│ └ <function TCPConnector._wrap_create_connection at 0x7fab001e98a0>
└ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50>
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
│ │ └ <property object at 0x7fab001b1850>
│ └ <aiohttp.client_reqrep.ClientRequest object at 0x7faaa9362190>
└ <class 'aiohttp.client_exceptions.ClientConnectorError'>

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.x.ai:443 ssl:default [Connect call failed ('104.244.46.186', 443)]
2025-03-13 02:43:25.175 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /openai/models/4 HTTP/1.1" 500 - {}

Additional Information

I confirmed that LiteLLM proxy is successfully implemented. See below testing in Postman:

Image

Below are snapshots of configuration in Open WebUI admin panel:

Image

Image

Originally created by @highyield3011 on GitHub (Mar 13, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11615 ### 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) Version 134.0.6998.88 ### 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 The image should be generated ### Actual Behavior Error happened using image generation function ### Steps to Reproduce 1. Start a new chat 2. Check "Image" generation 3. Send a message 4. Error occurred ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/c30a3931-e864-41a2-b225-f33ae49e80c8) 2025-03-13 02:41:11.445 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /openai/models/3 HTTP/1.1" 500 - {} 2025-03-13 02:41:16.896 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "POST /openai/verify HTTP/1.1" 200 - {} 2025-03-13 02:41:31.607 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54596 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {} 2025-03-13 02:41:31.610 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54598 - "GET /api/v1/chats/63e5142e-aed8-4472-b554-dc08d2105cc2 HTTP/1.0" 200 - {} 2025-03-13 02:41:31.623 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54604 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {} 2025-03-13 02:41:31.647 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:54612 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {} 2025-03-13 02:42:40.928 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44688 - "GET /api/config HTTP/1.0" 200 - {} 2025-03-13 02:42:40.952 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /manifest.json HTTP/1.1" 200 - {} 2025-03-13 02:42:40.980 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44706 - "GET /api/v1/auths/ HTTP/1.0" 200 - {} 2025-03-13 02:42:41.015 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44722 - "GET /api/config HTTP/1.0" 200 - {} 2025-03-13 02:42:41.040 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44724 - "GET /api/changelog HTTP/1.0" 200 - {} 2025-03-13 02:42:41.047 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44728 - "GET /api/v1/users/user/settings HTTP/1.0" 200 - {} 2025-03-13 02:42:41.063 | INFO | open_webui.routers.openai:get_all_models:379 - get_all_models() - {} 2025-03-13 02:42:41.203 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44744 - "GET /api/models HTTP/1.0" 200 - {} 2025-03-13 02:42:41.219 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44758 - "GET /api/v1/configs/banners HTTP/1.0" 200 - {} 2025-03-13 02:42:41.233 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44774 - "GET /api/v1/tools/ HTTP/1.0" 200 - {} 2025-03-13 02:42:41.264 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44806 - "GET /api/v1/auths/admin/config HTTP/1.0" 200 - {} 2025-03-13 02:42:41.265 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44800 - "GET /api/v1/channels/ HTTP/1.0" 200 - {} 2025-03-13 02:42:41.271 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44818 - "GET /api/webhook HTTP/1.0" 200 - {} 2025-03-13 02:42:41.279 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44832 - "GET /api/v1/auths/admin/config/ldap/server HTTP/1.0" 200 - {} 2025-03-13 02:42:41.283 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /static/favicon.png HTTP/1.1" 304 - {} 2025-03-13 02:42:41.299 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44854 - "GET /api/v1/chats/all/tags HTTP/1.0" 200 - {} 2025-03-13 02:42:41.306 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44866 - "GET /api/v1/auths/admin/config/ldap HTTP/1.0" 200 - {} 2025-03-13 02:42:41.327 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44882 - "GET /api/v1/chats/pinned HTTP/1.0" 200 - {} 2025-03-13 02:42:41.328 | INFO | open_webui.config:save:237 - Saving 'ENABLE_LDAP' to the database - {} 2025-03-13 02:42:41.396 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44898 - "POST /api/v1/auths/admin/config/ldap HTTP/1.0" 200 - {} 2025-03-13 02:42:41.414 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44910 - "GET /api/v1/folders/ HTTP/1.0" 200 - {} 2025-03-13 02:42:41.416 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44904 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {} 2025-03-13 02:42:41.818 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44784 - "GET /api/version/updates HTTP/1.0" 200 - {} 2025-03-13 02:42:42.053 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:44912 - "GET /api/version/updates HTTP/1.0" 200 - {} 2025-03-13 02:42:43.955 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34336 - "GET /api/v1/chats/63e5142e-aed8-4472-b554-dc08d2105cc2 HTTP/1.0" 200 - {} 2025-03-13 02:42:43.992 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34340 - "GET /api/v1/chats/421e3de1-cc92-4e94-8ce6-70c73f26549d HTTP/1.0" 200 - {} 2025-03-13 02:42:44.004 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34352 - "GET /api/v1/chats/12f2dfdb-7b76-4da0-872f-3f78043da7fd HTTP/1.0" 200 - {} 2025-03-13 02:42:44.017 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34366 - "GET /api/v1/chats/fa8d7639-c61e-4958-ac0e-1e09ff135d64 HTTP/1.0" 200 - {} 2025-03-13 02:42:44.054 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34372 - "GET /api/v1/chats/60c88240-086e-4960-8a60-ad262b26ca50 HTTP/1.0" 200 - {} 2025-03-13 02:42:44.190 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34384 - "GET /api/v1/chats/b6fb02b6-fc91-4842-8fdb-ecb510ba7d78 HTTP/1.0" 200 - {} 2025-03-13 02:42:44.238 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34388 - "GET /api/v1/chats/a91735c8-2635-4f0d-9c13-a50a0fd832f9 HTTP/1.0" 200 - {} 2025-03-13 02:42:44.303 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34400 - "GET /api/v1/chats/fe7a07b3-ee90-4cbf-ac98-5a97633f590c HTTP/1.0" 200 - {} 2025-03-13 02:42:46.862 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /ollama/api/version HTTP/1.1" 200 - {} 2025-03-13 02:42:47.093 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.27.155:34410 - "GET /api/version/updates HTTP/1.0" 200 - {} 2025-03-13 02:43:25.170 | ERROR | open_webui.routers.openai:get_models:503 - Client error: Cannot connect to host api.x.ai:443 ssl:default [Connect call failed ('104.244.46.186', 443)] - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1115, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( │ └ <function start_connection at 0x7fab001bf600> └ <module 'aiohappyeyeballs' from '/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/__init__.py'> File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 115, in start_connection raise first_exception └ TimeoutError(110, "Connect call failed ('104.244.46.186', 443)") File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 72, in start_connection sock = await _connect_sock( └ <function _connect_sock at 0x7fab001d1d00> File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 197, in _connect_sock await loop.sock_connect(sock, address) │ │ │ └ ('104.244.46.186', 443) │ │ └ <socket.socket [closed] fd=-1, family=2, type=1, proto=6> │ └ <cyfunction Loop.sock_connect at 0x7fab02331490> └ <uvloop.Loop running=True closed=False debug=False> File "uvloop/loop.pyx", line 2633, in sock_connect await fut File "uvloop/loop.pyx", line 1108, in uvloop.loop.Loop._sock_connect_cb raise OSError(err, 'Connect call failed %s' % (address,)) TimeoutError: [Errno 110] Connect call failed ('104.244.46.186', 443) The above exception was the direct cause of the following exception: 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 0x7fab0270dda0> └ <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 0x7fab033f03d0> │ └ <function Command.invoke at 0x7fab0270e980> └ <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 0x7fab033f03d0> │ │ │ └ <function main at 0x7fab022eef20> │ │ └ <Command main> │ └ <function Context.invoke at 0x7fab0270d300> └ <click.core.Context object at 0x7fab033f03d0> 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 0x7fab0271be20> File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run server.run() │ └ <function Server.run at 0x7fab02575260> └ <uvicorn.server.Server object at 0x7fab0271c310> 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 0x7fab02575300> │ │ └ <uvicorn.server.Server object at 0x7fab0271c310> │ └ <function run at 0x7fab02a9cb80> └ <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 0x7fab024b9d50> │ └ <function Runner.run at 0x7fab028e8720> └ <asyncio.runners.Runner object at 0x7fab022f7a90> 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 0x7fab02330380> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7fab022f7a90> 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 0x7faaa9307880> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7faaaa72b850> └ <open_webui.main.RedirectMiddleware object at 0x7faaaab097d0> 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 0x7faaa9307880> │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ │ │ └ <starlette.requests.Request object at 0x7faaa93417d0> │ │ └ <fastapi.routing.APIRouter object at 0x7faaabb15bd0> │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7faaaa72b850> └ <function wrap_app_handling_exceptions at 0x7faaff936f20> 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 0x7faaa97d9260> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... └ <fastapi.routing.APIRouter object at 0x7faaabb15bd0> 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 0x7faaa97d9260> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7faaabb15bd0>> └ <fastapi.routing.APIRouter object at 0x7faaabb15bd0> 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 0x7faaa97d9260> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <function Route.handle at 0x7faaff9945e0> └ 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 0x7faaa97d9260> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <function request_response.<locals>.app at 0x7faaab303240> └ 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 0x7faaa97d9260> │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ │ └ <starlette.requests.Request object at 0x7faaa9340c10> │ └ <function request_response.<locals>.app.<locals>.app at 0x7faaa97da340> └ <function wrap_app_handling_exceptions at 0x7faaff936f20> 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 0x7faaa97db560> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7faaa93049a0> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... └ <function request_response.<locals>.app.<locals>.app at 0x7faaa97da340> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) │ └ <starlette.requests.Request object at 0x7faaa9340c10> └ <function get_request_handler.<locals>.app at 0x7faaab3016c0> 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 0x7faaff9963e0> 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='150d5a63-3343-4705-b7d9-16cb1d8edf65', name='admin', email='admin@zailab.com', role='admin', profile_i... │ └ <function get_models at 0x7faaaf358360> └ 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 454, in get_models async with session.get( │ └ <function ClientSession.get at 0x7fab00242200> └ <aiohttp.client.ClientSession object at 0x7faaa93fd150> File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1425, in __aenter__ self._resp: _RetType = await self._coro │ │ │ └ <member '_coro' of '_BaseRequestContextManager' objects> │ │ └ <aiohttp.client._BaseRequestContextManager object at 0x7faaa8bdb0a0> │ └ <member '_resp' of '_BaseRequestContextManager' objects> └ <aiohttp.client._BaseRequestContextManager object at 0x7faaa8bdb0a0> File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 703, in _request conn = await self._connector.connect( │ │ └ <function BaseConnector.connect at 0x7fab001e89a0> │ └ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50> └ <aiohttp.client.ClientSession object at 0x7faaa93fd150> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 548, in connect proto = await self._create_connection(req, traces, timeout) │ │ │ │ └ ClientTimeout(total=None, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5) │ │ │ └ [] │ │ └ <aiohttp.client_reqrep.ClientRequest object at 0x7faaa9362190> │ └ <function TCPConnector._create_connection at 0x7fab001e96c0> └ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1056, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) │ │ │ │ └ ClientTimeout(total=None, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5) │ │ │ └ [] │ │ └ <aiohttp.client_reqrep.ClientRequest object at 0x7faaa9362190> │ └ <function TCPConnector._create_direct_connection at 0x7fab001e9e40> └ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection raise last_exc └ ClientConnectorError(ConnectionKey(host='api.x.ai', port=443, is_ssl=True, ssl=True, proxy=None, proxy_auth=None, proxy_heade... File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection transp, proto = await self._wrap_create_connection( │ └ <function TCPConnector._wrap_create_connection at 0x7fab001e98a0> └ <aiohttp.connector.TCPConnector object at 0x7faaa9312d50> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc │ │ └ <property object at 0x7fab001b1850> │ └ <aiohttp.client_reqrep.ClientRequest object at 0x7faaa9362190> └ <class 'aiohttp.client_exceptions.ClientConnectorError'> aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.x.ai:443 ssl:default [Connect call failed ('104.244.46.186', 443)] 2025-03-13 02:43:25.175 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.64.4.152:0 - "GET /openai/models/4 HTTP/1.1" 500 - {} ### Additional Information I confirmed that LiteLLM proxy is successfully implemented. See below testing in Postman: ![Image](https://github.com/user-attachments/assets/636038b3-eb2f-4a3f-ac80-8f4ba5aa8811) Below are snapshots of configuration in Open WebUI admin panel: ![Image](https://github.com/user-attachments/assets/ffedd9ea-37d0-4003-a806-76c3f0a33eea) ![Image](https://github.com/user-attachments/assets/d420ac11-c783-483a-ad6d-50cb74682abd)
GiteaMirror added the bug label 2026-05-18 00:42:21 -05:00
Author
Owner

@sleyva-jumptrading commented on GitHub (Mar 14, 2025):

Btw patch file to fix this:

--- /usr/local/lib/python3.12/site-packages/open_webui/routers/images.py	2025-03-13 14:36:08.000000000 -0500
+++ /usr/local/lib/python3.12/site-packages/open_webui/routers/images.patch.py	2025-03-14 15:14:40.374325833 -0500
@@ -517,7 +517,7 @@
             images = []

             for image in res["data"]:
-                if "url" in image:
+                if image.get("url") is not None:
                     image_data, content_type = load_url_image_data(
                         image["url"], headers
                     )

I apply in my sites-package when I build the container

<!-- gh-comment-id:2725676895 --> @sleyva-jumptrading commented on GitHub (Mar 14, 2025): Btw patch file to fix this: ``` --- /usr/local/lib/python3.12/site-packages/open_webui/routers/images.py 2025-03-13 14:36:08.000000000 -0500 +++ /usr/local/lib/python3.12/site-packages/open_webui/routers/images.patch.py 2025-03-14 15:14:40.374325833 -0500 @@ -517,7 +517,7 @@ images = [] for image in res["data"]: - if "url" in image: + if image.get("url") is not None: image_data, content_type = load_url_image_data( image["url"], headers ) ``` I apply in my sites-package when I build the container
Author
Owner

@tjbck commented on GitHub (Mar 15, 2025):

This should already be addressed in dev.

<!-- gh-comment-id:2726466175 --> @tjbck commented on GitHub (Mar 15, 2025): This should already be addressed in dev.
Author
Owner

@highyield3011 commented on GitHub (Mar 19, 2025):

@sleyva-jumptrading @tjbck Thank you so much~~~!

<!-- gh-comment-id:2735899012 --> @highyield3011 commented on GitHub (Mar 19, 2025): @sleyva-jumptrading @tjbck Thank you so much~~~!
Author
Owner

@xuwencloud commented on GitHub (Apr 28, 2025):

我也是使用docker的方式遇到了这个问题,请问下具体是如何解决的

<!-- gh-comment-id:2835028236 --> @xuwencloud commented on GitHub (Apr 28, 2025): 我也是使用docker的方式遇到了这个问题,请问下具体是如何解决的
Author
Owner

@steveepreston commented on GitHub (Jun 10, 2025):

I Faced Client error: Cannot connect to host recently.
The problem was from the proxy behind the Docker Desktop. Fixed it then issue solved.

<!-- gh-comment-id:2958947143 --> @steveepreston commented on GitHub (Jun 10, 2025): I Faced `Client error: Cannot connect to host` recently. The problem was from the proxy behind the Docker Desktop. Fixed it then issue solved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#103292