[GH-ISSUE #20499] issue: Open-WebUI cannot use Bocha, but calling Bocha via a Python script works normally. #57867

Closed
opened 2026-05-05 21:47:00 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @gongshaojie12 on GitHub (Jan 9, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20499

Check Existing Issues

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

Installation Method

Pip Install

Open WebUI Version

0.6.43

Ollama Version (if applicable)

No response

Operating System

Centos 7.9

Browser (if applicable)

No response

Confirmation

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

Expected Behavior

Bocha can be used normally.

Actual Behavior

When I use Bocha, the following error occurs.

2026-01-09 15:55:52.329 | ERROR    | open_webui.routers.retrieval:process_web_search:2164 - HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))
urllib3.exceptions.SSLError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)


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


Traceback (most recent call last):

  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 644, in send
    resp = conn.urlopen(
           │    └ <function HTTPConnectionPool.urlopen at 0x7fdcd90f77e0>
           └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
              │       └ <function Retry.increment at 0x7fdcd90762a0>
              └ Retry(total=0, connect=None, read=False, redirect=None, status=None)
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
          │             │      │    │            └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))
          │             │      │    └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))
          │             │      └ '/v1/web-search?utm_source=ollama'
          │             └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250>
          └ <class 'urllib3.exceptions.MaxRetryError'>

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/root/anaconda3/envs/open-webui/bin/open-webui", line 7, in <module>
    sys.exit(app())
    │   │    └ <typer.main.Typer object at 0x7fdcdc509410>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 323, in __call__
    return get_command(self)(*args, **kwargs)
           │           │      │       └ {}
           │           │      └ ()
           │           └ <typer.main.Typer object at 0x7fdcdc509410>
           └ <function get_command at 0x7fdcdb832de0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ ()
           │    └ <function TyperGroup.main at 0x7fdcdb831300>
           └ <TyperGroup >
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 740, in main
    return _main(
           └ <function _main at 0x7fdcdb830540>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 195, in _main
    rv = self.invoke(ctx)
         │    │      └ <click.core.Context object at 0x7fdcdabf8b10>
         │    └ <function MultiCommand.invoke at 0x7fdcdc14f920>
         └ <TyperGroup >
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
           │               │       │       │      └ <click.core.Context object at 0x7fdcdc4421d0>
           │               │       │       └ <function Command.invoke at 0x7fdcdc14f2e0>
           │               │       └ <TyperCommand serve>
           │               └ <click.core.Context object at 0x7fdcdc4421d0>
           └ <function MultiCommand.invoke.<locals>._process_result at 0x7fdcdabde700>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           │   │      │    │           │   └ {'port': 443, 'host': '0.0.0.0'}
           │   │      │    │           └ <click.core.Context object at 0x7fdcdc4421d0>
           │   │      │    └ <function serve at 0x7fdcdabde5c0>
           │   │      └ <TyperCommand serve>
           │   └ <function Context.invoke at 0x7fdcdc14dc60>
           └ <click.core.Context object at 0x7fdcdc4421d0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
                       │       └ {'port': 443, 'host': '0.0.0.0'}
                       └ ()
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 698, in wrapper
    return callback(**use_params)
           │          └ {'host': '0.0.0.0', 'port': 443}
           └ <function serve at 0x7fdcdacc6fc0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/__init__.py", line 78, in serve
    uvicorn.run(
    │       └ <function run at 0x7fdcdaf2bf60>
    └ <module 'uvicorn' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/main.py", line 593, in run
    server.run()
    │      └ <function Server.run at 0x7fdcdac842c0>
    └ <uvicorn.server.Server object at 0x7fdb81f09ad0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run
    return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
           │           │    │             │                      │    │      └ <function Config.get_loop_factory at 0x7fdcdaf2bb00>
           │           │    │             │                      │    └ <uvicorn.config.Config object at 0x7fdb81ea9dd0>
           │           │    │             │                      └ <uvicorn.server.Server object at 0x7fdb81f09ad0>
           │           │    │             └ None
           │           │    └ <function Server.serve at 0x7fdcdac84360>
           │           └ <uvicorn.server.Server object at 0x7fdb81f09ad0>
           └ <function asyncio_run at 0x7fdcdac84220>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/_compat.py", line 23, in asyncio_run
    return runner.run(main)
           │      │   └ <coroutine object Server.serve at 0x7fdcdaf10c70>
           │      └ <function Runner.run at 0x7fdcdb76d300>
           └ <asyncio.runners.Runner object at 0x7fdcdaf57d50>
  File "/root/anaconda3/envs/open-webui/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 /root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvic...
           │    │     └ <cyfunction Loop.run_until_complete at 0x7fdb80682810>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0x7fdcdaf57d50>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1678, in process_chat
    form_data, metadata, events = await process_chat_payload(
    │          │                        └ <function process_chat_payload at 0x7fdb81d31da0>
    │          └ {'user_id': '18f27c58-cf94-44f0-b759-e2ed389dc015', 'chat_id': '9215a0bb-7799-4777-8853-c124aa53d7d4', 'message_id': '8b2d656...
    └ {'stream': True, 'model': 'qwen3-max', 'messages': [{'role': 'user', 'content': '最近的营销事件'}], 'metadata': {'user_id': '18f27c5...
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 1328, in process_chat_payload
    form_data = await chat_web_search_handler(
                      └ <function chat_web_search_handler at 0x7fdb81d31940>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 638, in chat_web_search_handler
    results = await process_web_search(
                    └ <function process_web_search at 0x7fdb83fcdd00>
> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2151, in process_web_search
    search_results = await asyncio.gather(*search_tasks)
                           │       │       └ [<coroutine object process_web_search.<locals>.search_with_limit at 0x7fda77ef68a0>, <coroutine object process_web_search.<lo...
                           │       └ <function gather at 0x7fdcdb746200>
                           └ <module 'asyncio' from '/root/anaconda3/envs/open-webui/lib/python3.11/asyncio/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2129, in search_with_limit
    return await run_in_threadpool(
                 └ <function run_in_threadpool at 0x7fdcd8c34c20>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
    return await anyio.to_thread.run_sync(func)
                 │     │         │        └ functools.partial(<function search_web at 0x7fdb83fcd300>, <starlette.requests.Request object at 0x7fda9f7a6ad0>, 'bocha', '2...
                 │     │         └ <function run_sync at 0x7fdcdace5580>
                 │     └ <module 'anyio.to_thread' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py'>
                 └ <module 'anyio' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
                 └ <function get_async_backend at 0x7fdcdace4cc0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
                 └ <Future finished exception=SSLError(MaxRetryError("HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceede...
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1930, in search_web
    return search_bocha(
           └ <function search_bocha at 0x7fdb84293e20>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/retrieval/web/bocha.py", line 51, in search_bocha
    response = requests.post(url, headers=headers, data=payload, timeout=5)
               │        │    │            │             └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}'
               │        │    │            └ {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'}
               │        │    └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama'
               │        └ <function post at 0x7fdcd8e3dd00>
               └ <module 'requests' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
           │               │         │          │       └ {'headers': {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'}, 'timeout': 5}
           │               │         │          └ None
           │               │         └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}'
           │               └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama'
           └ <function request at 0x7fdcd8dd8ea0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           │       │              │           │      └ {'data': '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count"...
           │       │              │           └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama'
           │       │              └ 'post'
           │       └ <function Session.request at 0x7fdcd8e3d1c0>
           └ <requests.sessions.Session object at 0x7fda1d97c810>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           │    │    │       └ {'timeout': 5, 'allow_redirects': True, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://192....
           │    │    └ <PreparedRequest [POST]>
           │    └ <function Session.send at 0x7fdcd8e3d6c0>
           └ <requests.sessions.Session object at 0x7fda1d97c810>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        │       │    │          └ {'timeout': 5, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://ip:80')]), 'stre...
        │       │    └ <PreparedRequest [POST]>
        │       └ <function HTTPAdapter.send at 0x7fdcd8e3ca40>
        └ <requests.adapters.HTTPAdapter object at 0x7fdac8d5f950>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 675, in send
    raise SSLError(e, request=request)
          │                   └ <PreparedRequest [POST]>
          └ <class 'requests.exceptions.SSLError'>

requests.exceptions.SSLError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))
2026-01-09 15:55:52.340 | ERROR    | open_webui.utils.middleware:chat_web_search_handler:701 - 400: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))
urllib3.exceptions.SSLError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)


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


Traceback (most recent call last):

  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 644, in send
    resp = conn.urlopen(
           │    └ <function HTTPConnectionPool.urlopen at 0x7fdcd90f77e0>
           └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
              │       └ <function Retry.increment at 0x7fdcd90762a0>
              └ Retry(total=0, connect=None, read=False, redirect=None, status=None)
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
          │             │      │    │            └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))
          │             │      │    └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))
          │             │      └ '/v1/web-search?utm_source=ollama'
          │             └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250>
          └ <class 'urllib3.exceptions.MaxRetryError'>

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2151, in process_web_search
    search_results = await asyncio.gather(*search_tasks)
                           │       │       └ [<coroutine object process_web_search.<locals>.search_with_limit at 0x7fda77ef68a0>, <coroutine object process_web_search.<lo...
                           │       └ <function gather at 0x7fdcdb746200>
                           └ <module 'asyncio' from '/root/anaconda3/envs/open-webui/lib/python3.11/asyncio/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2129, in search_with_limit
    return await run_in_threadpool(
                 └ <function run_in_threadpool at 0x7fdcd8c34c20>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
    return await anyio.to_thread.run_sync(func)
                 │     │         │        └ functools.partial(<function search_web at 0x7fdb83fcd300>, <starlette.requests.Request object at 0x7fda9f7a6ad0>, 'bocha', '2...
                 │     │         └ <function run_sync at 0x7fdcdace5580>
                 │     └ <module 'anyio.to_thread' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py'>
                 └ <module 'anyio' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
                 └ <function get_async_backend at 0x7fdcdace4cc0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
                 └ <Future finished exception=SSLError(MaxRetryError("HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceede...
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1930, in search_web
    return search_bocha(
           └ <function search_bocha at 0x7fdb84293e20>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/retrieval/web/bocha.py", line 51, in search_bocha
    response = requests.post(url, headers=headers, data=payload, timeout=5)
               │        │    │            │             └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}'
               │        │    │            └ {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'}
               │        │    └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama'
               │        └ <function post at 0x7fdcd8e3dd00>
               └ <module 'requests' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
           │               │         │          │       └ {'headers': {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'}, 'timeout': 5}
           │               │         │          └ None
           │               │         └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}'
           │               └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama'
           └ <function request at 0x7fdcd8dd8ea0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           │       │              │           │      └ {'data': '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count"...
           │       │              │           └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama'
           │       │              └ 'post'
           │       └ <function Session.request at 0x7fdcd8e3d1c0>
           └ <requests.sessions.Session object at 0x7fda1d97c810>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           │    │    │       └ {'timeout': 5, 'allow_redirects': True, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://192....
           │    │    └ <PreparedRequest [POST]>
           │    └ <function Session.send at 0x7fdcd8e3d6c0>
           └ <requests.sessions.Session object at 0x7fda1d97c810>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        │       │    │          └ {'timeout': 5, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://ip:80')]), 'stre...
        │       │    └ <PreparedRequest [POST]>
        │       └ <function HTTPAdapter.send at 0x7fdcd8e3ca40>
        └ <requests.adapters.HTTPAdapter object at 0x7fdac8d5f950>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 675, in send
    raise SSLError(e, request=request)
          │                   └ <PreparedRequest [POST]>
          └ <class 'requests.exceptions.SSLError'>

requests.exceptions.SSLError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/root/anaconda3/envs/open-webui/bin/open-webui", line 7, in <module>
    sys.exit(app())
    │   │    └ <typer.main.Typer object at 0x7fdcdc509410>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 323, in __call__
    return get_command(self)(*args, **kwargs)
           │           │      │       └ {}
           │           │      └ ()
           │           └ <typer.main.Typer object at 0x7fdcdc509410>
           └ <function get_command at 0x7fdcdb832de0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ ()
           │    └ <function TyperGroup.main at 0x7fdcdb831300>
           └ <TyperGroup >
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 740, in main
    return _main(
           └ <function _main at 0x7fdcdb830540>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 195, in _main
    rv = self.invoke(ctx)
         │    │      └ <click.core.Context object at 0x7fdcdabf8b10>
         │    └ <function MultiCommand.invoke at 0x7fdcdc14f920>
         └ <TyperGroup >
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
           │               │       │       │      └ <click.core.Context object at 0x7fdcdc4421d0>
           │               │       │       └ <function Command.invoke at 0x7fdcdc14f2e0>
           │               │       └ <TyperCommand serve>
           │               └ <click.core.Context object at 0x7fdcdc4421d0>
           └ <function MultiCommand.invoke.<locals>._process_result at 0x7fdcdabde700>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           │   │      │    │           │   └ {'port': 443, 'host': '0.0.0.0'}
           │   │      │    │           └ <click.core.Context object at 0x7fdcdc4421d0>
           │   │      │    └ <function serve at 0x7fdcdabde5c0>
           │   │      └ <TyperCommand serve>
           │   └ <function Context.invoke at 0x7fdcdc14dc60>
           └ <click.core.Context object at 0x7fdcdc4421d0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
                       │       └ {'port': 443, 'host': '0.0.0.0'}
                       └ ()
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 698, in wrapper
    return callback(**use_params)
           │          └ {'host': '0.0.0.0', 'port': 443}
           └ <function serve at 0x7fdcdacc6fc0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/__init__.py", line 78, in serve
    uvicorn.run(
    │       └ <function run at 0x7fdcdaf2bf60>
    └ <module 'uvicorn' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/__init__.py'>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/main.py", line 593, in run
    server.run()
    │      └ <function Server.run at 0x7fdcdac842c0>
    └ <uvicorn.server.Server object at 0x7fdb81f09ad0>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run
    return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
           │           │    │             │                      │    │      └ <function Config.get_loop_factory at 0x7fdcdaf2bb00>
           │           │    │             │                      │    └ <uvicorn.config.Config object at 0x7fdb81ea9dd0>
           │           │    │             │                      └ <uvicorn.server.Server object at 0x7fdb81f09ad0>
           │           │    │             └ None
           │           │    └ <function Server.serve at 0x7fdcdac84360>
           │           └ <uvicorn.server.Server object at 0x7fdb81f09ad0>
           └ <function asyncio_run at 0x7fdcdac84220>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/_compat.py", line 23, in asyncio_run
    return runner.run(main)
           │      │   └ <coroutine object Server.serve at 0x7fdcdaf10c70>
           │      └ <function Runner.run at 0x7fdcdb76d300>
           └ <asyncio.runners.Runner object at 0x7fdcdaf57d50>
  File "/root/anaconda3/envs/open-webui/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 /root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvic...
           │    │     └ <cyfunction Loop.run_until_complete at 0x7fdb80682810>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0x7fdcdaf57d50>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1678, in process_chat
    form_data, metadata, events = await process_chat_payload(
    │          │                        └ <function process_chat_payload at 0x7fdb81d31da0>
    │          └ {'user_id': '18f27c58-cf94-44f0-b759-e2ed389dc015', 'chat_id': '9215a0bb-7799-4777-8853-c124aa53d7d4', 'message_id': '8b2d656...
    └ {'stream': True, 'model': 'qwen3-max', 'messages': [{'role': 'user', 'content': '最近的营销事件'}], 'metadata': {'user_id': '18f27c5...
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 1328, in process_chat_payload
    form_data = await chat_web_search_handler(
                      └ <function chat_web_search_handler at 0x7fdb81d31940>
> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 638, in chat_web_search_handler
    results = await process_web_search(
                    └ <function process_web_search at 0x7fdb83fcdd00>
  File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2166, in process_web_search
    raise HTTPException(
          └ <class 'fastapi.exceptions.HTTPException'>

fastapi.exceptions.HTTPException: 400: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))

However, when I run the following Python script on this machine, it works normally.

import requests
import json
url = "https://api.bochaai.com/v1/web-search?utm_source=ollama"
headers = {"Authorization": f"Bearer key", "Content-Type": "application/json"}
query = "最近营销事件"
payload = json.dumps(
    {"query": query, "summary": True, "freshness": "noLimit", "count": 5}
)

def _parse_response(response):
    results = []
    if "data" in response:
        data = response["data"]
        if "webPages" in data:
            webPages = data["webPages"]
            if "value" in webPages:
                results = [
                    {
                        "id": item.get("id", ""),
                        "name": item.get("name", ""),
                        "url": item.get("url", ""),
                        "snippet": item.get("snippet", ""),
                        "summary": item.get("summary", ""),
                        "siteName": item.get("siteName", ""),
                        "siteIcon": item.get("siteIcon", ""),
                        "datePublished": item.get("datePublished", "")
                                         or item.get("dateLastCrawled", ""),
                    }
                    for item in webPages["value"]
                ]
    return results

response = requests.post(url, headers=headers, data=payload, timeout=5)
response.raise_for_status()
results = _parse_response(response.json())

print("results:", results)

What could be the cause of this issue, and how can I resolve it?

Steps to Reproduce

None

Logs & Screenshots

None

Additional Information

No response

Originally created by @gongshaojie12 on GitHub (Jan 9, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20499 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version 0.6.43 ### Ollama Version (if applicable) _No response_ ### Operating System Centos 7.9 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Bocha can be used normally. ### Actual Behavior When I use Bocha, the following error occurs. ``` 2026-01-09 15:55:52.329 | ERROR | open_webui.routers.retrieval:process_web_search:2164 - HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))) urllib3.exceptions.SSLError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 644, in send resp = conn.urlopen( │ └ <function HTTPConnectionPool.urlopen at 0x7fdcd90f77e0> └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( │ └ <function Retry.increment at 0x7fdcd90762a0> └ Retry(total=0, connect=None, read=False, redirect=None, status=None) File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] │ │ │ │ └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')) │ │ │ └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')) │ │ └ '/v1/web-search?utm_source=ollama' │ └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250> └ <class 'urllib3.exceptions.MaxRetryError'> urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/anaconda3/envs/open-webui/bin/open-webui", line 7, in <module> sys.exit(app()) │ │ └ <typer.main.Typer object at 0x7fdcdc509410> │ └ <built-in function exit> └ <module 'sys' (built-in)> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 323, in __call__ return get_command(self)(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <typer.main.Typer object at 0x7fdcdc509410> └ <function get_command at 0x7fdcdb832de0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <function TyperGroup.main at 0x7fdcdb831300> └ <TyperGroup > File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 740, in main return _main( └ <function _main at 0x7fdcdb830540> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 195, in _main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0x7fdcdabf8b10> │ └ <function MultiCommand.invoke at 0x7fdcdc14f920> └ <TyperGroup > File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1697, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) │ │ │ │ └ <click.core.Context object at 0x7fdcdc4421d0> │ │ │ └ <function Command.invoke at 0x7fdcdc14f2e0> │ │ └ <TyperCommand serve> │ └ <click.core.Context object at 0x7fdcdc4421d0> └ <function MultiCommand.invoke.<locals>._process_result at 0x7fdcdabde700> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) │ │ │ │ │ └ {'port': 443, 'host': '0.0.0.0'} │ │ │ │ └ <click.core.Context object at 0x7fdcdc4421d0> │ │ │ └ <function serve at 0x7fdcdabde5c0> │ │ └ <TyperCommand serve> │ └ <function Context.invoke at 0x7fdcdc14dc60> └ <click.core.Context object at 0x7fdcdc4421d0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) │ └ {'port': 443, 'host': '0.0.0.0'} └ () File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 698, in wrapper return callback(**use_params) │ └ {'host': '0.0.0.0', 'port': 443} └ <function serve at 0x7fdcdacc6fc0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/__init__.py", line 78, in serve uvicorn.run( │ └ <function run at 0x7fdcdaf2bf60> └ <module 'uvicorn' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/main.py", line 593, in run server.run() │ └ <function Server.run at 0x7fdcdac842c0> └ <uvicorn.server.Server object at 0x7fdb81f09ad0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory()) │ │ │ │ │ │ └ <function Config.get_loop_factory at 0x7fdcdaf2bb00> │ │ │ │ │ └ <uvicorn.config.Config object at 0x7fdb81ea9dd0> │ │ │ │ └ <uvicorn.server.Server object at 0x7fdb81f09ad0> │ │ │ └ None │ │ └ <function Server.serve at 0x7fdcdac84360> │ └ <uvicorn.server.Server object at 0x7fdb81f09ad0> └ <function asyncio_run at 0x7fdcdac84220> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/_compat.py", line 23, in asyncio_run return runner.run(main) │ │ └ <coroutine object Server.serve at 0x7fdcdaf10c70> │ └ <function Runner.run at 0x7fdcdb76d300> └ <asyncio.runners.Runner object at 0x7fdcdaf57d50> File "/root/anaconda3/envs/open-webui/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 /root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvic... │ │ └ <cyfunction Loop.run_until_complete at 0x7fdb80682810> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7fdcdaf57d50> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1678, in process_chat form_data, metadata, events = await process_chat_payload( │ │ └ <function process_chat_payload at 0x7fdb81d31da0> │ └ {'user_id': '18f27c58-cf94-44f0-b759-e2ed389dc015', 'chat_id': '9215a0bb-7799-4777-8853-c124aa53d7d4', 'message_id': '8b2d656... └ {'stream': True, 'model': 'qwen3-max', 'messages': [{'role': 'user', 'content': '最近的营销事件'}], 'metadata': {'user_id': '18f27c5... File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 1328, in process_chat_payload form_data = await chat_web_search_handler( └ <function chat_web_search_handler at 0x7fdb81d31940> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 638, in chat_web_search_handler results = await process_web_search( └ <function process_web_search at 0x7fdb83fcdd00> > File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2151, in process_web_search search_results = await asyncio.gather(*search_tasks) │ │ └ [<coroutine object process_web_search.<locals>.search_with_limit at 0x7fda77ef68a0>, <coroutine object process_web_search.<lo... │ └ <function gather at 0x7fdcdb746200> └ <module 'asyncio' from '/root/anaconda3/envs/open-webui/lib/python3.11/asyncio/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2129, in search_with_limit return await run_in_threadpool( └ <function run_in_threadpool at 0x7fdcd8c34c20> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool return await anyio.to_thread.run_sync(func) │ │ │ └ functools.partial(<function search_web at 0x7fdb83fcd300>, <starlette.requests.Request object at 0x7fda9f7a6ad0>, 'bocha', '2... │ │ └ <function run_sync at 0x7fdcdace5580> │ └ <module 'anyio.to_thread' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py'> └ <module 'anyio' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( └ <function get_async_backend at 0x7fdcdace4cc0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread return await future └ <Future finished exception=SSLError(MaxRetryError("HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceede... File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1930, in search_web return search_bocha( └ <function search_bocha at 0x7fdb84293e20> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/retrieval/web/bocha.py", line 51, in search_bocha response = requests.post(url, headers=headers, data=payload, timeout=5) │ │ │ │ └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}' │ │ │ └ {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'} │ │ └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama' │ └ <function post at 0x7fdcd8e3dd00> └ <module 'requests' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) │ │ │ │ └ {'headers': {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'}, 'timeout': 5} │ │ │ └ None │ │ └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}' │ └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama' └ <function request at 0x7fdcd8dd8ea0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) │ │ │ │ └ {'data': '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count"... │ │ │ └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama' │ │ └ 'post' │ └ <function Session.request at 0x7fdcd8e3d1c0> └ <requests.sessions.Session object at 0x7fda1d97c810> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) │ │ │ └ {'timeout': 5, 'allow_redirects': True, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://192.... │ │ └ <PreparedRequest [POST]> │ └ <function Session.send at 0x7fdcd8e3d6c0> └ <requests.sessions.Session object at 0x7fda1d97c810> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) │ │ │ └ {'timeout': 5, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://ip:80')]), 'stre... │ │ └ <PreparedRequest [POST]> │ └ <function HTTPAdapter.send at 0x7fdcd8e3ca40> └ <requests.adapters.HTTPAdapter object at 0x7fdac8d5f950> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 675, in send raise SSLError(e, request=request) │ └ <PreparedRequest [POST]> └ <class 'requests.exceptions.SSLError'> requests.exceptions.SSLError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))) 2026-01-09 15:55:52.340 | ERROR | open_webui.utils.middleware:chat_web_search_handler:701 - 400: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))) urllib3.exceptions.SSLError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 644, in send resp = conn.urlopen( │ └ <function HTTPConnectionPool.urlopen at 0x7fdcd90f77e0> └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( │ └ <function Retry.increment at 0x7fdcd90762a0> └ Retry(total=0, connect=None, read=False, redirect=None, status=None) File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] │ │ │ │ └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')) │ │ │ └ SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')) │ │ └ '/v1/web-search?utm_source=ollama' │ └ <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fda2d9d5250> └ <class 'urllib3.exceptions.MaxRetryError'> urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2151, in process_web_search search_results = await asyncio.gather(*search_tasks) │ │ └ [<coroutine object process_web_search.<locals>.search_with_limit at 0x7fda77ef68a0>, <coroutine object process_web_search.<lo... │ └ <function gather at 0x7fdcdb746200> └ <module 'asyncio' from '/root/anaconda3/envs/open-webui/lib/python3.11/asyncio/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2129, in search_with_limit return await run_in_threadpool( └ <function run_in_threadpool at 0x7fdcd8c34c20> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool return await anyio.to_thread.run_sync(func) │ │ │ └ functools.partial(<function search_web at 0x7fdb83fcd300>, <starlette.requests.Request object at 0x7fda9f7a6ad0>, 'bocha', '2... │ │ └ <function run_sync at 0x7fdcdace5580> │ └ <module 'anyio.to_thread' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py'> └ <module 'anyio' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( └ <function get_async_backend at 0x7fdcdace4cc0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread return await future └ <Future finished exception=SSLError(MaxRetryError("HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceede... File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1930, in search_web return search_bocha( └ <function search_bocha at 0x7fdb84293e20> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/retrieval/web/bocha.py", line 51, in search_bocha response = requests.post(url, headers=headers, data=payload, timeout=5) │ │ │ │ └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}' │ │ │ └ {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'} │ │ └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama' │ └ <function post at 0x7fdcd8e3dd00> └ <module 'requests' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) │ │ │ │ └ {'headers': {'Authorization': 'Bearer sk-01d0106a22c0425c96d27c24ebec71ed', 'Content-Type': 'application/json'}, 'timeout': 5} │ │ │ └ None │ │ └ '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count": 20}' │ └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama' └ <function request at 0x7fdcd8dd8ea0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) │ │ │ │ └ {'data': '{"query": "2024\\u5e74\\u6700\\u65b0\\u8425\\u9500\\u6848\\u4f8b", "summary": true, "freshness": "noLimit", "count"... │ │ │ └ 'https://api.bochaai.com/v1/web-search?utm_source=ollama' │ │ └ 'post' │ └ <function Session.request at 0x7fdcd8e3d1c0> └ <requests.sessions.Session object at 0x7fda1d97c810> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) │ │ │ └ {'timeout': 5, 'allow_redirects': True, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://192.... │ │ └ <PreparedRequest [POST]> │ └ <function Session.send at 0x7fdcd8e3d6c0> └ <requests.sessions.Session object at 0x7fda1d97c810> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) │ │ │ └ {'timeout': 5, 'proxies': OrderedDict([('http', 'http://ip:80'), ('https', 'http://ip:80')]), 'stre... │ │ └ <PreparedRequest [POST]> │ └ <function HTTPAdapter.send at 0x7fdcd8e3ca40> └ <requests.adapters.HTTPAdapter object at 0x7fdac8d5f950> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/requests/adapters.py", line 675, in send raise SSLError(e, request=request) │ └ <PreparedRequest [POST]> └ <class 'requests.exceptions.SSLError'> requests.exceptions.SSLError: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/anaconda3/envs/open-webui/bin/open-webui", line 7, in <module> sys.exit(app()) │ │ └ <typer.main.Typer object at 0x7fdcdc509410> │ └ <built-in function exit> └ <module 'sys' (built-in)> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 323, in __call__ return get_command(self)(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <typer.main.Typer object at 0x7fdcdc509410> └ <function get_command at 0x7fdcdb832de0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <function TyperGroup.main at 0x7fdcdb831300> └ <TyperGroup > File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 740, in main return _main( └ <function _main at 0x7fdcdb830540> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/core.py", line 195, in _main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0x7fdcdabf8b10> │ └ <function MultiCommand.invoke at 0x7fdcdc14f920> └ <TyperGroup > File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1697, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) │ │ │ │ └ <click.core.Context object at 0x7fdcdc4421d0> │ │ │ └ <function Command.invoke at 0x7fdcdc14f2e0> │ │ └ <TyperCommand serve> │ └ <click.core.Context object at 0x7fdcdc4421d0> └ <function MultiCommand.invoke.<locals>._process_result at 0x7fdcdabde700> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) │ │ │ │ │ └ {'port': 443, 'host': '0.0.0.0'} │ │ │ │ └ <click.core.Context object at 0x7fdcdc4421d0> │ │ │ └ <function serve at 0x7fdcdabde5c0> │ │ └ <TyperCommand serve> │ └ <function Context.invoke at 0x7fdcdc14dc60> └ <click.core.Context object at 0x7fdcdc4421d0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) │ └ {'port': 443, 'host': '0.0.0.0'} └ () File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/typer/main.py", line 698, in wrapper return callback(**use_params) │ └ {'host': '0.0.0.0', 'port': 443} └ <function serve at 0x7fdcdacc6fc0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/__init__.py", line 78, in serve uvicorn.run( │ └ <function run at 0x7fdcdaf2bf60> └ <module 'uvicorn' from '/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/__init__.py'> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/main.py", line 593, in run server.run() │ └ <function Server.run at 0x7fdcdac842c0> └ <uvicorn.server.Server object at 0x7fdb81f09ad0> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory()) │ │ │ │ │ │ └ <function Config.get_loop_factory at 0x7fdcdaf2bb00> │ │ │ │ │ └ <uvicorn.config.Config object at 0x7fdb81ea9dd0> │ │ │ │ └ <uvicorn.server.Server object at 0x7fdb81f09ad0> │ │ │ └ None │ │ └ <function Server.serve at 0x7fdcdac84360> │ └ <uvicorn.server.Server object at 0x7fdb81f09ad0> └ <function asyncio_run at 0x7fdcdac84220> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvicorn/_compat.py", line 23, in asyncio_run return runner.run(main) │ │ └ <coroutine object Server.serve at 0x7fdcdaf10c70> │ └ <function Runner.run at 0x7fdcdb76d300> └ <asyncio.runners.Runner object at 0x7fdcdaf57d50> File "/root/anaconda3/envs/open-webui/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 /root/anaconda3/envs/open-webui/lib/python3.11/site-packages/uvic... │ │ └ <cyfunction Loop.run_until_complete at 0x7fdb80682810> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7fdcdaf57d50> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/main.py", line 1678, in process_chat form_data, metadata, events = await process_chat_payload( │ │ └ <function process_chat_payload at 0x7fdb81d31da0> │ └ {'user_id': '18f27c58-cf94-44f0-b759-e2ed389dc015', 'chat_id': '9215a0bb-7799-4777-8853-c124aa53d7d4', 'message_id': '8b2d656... └ {'stream': True, 'model': 'qwen3-max', 'messages': [{'role': 'user', 'content': '最近的营销事件'}], 'metadata': {'user_id': '18f27c5... File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 1328, in process_chat_payload form_data = await chat_web_search_handler( └ <function chat_web_search_handler at 0x7fdb81d31940> > File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/utils/middleware.py", line 638, in chat_web_search_handler results = await process_web_search( └ <function process_web_search at 0x7fdb83fcdd00> File "/root/anaconda3/envs/open-webui/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 2166, in process_web_search raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)'))) ``` However, when I run the following Python script on this machine, it works normally. ``` import requests import json url = "https://api.bochaai.com/v1/web-search?utm_source=ollama" headers = {"Authorization": f"Bearer key", "Content-Type": "application/json"} query = "最近营销事件" payload = json.dumps( {"query": query, "summary": True, "freshness": "noLimit", "count": 5} ) def _parse_response(response): results = [] if "data" in response: data = response["data"] if "webPages" in data: webPages = data["webPages"] if "value" in webPages: results = [ { "id": item.get("id", ""), "name": item.get("name", ""), "url": item.get("url", ""), "snippet": item.get("snippet", ""), "summary": item.get("summary", ""), "siteName": item.get("siteName", ""), "siteIcon": item.get("siteIcon", ""), "datePublished": item.get("datePublished", "") or item.get("dateLastCrawled", ""), } for item in webPages["value"] ] return results response = requests.post(url, headers=headers, data=payload, timeout=5) response.raise_for_status() results = _parse_response(response.json()) print("results:", results) ``` What could be the cause of this issue, and how can I resolve it? ### Steps to Reproduce None ### Logs & Screenshots None ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-05 21:47:00 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Jan 9, 2026):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #20128 issue: Characters are broken in 0.6.43
    by frenzybiscuit • Dec 22, 2025 • bug

  2. #20327 issue: Unable to use any Open WebUI version newer than 0.6.25 due to hybrid search performance
    by galvanoid • Jan 02, 2026 • bug

  3. #11661 issue: Can not use Bocha websearch API, return "No search results found"
    by pandalaohe • Mar 14, 2025 • bug

  4. #19733 issue: AttributeError: 'str' object has no attribute 'get' when using Bocha search engine
    by Sorkai • Dec 04, 2025 • bug


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3727637666 --> @owui-terminator[bot] commented on GitHub (Jan 9, 2026): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#20128](https://github.com/open-webui/open-webui/issues/20128) **issue: Characters are broken in 0.6.43** *by frenzybiscuit • Dec 22, 2025 • `bug`* 2. [#20327](https://github.com/open-webui/open-webui/issues/20327) **issue: Unable to use any Open WebUI version newer than 0.6.25 due to hybrid search performance** *by galvanoid • Jan 02, 2026 • `bug`* 3. [#11661](https://github.com/open-webui/open-webui/issues/11661) **issue: Can not use Bocha websearch API, return "No search results found"** *by pandalaohe • Mar 14, 2025 • `bug`* 4. [#19733](https://github.com/open-webui/open-webui/issues/19733) **issue: AttributeError: 'str' object has no attribute 'get' when using Bocha search engine** *by Sorkai • Dec 04, 2025 • `bug`* --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@Classic298 commented on GitHub (Jan 9, 2026):

"fastapi.exceptions.HTTPException: 400: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))"

Either you got rate limited or the web search did not work because of certificate issues and PYTHONHTTPSVERIFY here.

If you say the code works in a standalone script but not in open webui, then it's not an open webui issue.
More likely you need to configure open webui to have access to the certificates if you have any firewall in-between or other self signed certs, or disable certificate verification

<!-- gh-comment-id:3727820630 --> @Classic298 commented on GitHub (Jan 9, 2026): "fastapi.exceptions.HTTPException: 400: HTTPSConnectionPool(host='api.bochaai.com', port=443): Max retries exceeded with url: /v1/web-search?utm_source=ollama (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006)')))" Either you got rate limited or the web search did not work because of certificate issues and PYTHONHTTPSVERIFY here. If you say the code works in a standalone script but not in open webui, then it's not an open webui issue. More likely you need to configure open webui to have access to the certificates if you have any firewall in-between or other self signed certs, or disable certificate verification
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57867