[GH-ISSUE #11501] issue: cant use duckduckgo search #31781

Closed
opened 2026-04-25 05:41:10 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @nekokristalo on GitHub (Mar 10, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11501

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

0.5.20

Ollama Version (if applicable)

No response

Operating System

Windows 11 Pro Workstations WIN32_NT 10.0.26120.3360 (24H2)

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

use duckduckgo search

Actual Behavior

cant use duckduckgo search

Steps to Reproduce

1.open web search
2.chat

Logs & Screenshots

2025-03-10 19:41:49 Traceback (most recent call last):
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/usr/local/bin/uvicorn", line 10, in
2025-03-10 19:41:49 sys.exit(main())
2025-03-10 19:41:49 │ │ └
2025-03-10 19:41:49 │ └
2025-03-10 19:41:49 └ <module 'sys' (built-in)>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in call
2025-03-10 19:41:49 return self.main(args, **kwargs)
2025-03-10 19:41:49 │ │ │ └ {}
2025-03-10 19:41:49 │ │ └ ()
2025-03-10 19:41:49 │ └ <function BaseCommand.main at 0x7f8be1003740>
2025-03-10 19:41:49 └
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
2025-03-10 19:41:49 rv = self.invoke(ctx)
2025-03-10 19:41:49 │ │ └ <click.core.Context object at 0x7f8be1d48350>
2025-03-10 19:41:49 │ └ <function Command.invoke at 0x7f8be101c360>
2025-03-10 19:41:49 └
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
2025-03-10 19:41:49 return ctx.invoke(self.callback, **ctx.params)
2025-03-10 19:41:49 │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '
', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
2025-03-10 19:41:49 │ │ │ │ └ <click.core.Context object at 0x7f8be1d48350>
2025-03-10 19:41:49 │ │ │ └ <function main at 0x7f8be0e10d60>
2025-03-10 19:41:49 │ │ └
2025-03-10 19:41:49 │ └ <function Context.invoke at 0x7f8be1002ca0>
2025-03-10 19:41:49 └ <click.core.Context object at 0x7f8be1d48350>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
2025-03-10 19:41:49 return __callback(args, **kwargs)
2025-03-10 19:41:49 │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '
', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
2025-03-10 19:41:49 └ ()
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
2025-03-10 19:41:49 run(
2025-03-10 19:41:49 └ <function run at 0x7f8be104ed40>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
2025-03-10 19:41:49 server.run()
2025-03-10 19:41:49 │ └ <function Server.run at 0x7f8be0eb4220>
2025-03-10 19:41:49 └ <uvicorn.server.Server object at 0x7f8be10470d0>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
2025-03-10 19:41:49 return asyncio.run(self.serve(sockets=sockets))
2025-03-10 19:41:49 │ │ │ │ └ None
2025-03-10 19:41:49 │ │ │ └ <function Server.serve at 0x7f8be0eb42c0>
2025-03-10 19:41:49 │ │ └ <uvicorn.server.Server object at 0x7f8be10470d0>
2025-03-10 19:41:49 │ └ <function run at 0x7f8be1414ae0>
2025-03-10 19:41:49 └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/init.py'>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
2025-03-10 19:41:49 return runner.run(main)
2025-03-10 19:41:49 │ │ └ <coroutine object Server.serve at 0x7f8be0dd17b0>
2025-03-10 19:41:49 │ └ <function Runner.run at 0x7f8be1250680>
2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
2025-03-10 19:41:49 return self._loop.run_until_complete(task)
2025-03-10 19:41:49 │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai...
2025-03-10 19:41:49 │ │ └ <cyfunction Loop.run_until_complete at 0x7f8be097a330>
2025-03-10 19:41:49 │ └ <uvloop.Loop running=True closed=False debug=False>
2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
2025-03-10 19:41:49 await self.app(scope, receive_or_disconnect, send_no_error)
2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x7f8b38915080>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0>
2025-03-10 19:41:49 └ <open_webui.main.RedirectMiddleware object at 0x7f8b38f99990>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2025-03-10 19:41:49 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x7f8b38915080>
2025-03-10 19:41:49 │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ │ │ └ <starlette.requests.Request object at 0x7f8ac2ea4b50>
2025-03-10 19:41:49 │ │ └ <fastapi.routing.APIRouter object at 0x7f8b8af53790>
2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0>
2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-03-10 19:41:49 await app(scope, receive, sender)
2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2025-03-10 19:41:49 await self.middleware_stack(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f8b8af53790>>
2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2025-03-10 19:41:49 await route.handle(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <function Route.handle at 0x7f8bde3c1620>
2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST'])
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2025-03-10 19:41:49 await self.app(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <function request_response..app at 0x7f8b38b6ccc0>
2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST'])
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2025-03-10 19:41:49 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0>
2025-03-10 19:41:49 │ └ <function request_response..app..app at 0x7f8b38915c60>
2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-03-10 19:41:49 await app(scope, receive, sender)
2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38916e80>
2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 └ <function request_response..app..app at 0x7f8b38915c60>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2025-03-10 19:41:49 response = await f(request)
2025-03-10 19:41:49 │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0>
2025-03-10 19:41:49 └ <function get_request_handler..app at 0x7f8b38b6cc20>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2025-03-10 19:41:49 raw_response = await run_endpoint_function(
2025-03-10 19:41:49 └ <function run_endpoint_function at 0x7f8bde3c3420>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
2025-03-10 19:41:49 return await dependant.call(**values)
2025-03-10 19:41:49 │ │ └ {'user': UserModel(id='0e6c3f2b-3e48-416d-a33a-8fef523aa858', name='花崎梦川', email='kristaloneko@outlook.com', role='admin', pr...
2025-03-10 19:41:49 │ └ <function chat_completion at 0x7f8b38b6c2c0>
2025-03-10 19:41:49 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/main.py", line 1048, in chat_completion
2025-03-10 19:41:49 form_data, metadata, events = await process_chat_payload(
2025-03-10 19:41:49 │ │ └ <function process_chat_payload at 0x7f8b8b30d300>
2025-03-10 19:41:49 │ └ {'user_id': '0e6c3f2b-3e48-416d-a33a-8fef523aa858', 'chat_id': '50c518d0-7192-48aa-9a51-f1d71a0c2d65', 'message_id': '38629c7...
2025-03-10 19:41:49 └ {'stream': True, 'model': 'deepseek-r1', 'messages': [{'role': 'user', 'content': '现在请你扮演mygo中的高松灯,你去了海军博物馆看到了各国二战时未建成的方案舰(在战...
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/utils/middleware.py", line 734, in process_chat_payload
2025-03-10 19:41:49 form_data = await chat_web_search_handler(
2025-03-10 19:41:49 └ <function chat_web_search_handler at 0x7f8b8b30c4a0>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/utils/middleware.py", line 339, in chat_web_search_handler
2025-03-10 19:41:49 results = await process_web_search(
2025-03-10 19:41:49 └ <function process_web_search at 0x7f8b92366660>
2025-03-10 19:41:49
2025-03-10 19:41:49 > File "/app/backend/open_webui/routers/retrieval.py", line 1427, in process_web_search
2025-03-10 19:41:49 web_results = search_web(
2025-03-10 19:41:49 └ <function search_web at 0x7f8b9231e160>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1349, in search_web
2025-03-10 19:41:49 return search_duckduckgo(
2025-03-10 19:41:49 └ <function search_duckduckgo at 0x7f8b9323ec00>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 27, in search_duckduckgo
2025-03-10 19:41:49 ddgs_gen = ddgs.text(
2025-03-10 19:41:49 │ └ <function DDGS.text at 0x7f8b929fd1c0>
2025-03-10 19:41:49 └ <duckduckgo_search.duckduckgo_search.DDGS object at 0x7f8ac069ce50>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/duckduckgo_search/duckduckgo_search.py", line 252, in text
2025-03-10 19:41:49 raise DuckDuckGoSearchException(err)
2025-03-10 19:41:49 │ └ RatelimitException('https://html.duckduckgo.com/html 202 Ratelimit')
2025-03-10 19:41:49 └ <class 'duckduckgo_search.exceptions.DuckDuckGoSearchException'>
2025-03-10 19:41:49
2025-03-10 19:41:49 duckduckgo_search.exceptions.DuckDuckGoSearchException: https://html.duckduckgo.com/html 202 Ratelimit
2025-03-10 19:41:49 2025-03-10 11:41:49.248 | ERROR | open_webui.utils.middleware:chat_web_search_handler:374 - 400: https://html.duckduckgo.com/html 202 Ratelimit - {}
2025-03-10 19:41:49 Traceback (most recent call last):
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1427, in process_web_search
2025-03-10 19:41:49 web_results = search_web(
2025-03-10 19:41:49 └ <function search_web at 0x7f8b9231e160>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1349, in search_web
2025-03-10 19:41:49 return search_duckduckgo(
2025-03-10 19:41:49 └ <function search_duckduckgo at 0x7f8b9323ec00>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 27, in search_duckduckgo
2025-03-10 19:41:49 ddgs_gen = ddgs.text(
2025-03-10 19:41:49 │ └ <function DDGS.text at 0x7f8b929fd1c0>
2025-03-10 19:41:49 └ <duckduckgo_search.duckduckgo_search.DDGS object at 0x7f8ac069ce50>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/duckduckgo_search/duckduckgo_search.py", line 252, in text
2025-03-10 19:41:49 raise DuckDuckGoSearchException(err)
2025-03-10 19:41:49 │ └ RatelimitException('https://html.duckduckgo.com/html 202 Ratelimit')
2025-03-10 19:41:49 └ <class 'duckduckgo_search.exceptions.DuckDuckGoSearchException'>
2025-03-10 19:41:49
2025-03-10 19:41:49 duckduckgo_search.exceptions.DuckDuckGoSearchException: https://html.duckduckgo.com/html 202 Ratelimit
2025-03-10 19:41:49
2025-03-10 19:41:49
2025-03-10 19:41:49 During handling of the above exception, another exception occurred:
2025-03-10 19:41:49
2025-03-10 19:41:49
2025-03-10 19:41:49 Traceback (most recent call last):
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/usr/local/bin/uvicorn", line 10, in
2025-03-10 19:41:49 sys.exit(main())
2025-03-10 19:41:49 │ │ └
2025-03-10 19:41:49 │ └
2025-03-10 19:41:49 └ <module 'sys' (built-in)>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in call
2025-03-10 19:41:49 return self.main(args, **kwargs)
2025-03-10 19:41:49 │ │ │ └ {}
2025-03-10 19:41:49 │ │ └ ()
2025-03-10 19:41:49 │ └ <function BaseCommand.main at 0x7f8be1003740>
2025-03-10 19:41:49 └
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
2025-03-10 19:41:49 rv = self.invoke(ctx)
2025-03-10 19:41:49 │ │ └ <click.core.Context object at 0x7f8be1d48350>
2025-03-10 19:41:49 │ └ <function Command.invoke at 0x7f8be101c360>
2025-03-10 19:41:49 └
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
2025-03-10 19:41:49 return ctx.invoke(self.callback, **ctx.params)
2025-03-10 19:41:49 │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '
', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
2025-03-10 19:41:49 │ │ │ │ └ <click.core.Context object at 0x7f8be1d48350>
2025-03-10 19:41:49 │ │ │ └ <function main at 0x7f8be0e10d60>
2025-03-10 19:41:49 │ │ └
2025-03-10 19:41:49 │ └ <function Context.invoke at 0x7f8be1002ca0>
2025-03-10 19:41:49 └ <click.core.Context object at 0x7f8be1d48350>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
2025-03-10 19:41:49 return __callback(args, **kwargs)
2025-03-10 19:41:49 │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '
', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
2025-03-10 19:41:49 └ ()
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
2025-03-10 19:41:49 run(
2025-03-10 19:41:49 └ <function run at 0x7f8be104ed40>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
2025-03-10 19:41:49 server.run()
2025-03-10 19:41:49 │ └ <function Server.run at 0x7f8be0eb4220>
2025-03-10 19:41:49 └ <uvicorn.server.Server object at 0x7f8be10470d0>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
2025-03-10 19:41:49 return asyncio.run(self.serve(sockets=sockets))
2025-03-10 19:41:49 │ │ │ │ └ None
2025-03-10 19:41:49 │ │ │ └ <function Server.serve at 0x7f8be0eb42c0>
2025-03-10 19:41:49 │ │ └ <uvicorn.server.Server object at 0x7f8be10470d0>
2025-03-10 19:41:49 │ └ <function run at 0x7f8be1414ae0>
2025-03-10 19:41:49 └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/init.py'>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
2025-03-10 19:41:49 return runner.run(main)
2025-03-10 19:41:49 │ │ └ <coroutine object Server.serve at 0x7f8be0dd17b0>
2025-03-10 19:41:49 │ └ <function Runner.run at 0x7f8be1250680>
2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
2025-03-10 19:41:49 return self._loop.run_until_complete(task)
2025-03-10 19:41:49 │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai...
2025-03-10 19:41:49 │ │ └ <cyfunction Loop.run_until_complete at 0x7f8be097a330>
2025-03-10 19:41:49 │ └ <uvloop.Loop running=True closed=False debug=False>
2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
2025-03-10 19:41:49 await self.app(scope, receive_or_disconnect, send_no_error)
2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x7f8b38915080>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0>
2025-03-10 19:41:49 └ <open_webui.main.RedirectMiddleware object at 0x7f8b38f99990>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2025-03-10 19:41:49 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x7f8b38915080>
2025-03-10 19:41:49 │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ │ │ └ <starlette.requests.Request object at 0x7f8ac2ea4b50>
2025-03-10 19:41:49 │ │ └ <fastapi.routing.APIRouter object at 0x7f8b8af53790>
2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0>
2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-03-10 19:41:49 await app(scope, receive, sender)
2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2025-03-10 19:41:49 await self.middleware_stack(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f8b8af53790>>
2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2025-03-10 19:41:49 await route.handle(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <function Route.handle at 0x7f8bde3c1620>
2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST'])
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2025-03-10 19:41:49 await self.app(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ └ <function request_response..app at 0x7f8b38b6ccc0>
2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST'])
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2025-03-10 19:41:49 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-03-10 19:41:49 │ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38917380>
2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 │ │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0>
2025-03-10 19:41:49 │ └ <function request_response..app..app at 0x7f8b38915c60>
2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-03-10 19:41:49 await app(scope, receive, sender)
2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7f8b38916e80>
2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7f8b38916980>
2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-03-10 19:41:49 └ <function request_response..app..app at 0x7f8b38915c60>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2025-03-10 19:41:49 response = await f(request)
2025-03-10 19:41:49 │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0>
2025-03-10 19:41:49 └ <function get_request_handler..app at 0x7f8b38b6cc20>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2025-03-10 19:41:49 raw_response = await run_endpoint_function(
2025-03-10 19:41:49 └ <function run_endpoint_function at 0x7f8bde3c3420>
2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
2025-03-10 19:41:49 return await dependant.call(**values)
2025-03-10 19:41:49 │ │ └ {'user': UserModel(id='0e6c3f2b-3e48-416d-a33a-8fef523aa858', name='花崎梦川', email='kristaloneko@outlook.com', role='admin', pr...
2025-03-10 19:41:49 │ └ <function chat_completion at 0x7f8b38b6c2c0>
2025-03-10 19:41:49 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/main.py", line 1048, in chat_completion
2025-03-10 19:41:49 form_data, metadata, events = await process_chat_payload(
2025-03-10 19:41:49 │ │ └ <function process_chat_payload at 0x7f8b8b30d300>
2025-03-10 19:41:49 │ └ {'user_id': '0e6c3f2b-3e48-416d-a33a-8fef523aa858', 'chat_id': '50c518d0-7192-48aa-9a51-f1d71a0c2d65', 'message_id': '38629c7...
2025-03-10 19:41:49 └ {'stream': True, 'model': 'deepseek-r1', 'messages': [{'role': 'user', 'content': '现在请你扮演mygo中的高松灯,你去了海军博物馆看到了各国二战时未建成的方案舰(在战...
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/utils/middleware.py", line 734, in process_chat_payload
2025-03-10 19:41:49 form_data = await chat_web_search_handler(
2025-03-10 19:41:49 └ <function chat_web_search_handler at 0x7f8b8b30c4a0>
2025-03-10 19:41:49
2025-03-10 19:41:49 > File "/app/backend/open_webui/utils/middleware.py", line 339, in chat_web_search_handler
2025-03-10 19:41:49 results = await process_web_search(
2025-03-10 19:41:49 └ <function process_web_search at 0x7f8b92366660>
2025-03-10 19:41:49
2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1433, in process_web_search
2025-03-10 19:41:49 raise HTTPException(
2025-03-10 19:41:49 └ <class 'fastapi.exceptions.HTTPException'>

Additional Information

No response

Originally created by @nekokristalo on GitHub (Mar 10, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11501 ### 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 0.5.20 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 11 Pro Workstations WIN32_NT 10.0.26120.3360 (24H2) ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior use duckduckgo search ### Actual Behavior cant use duckduckgo search ### Steps to Reproduce 1.open web search 2.chat ### Logs & Screenshots 2025-03-10 19:41:49 Traceback (most recent call last): 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/usr/local/bin/uvicorn", line 10, in <module> 2025-03-10 19:41:49 sys.exit(main()) 2025-03-10 19:41:49 │ │ └ <Command main> 2025-03-10 19:41:49 │ └ <built-in function exit> 2025-03-10 19:41:49 └ <module 'sys' (built-in)> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__ 2025-03-10 19:41:49 return self.main(*args, **kwargs) 2025-03-10 19:41:49 │ │ │ └ {} 2025-03-10 19:41:49 │ │ └ () 2025-03-10 19:41:49 │ └ <function BaseCommand.main at 0x7f8be1003740> 2025-03-10 19:41:49 └ <Command main> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main 2025-03-10 19:41:49 rv = self.invoke(ctx) 2025-03-10 19:41:49 │ │ └ <click.core.Context object at 0x7f8be1d48350> 2025-03-10 19:41:49 │ └ <function Command.invoke at 0x7f8be101c360> 2025-03-10 19:41:49 └ <Command main> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke 2025-03-10 19:41:49 return ctx.invoke(self.callback, **ctx.params) 2025-03-10 19:41:49 │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... 2025-03-10 19:41:49 │ │ │ │ └ <click.core.Context object at 0x7f8be1d48350> 2025-03-10 19:41:49 │ │ │ └ <function main at 0x7f8be0e10d60> 2025-03-10 19:41:49 │ │ └ <Command main> 2025-03-10 19:41:49 │ └ <function Context.invoke at 0x7f8be1002ca0> 2025-03-10 19:41:49 └ <click.core.Context object at 0x7f8be1d48350> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke 2025-03-10 19:41:49 return __callback(*args, **kwargs) 2025-03-10 19:41:49 │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... 2025-03-10 19:41:49 └ () 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main 2025-03-10 19:41:49 run( 2025-03-10 19:41:49 └ <function run at 0x7f8be104ed40> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run 2025-03-10 19:41:49 server.run() 2025-03-10 19:41:49 │ └ <function Server.run at 0x7f8be0eb4220> 2025-03-10 19:41:49 └ <uvicorn.server.Server object at 0x7f8be10470d0> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run 2025-03-10 19:41:49 return asyncio.run(self.serve(sockets=sockets)) 2025-03-10 19:41:49 │ │ │ │ └ None 2025-03-10 19:41:49 │ │ │ └ <function Server.serve at 0x7f8be0eb42c0> 2025-03-10 19:41:49 │ │ └ <uvicorn.server.Server object at 0x7f8be10470d0> 2025-03-10 19:41:49 │ └ <function run at 0x7f8be1414ae0> 2025-03-10 19:41:49 └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run 2025-03-10 19:41:49 return runner.run(main) 2025-03-10 19:41:49 │ │ └ <coroutine object Server.serve at 0x7f8be0dd17b0> 2025-03-10 19:41:49 │ └ <function Runner.run at 0x7f8be1250680> 2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run 2025-03-10 19:41:49 return self._loop.run_until_complete(task) 2025-03-10 19:41:49 │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai... 2025-03-10 19:41:49 │ │ └ <cyfunction Loop.run_until_complete at 0x7f8be097a330> 2025-03-10 19:41:49 │ └ <uvloop.Loop running=True closed=False debug=False> 2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro 2025-03-10 19:41:49 await self.app(scope, receive_or_disconnect, send_no_error) 2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7f8b38915080> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0> 2025-03-10 19:41:49 └ <open_webui.main.RedirectMiddleware object at 0x7f8b38f99990> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__ 2025-03-10 19:41:49 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7f8b38915080> 2025-03-10 19:41:49 │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ │ │ └ <starlette.requests.Request object at 0x7f8ac2ea4b50> 2025-03-10 19:41:49 │ │ └ <fastapi.routing.APIRouter object at 0x7f8b8af53790> 2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0> 2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app 2025-03-10 19:41:49 await app(scope, receive, sender) 2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__ 2025-03-10 19:41:49 await self.middleware_stack(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f8b8af53790>> 2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app 2025-03-10 19:41:49 await route.handle(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <function Route.handle at 0x7f8bde3c1620> 2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST']) 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle 2025-03-10 19:41:49 await self.app(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <function request_response.<locals>.app at 0x7f8b38b6ccc0> 2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST']) 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app 2025-03-10 19:41:49 await wrap_app_handling_exceptions(app, request)(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0> 2025-03-10 19:41:49 │ └ <function request_response.<locals>.app.<locals>.app at 0x7f8b38915c60> 2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app 2025-03-10 19:41:49 await app(scope, receive, sender) 2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38916e80> 2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 └ <function request_response.<locals>.app.<locals>.app at 0x7f8b38915c60> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app 2025-03-10 19:41:49 response = await f(request) 2025-03-10 19:41:49 │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0> 2025-03-10 19:41:49 └ <function get_request_handler.<locals>.app at 0x7f8b38b6cc20> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app 2025-03-10 19:41:49 raw_response = await run_endpoint_function( 2025-03-10 19:41:49 └ <function run_endpoint_function at 0x7f8bde3c3420> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function 2025-03-10 19:41:49 return await dependant.call(**values) 2025-03-10 19:41:49 │ │ └ {'user': UserModel(id='0e6c3f2b-3e48-416d-a33a-8fef523aa858', name='花崎梦川', email='kristaloneko@outlook.com', role='admin', pr... 2025-03-10 19:41:49 │ └ <function chat_completion at 0x7f8b38b6c2c0> 2025-03-10 19:41:49 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant... 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/main.py", line 1048, in chat_completion 2025-03-10 19:41:49 form_data, metadata, events = await process_chat_payload( 2025-03-10 19:41:49 │ │ └ <function process_chat_payload at 0x7f8b8b30d300> 2025-03-10 19:41:49 │ └ {'user_id': '0e6c3f2b-3e48-416d-a33a-8fef523aa858', 'chat_id': '50c518d0-7192-48aa-9a51-f1d71a0c2d65', 'message_id': '38629c7... 2025-03-10 19:41:49 └ {'stream': True, 'model': 'deepseek-r1', 'messages': [{'role': 'user', 'content': '现在请你扮演mygo中的高松灯,你去了海军博物馆看到了各国二战时未建成的方案舰(在战... 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/utils/middleware.py", line 734, in process_chat_payload 2025-03-10 19:41:49 form_data = await chat_web_search_handler( 2025-03-10 19:41:49 └ <function chat_web_search_handler at 0x7f8b8b30c4a0> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/utils/middleware.py", line 339, in chat_web_search_handler 2025-03-10 19:41:49 results = await process_web_search( 2025-03-10 19:41:49 └ <function process_web_search at 0x7f8b92366660> 2025-03-10 19:41:49 2025-03-10 19:41:49 > File "/app/backend/open_webui/routers/retrieval.py", line 1427, in process_web_search 2025-03-10 19:41:49 web_results = search_web( 2025-03-10 19:41:49 └ <function search_web at 0x7f8b9231e160> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1349, in search_web 2025-03-10 19:41:49 return search_duckduckgo( 2025-03-10 19:41:49 └ <function search_duckduckgo at 0x7f8b9323ec00> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 27, in search_duckduckgo 2025-03-10 19:41:49 ddgs_gen = ddgs.text( 2025-03-10 19:41:49 │ └ <function DDGS.text at 0x7f8b929fd1c0> 2025-03-10 19:41:49 └ <duckduckgo_search.duckduckgo_search.DDGS object at 0x7f8ac069ce50> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/duckduckgo_search/duckduckgo_search.py", line 252, in text 2025-03-10 19:41:49 raise DuckDuckGoSearchException(err) 2025-03-10 19:41:49 │ └ RatelimitException('https://html.duckduckgo.com/html 202 Ratelimit') 2025-03-10 19:41:49 └ <class 'duckduckgo_search.exceptions.DuckDuckGoSearchException'> 2025-03-10 19:41:49 2025-03-10 19:41:49 duckduckgo_search.exceptions.DuckDuckGoSearchException: https://html.duckduckgo.com/html 202 Ratelimit 2025-03-10 19:41:49 2025-03-10 11:41:49.248 | ERROR | open_webui.utils.middleware:chat_web_search_handler:374 - 400: https://html.duckduckgo.com/html 202 Ratelimit - {} 2025-03-10 19:41:49 Traceback (most recent call last): 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1427, in process_web_search 2025-03-10 19:41:49 web_results = search_web( 2025-03-10 19:41:49 └ <function search_web at 0x7f8b9231e160> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1349, in search_web 2025-03-10 19:41:49 return search_duckduckgo( 2025-03-10 19:41:49 └ <function search_duckduckgo at 0x7f8b9323ec00> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 27, in search_duckduckgo 2025-03-10 19:41:49 ddgs_gen = ddgs.text( 2025-03-10 19:41:49 │ └ <function DDGS.text at 0x7f8b929fd1c0> 2025-03-10 19:41:49 └ <duckduckgo_search.duckduckgo_search.DDGS object at 0x7f8ac069ce50> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/duckduckgo_search/duckduckgo_search.py", line 252, in text 2025-03-10 19:41:49 raise DuckDuckGoSearchException(err) 2025-03-10 19:41:49 │ └ RatelimitException('https://html.duckduckgo.com/html 202 Ratelimit') 2025-03-10 19:41:49 └ <class 'duckduckgo_search.exceptions.DuckDuckGoSearchException'> 2025-03-10 19:41:49 2025-03-10 19:41:49 duckduckgo_search.exceptions.DuckDuckGoSearchException: https://html.duckduckgo.com/html 202 Ratelimit 2025-03-10 19:41:49 2025-03-10 19:41:49 2025-03-10 19:41:49 During handling of the above exception, another exception occurred: 2025-03-10 19:41:49 2025-03-10 19:41:49 2025-03-10 19:41:49 Traceback (most recent call last): 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/usr/local/bin/uvicorn", line 10, in <module> 2025-03-10 19:41:49 sys.exit(main()) 2025-03-10 19:41:49 │ │ └ <Command main> 2025-03-10 19:41:49 │ └ <built-in function exit> 2025-03-10 19:41:49 └ <module 'sys' (built-in)> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__ 2025-03-10 19:41:49 return self.main(*args, **kwargs) 2025-03-10 19:41:49 │ │ │ └ {} 2025-03-10 19:41:49 │ │ └ () 2025-03-10 19:41:49 │ └ <function BaseCommand.main at 0x7f8be1003740> 2025-03-10 19:41:49 └ <Command main> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main 2025-03-10 19:41:49 rv = self.invoke(ctx) 2025-03-10 19:41:49 │ │ └ <click.core.Context object at 0x7f8be1d48350> 2025-03-10 19:41:49 │ └ <function Command.invoke at 0x7f8be101c360> 2025-03-10 19:41:49 └ <Command main> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke 2025-03-10 19:41:49 return ctx.invoke(self.callback, **ctx.params) 2025-03-10 19:41:49 │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... 2025-03-10 19:41:49 │ │ │ │ └ <click.core.Context object at 0x7f8be1d48350> 2025-03-10 19:41:49 │ │ │ └ <function main at 0x7f8be0e10d60> 2025-03-10 19:41:49 │ │ └ <Command main> 2025-03-10 19:41:49 │ └ <function Context.invoke at 0x7f8be1002ca0> 2025-03-10 19:41:49 └ <click.core.Context object at 0x7f8be1d48350> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke 2025-03-10 19:41:49 return __callback(*args, **kwargs) 2025-03-10 19:41:49 │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... 2025-03-10 19:41:49 └ () 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main 2025-03-10 19:41:49 run( 2025-03-10 19:41:49 └ <function run at 0x7f8be104ed40> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run 2025-03-10 19:41:49 server.run() 2025-03-10 19:41:49 │ └ <function Server.run at 0x7f8be0eb4220> 2025-03-10 19:41:49 └ <uvicorn.server.Server object at 0x7f8be10470d0> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run 2025-03-10 19:41:49 return asyncio.run(self.serve(sockets=sockets)) 2025-03-10 19:41:49 │ │ │ │ └ None 2025-03-10 19:41:49 │ │ │ └ <function Server.serve at 0x7f8be0eb42c0> 2025-03-10 19:41:49 │ │ └ <uvicorn.server.Server object at 0x7f8be10470d0> 2025-03-10 19:41:49 │ └ <function run at 0x7f8be1414ae0> 2025-03-10 19:41:49 └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run 2025-03-10 19:41:49 return runner.run(main) 2025-03-10 19:41:49 │ │ └ <coroutine object Server.serve at 0x7f8be0dd17b0> 2025-03-10 19:41:49 │ └ <function Runner.run at 0x7f8be1250680> 2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run 2025-03-10 19:41:49 return self._loop.run_until_complete(task) 2025-03-10 19:41:49 │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai... 2025-03-10 19:41:49 │ │ └ <cyfunction Loop.run_until_complete at 0x7f8be097a330> 2025-03-10 19:41:49 │ └ <uvloop.Loop running=True closed=False debug=False> 2025-03-10 19:41:49 └ <asyncio.runners.Runner object at 0x7f8be0e1f6d0> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro 2025-03-10 19:41:49 await self.app(scope, receive_or_disconnect, send_no_error) 2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7f8b38915080> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0> 2025-03-10 19:41:49 └ <open_webui.main.RedirectMiddleware object at 0x7f8b38f99990> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__ 2025-03-10 19:41:49 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0x7f8b38915080> 2025-03-10 19:41:49 │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ │ │ └ <starlette.requests.Request object at 0x7f8ac2ea4b50> 2025-03-10 19:41:49 │ │ └ <fastapi.routing.APIRouter object at 0x7f8b8af53790> 2025-03-10 19:41:49 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f8b38bb45d0> 2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app 2025-03-10 19:41:49 await app(scope, receive, sender) 2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__ 2025-03-10 19:41:49 await self.middleware_stack(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f8b8af53790>> 2025-03-10 19:41:49 └ <fastapi.routing.APIRouter object at 0x7f8b8af53790> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app 2025-03-10 19:41:49 await route.handle(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <function Route.handle at 0x7f8bde3c1620> 2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST']) 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle 2025-03-10 19:41:49 await self.app(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ └ <function request_response.<locals>.app at 0x7f8b38b6ccc0> 2025-03-10 19:41:49 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST']) 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app 2025-03-10 19:41:49 await wrap_app_handling_exceptions(app, request)(scope, receive, send) 2025-03-10 19:41:49 │ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38917380> 2025-03-10 19:41:49 │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 │ │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0> 2025-03-10 19:41:49 │ └ <function request_response.<locals>.app.<locals>.app at 0x7f8b38915c60> 2025-03-10 19:41:49 └ <function wrap_app_handling_exceptions at 0x7f8bde3c0040> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app 2025-03-10 19:41:49 await app(scope, receive, sender) 2025-03-10 19:41:49 │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x7f8b38916e80> 2025-03-10 19:41:49 │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8b38916980> 2025-03-10 19:41:49 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... 2025-03-10 19:41:49 └ <function request_response.<locals>.app.<locals>.app at 0x7f8b38915c60> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app 2025-03-10 19:41:49 response = await f(request) 2025-03-10 19:41:49 │ └ <starlette.requests.Request object at 0x7f8ac2ea6cd0> 2025-03-10 19:41:49 └ <function get_request_handler.<locals>.app at 0x7f8b38b6cc20> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app 2025-03-10 19:41:49 raw_response = await run_endpoint_function( 2025-03-10 19:41:49 └ <function run_endpoint_function at 0x7f8bde3c3420> 2025-03-10 19:41:49 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function 2025-03-10 19:41:49 return await dependant.call(**values) 2025-03-10 19:41:49 │ │ └ {'user': UserModel(id='0e6c3f2b-3e48-416d-a33a-8fef523aa858', name='花崎梦川', email='kristaloneko@outlook.com', role='admin', pr... 2025-03-10 19:41:49 │ └ <function chat_completion at 0x7f8b38b6c2c0> 2025-03-10 19:41:49 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant... 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/main.py", line 1048, in chat_completion 2025-03-10 19:41:49 form_data, metadata, events = await process_chat_payload( 2025-03-10 19:41:49 │ │ └ <function process_chat_payload at 0x7f8b8b30d300> 2025-03-10 19:41:49 │ └ {'user_id': '0e6c3f2b-3e48-416d-a33a-8fef523aa858', 'chat_id': '50c518d0-7192-48aa-9a51-f1d71a0c2d65', 'message_id': '38629c7... 2025-03-10 19:41:49 └ {'stream': True, 'model': 'deepseek-r1', 'messages': [{'role': 'user', 'content': '现在请你扮演mygo中的高松灯,你去了海军博物馆看到了各国二战时未建成的方案舰(在战... 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/utils/middleware.py", line 734, in process_chat_payload 2025-03-10 19:41:49 form_data = await chat_web_search_handler( 2025-03-10 19:41:49 └ <function chat_web_search_handler at 0x7f8b8b30c4a0> 2025-03-10 19:41:49 2025-03-10 19:41:49 > File "/app/backend/open_webui/utils/middleware.py", line 339, in chat_web_search_handler 2025-03-10 19:41:49 results = await process_web_search( 2025-03-10 19:41:49 └ <function process_web_search at 0x7f8b92366660> 2025-03-10 19:41:49 2025-03-10 19:41:49 File "/app/backend/open_webui/routers/retrieval.py", line 1433, in process_web_search 2025-03-10 19:41:49 raise HTTPException( 2025-03-10 19:41:49 └ <class 'fastapi.exceptions.HTTPException'> ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 05:41:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#31781