What happened / 发生了什么
如图所示,增加新provider配置,准备填模型id时,点击保存,出现以下错误:

第二次点击保存时,此时错误变为:
然后,点击取消:
之后点击保存配置,会突然出现没有”保存成功“的模型id。
Reproduce / 如何复现?
复现方法同What happened / 发生了什么,此处不再赘述
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
WSL
Astrbot 4.25.6
OS
Windows
Logs / 报错日志
[17:33:03.971] [Core] [INFO] [provider.manager:856]: Providers ['deepseek_1/deepseek-v4-flash'] were removed from configuration.
[17:33:28.603] [Core] [ERRO] [v4.26.7] [api.app:178]: Unhandled exception in dashboard API
Traceback (most recent call last):
File "/home/cyrene/fork/AstrBot/main.py", line 244, in
asyncio.run(main_async(args.webui_dir))
│ │ │ │ └ None
│ │ │ └ Namespace(webui_dir=None, reset_password=False)
│ │ └ <function main_async at 0x786d796f2700>
│ └ <function run at 0x786d7c7780e0>
└ <module 'asyncio' from '/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/init....
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
│ │ └ <coroutine object main_async at 0x786d5e8f3300>
│ └ <function Runner.run at 0x786d7c5b5620>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<main_async() running at /home/cyrene/fork/AstrBot/main.py:216> wait_for=<_GatheringFuture p...
│ │ └ <function BaseEventLoop.run_until_complete at 0x786d7c5b3240>
│ └ <_UnixSelectorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x786d7c5b31a0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x786d7c5b4fe0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
handle._run()
│ └ <function Handle._run at 0x786d7c706b60>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/asyncio/task_group.py", line 28, in _handle
await app(scope, receive, send, sync_spawn, call_soon)
│ │ │ │ │ └ <function TaskGroup.spawn_app.._call_soon at 0x786d4d4d4360>
│ │ │ │ └ functools.partial(<bound method BaseEventLoop.run_in_executor of <_UnixSelectorEventLoop running=True closed=False debug=Fals...
│ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <hypercorn.app_wrappers.ASGIWrapper object at 0x786d4e82be90>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/app_wrappers.py", line 34, in call
await self.app(scope, receive, send)
│ │ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <fastapi.applications.FastAPI object at 0x786d4f7b0440>
└ <hypercorn.app_wrappers.ASGIWrapper object at 0x786d4e82be90>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1163, in call
await super().call(scope, receive, send)
│ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
└ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/applications.py", line 90, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.errors.ServerErrorMiddleware object at 0x786d4e86a1e0>
└ <fastapi.applications.FastAPI object at 0x786d4f7b0440>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
│ │ │ │ └ <function ServerErrorMiddleware.call.._send at 0x786d4d4d77e0>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
└ <starlette.middleware.errors.ServerErrorMiddleware object at 0x786d4e86a1e0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 193, in call
response = await self.dispatch_func(request, call_next)
│ │ │ └ <function BaseHTTPMiddleware.call..call_next at 0x786d4d4d6f20>
│ │ └ <starlette.middleware.base._CachedRequest object at 0x786d4ccadb20>
│ └ <function AstrBotDashboard.init..dashboard_auth_middleware at 0x786d4eb1eca0>
└ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/server.py", line 249, in dashboard_auth_middleware
return await call_next(request_)
│ └ <starlette.middleware.base._CachedRequest object at 0x786d4ccadb20>
└ <function BaseHTTPMiddleware.call..call_next at 0x786d4d4d6f20>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
│ │ │ │ └ <attribute 'context' of 'BaseException' objects>
│ │ │ └ KeyError('type')
│ │ └ <attribute 'cause' of 'BaseException' objects>
│ └ KeyError('type')
└ KeyError('type')
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ │ └ <starlette.requests.Request object at 0x786d4cbe6f60>
│ │ └ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <bound method APIRouter.app of <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>>
└ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2685, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d4eb153d0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1777, in _handle_selected
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d5ddd7530>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1786, in _handle_selected
await original_route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function APIRoute.handle at 0x786d5ecb8860>
└ APIRoute(path='/provider-sources/providers', name='create_provider_in_source_by_id', methods=['POST'])
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1265, in handle
await app(scope, receive, send)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app at 0x786d4c799620>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 151, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <starlette.requests.Request object at 0x786d4ccaf920>
│ └ <function request_response..app..app at 0x786d4c798540>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d707abba0>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app..app at 0x786d4c798540>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 137, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x786d4ccaf920>
└ <function get_request_handler..app at 0x786d4c798f40>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 691, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x786d5ec9fba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 345, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'_auth': AuthContext(username='astrbot', scopes=['*'], api_key_id=None, via='jwt'), 'service': <astrbot.dashboard.services.c...
│ └ <function create_provider_in_source_by_id at 0x786d5ddce200>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/api/providers.py", line 180, in create_provider_in_source_by_id
await service.create_provider(
│ └ <function ProviderConfigService.create_provider at 0x786d5e86ac00>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/services/config_service.py", line 1629, in create_provider
await self.provider_manager.create_provider(config)
│ │ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ │ └ <function ProviderManager.create_provider at 0x786d6ba30900>
│ └ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 896, in create_provider
await self.load_provider(new_config)
│ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ └ <function ProviderManager.load_provider at 0x786d6ba30540>
└ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 601, in load_provider
provider_config["type"],
└ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
KeyError: 'type'
[2026-07-26 17:33:28 +0800] [46864] [ERROR] Error in ASGI Framework
Traceback (most recent call last):
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/asyncio/task_group.py", line 28, in _handle
await app(scope, receive, send, sync_spawn, call_soon)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/app_wrappers.py", line 34, in call
await self.app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1163, in call
await super().call(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/applications.py", line 90, in call
await self.middleware_stack(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 193, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/server.py", line 249, in dashboard_auth_middleware
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2685, in app
await route.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1777, in _handle_selected
await route.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1786, in _handle_selected
await original_route.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1265, in handle
await app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 151, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 137, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 691, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 345, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/api/providers.py", line 180, in create_provider_in_source_by_id
await service.create_provider(
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/services/config_service.py", line 1629, in create_provider
await self.provider_manager.create_provider(config)
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 896, in create_provider
await self.load_provider(new_config)
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 601, in load_provider
provider_config["type"],
~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'type'
[17:33:28.644] [Core] [ERRO] [hypercorn.logging:115]: Error in ASGI Framework
Traceback (most recent call last):
File "/home/cyrene/fork/AstrBot/main.py", line 244, in
asyncio.run(main_async(args.webui_dir))
│ │ │ │ └ None
│ │ │ └ Namespace(webui_dir=None, reset_password=False)
│ │ └ <function main_async at 0x786d796f2700>
│ └ <function run at 0x786d7c7780e0>
└ <module 'asyncio' from '/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/init....
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
│ │ └ <coroutine object main_async at 0x786d5e8f3300>
│ └ <function Runner.run at 0x786d7c5b5620>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<main_async() running at /home/cyrene/fork/AstrBot/main.py:216> wait_for=<_GatheringFuture p...
│ │ └ <function BaseEventLoop.run_until_complete at 0x786d7c5b3240>
│ └ <_UnixSelectorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x786d7c5b31a0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x786d7c5b4fe0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
handle._run()
│ └ <function Handle._run at 0x786d7c706b60>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/asyncio/task_group.py", line 28, in _handle
await app(scope, receive, send, sync_spawn, call_soon)
│ │ │ │ │ └ <function TaskGroup.spawn_app.._call_soon at 0x786d4d4d4360>
│ │ │ │ └ functools.partial(<bound method BaseEventLoop.run_in_executor of <_UnixSelectorEventLoop running=True closed=False debug=Fals...
│ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 _queue=[{'type': 'http.disconnect'}] tasks=3>>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <hypercorn.app_wrappers.ASGIWrapper object at 0x786d4e82be90>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/app_wrappers.py", line 34, in call
await self.app(scope, receive, send)
│ │ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 _queue=[{'type': 'http.disconnect'}] tasks=3>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <fastapi.applications.FastAPI object at 0x786d4f7b0440>
└ <hypercorn.app_wrappers.ASGIWrapper object at 0x786d4e82be90>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1163, in call
await super().call(scope, receive, send)
│ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 _queue=[{'type': 'http.disconnect'}] tasks=3>>
└ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/applications.py", line 90, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 _queue=[{'type': 'http.disconnect'}] tasks=3>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.errors.ServerErrorMiddleware object at 0x786d4e86a1e0>
└ <fastapi.applications.FastAPI object at 0x786d4f7b0440>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
│ │ │ │ └ <function ServerErrorMiddleware.call.._send at 0x786d4d4d77e0>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 _queue=[{'type': 'http.disconnect'}] tasks=3>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
└ <starlette.middleware.errors.ServerErrorMiddleware object at 0x786d4e86a1e0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 193, in call
response = await self.dispatch_func(request, call_next)
│ │ │ └ <function BaseHTTPMiddleware.call..call_next at 0x786d4d4d6f20>
│ │ └ <starlette.middleware.base._CachedRequest object at 0x786d4ccadb20>
│ └ <function AstrBotDashboard.init..dashboard_auth_middleware at 0x786d4eb1eca0>
└ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/server.py", line 249, in dashboard_auth_middleware
return await call_next(request_)
│ └ <starlette.middleware.base._CachedRequest object at 0x786d4ccadb20>
└ <function BaseHTTPMiddleware.call..call_next at 0x786d4d4d6f20>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
│ │ │ │ └ <attribute 'context' of 'BaseException' objects>
│ │ │ └ KeyError('type')
│ │ └ <attribute 'cause' of 'BaseException' objects>
│ └ KeyError('type')
└ KeyError('type')
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ │ └ <starlette.requests.Request object at 0x786d4cbe6f60>
│ │ └ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <bound method APIRouter.app of <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>>
└ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2685, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d4eb153d0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1777, in _handle_selected
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d5ddd7530>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1786, in _handle_selected
await original_route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function APIRoute.handle at 0x786d5ecb8860>
└ APIRoute(path='/provider-sources/providers', name='create_provider_in_source_by_id', methods=['POST'])
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1265, in handle
await app(scope, receive, send)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app at 0x786d4c799620>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 151, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <starlette.requests.Request object at 0x786d4ccaf920>
│ └ <function request_response..app..app at 0x786d4c798540>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d707abba0>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app..app at 0x786d4c798540>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 137, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x786d4ccaf920>
└ <function get_request_handler..app at 0x786d4c798f40>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 691, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x786d5ec9fba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 345, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'_auth': AuthContext(username='astrbot', scopes=['*'], api_key_id=None, via='jwt'), 'service': <astrbot.dashboard.services.c...
│ └ <function create_provider_in_source_by_id at 0x786d5ddce200>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/api/providers.py", line 180, in create_provider_in_source_by_id
await service.create_provider(
│ └ <function ProviderConfigService.create_provider at 0x786d5e86ac00>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/services/config_service.py", line 1629, in create_provider
await self.provider_manager.create_provider(config)
│ │ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ │ └ <function ProviderManager.create_provider at 0x786d6ba30900>
│ └ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 896, in create_provider
await self.load_provider(new_config)
│ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ └ <function ProviderManager.load_provider at 0x786d6ba30540>
└ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 601, in load_provider
provider_config["type"],
└ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct
What happened / 发生了什么
如图所示,增加新provider配置,准备填模型id时,点击保存,出现以下错误:
然后,点击取消:
之后点击保存配置,会突然出现没有”保存成功“的模型id。
Reproduce / 如何复现?
复现方法同What happened / 发生了什么,此处不再赘述
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
WSL
Astrbot 4.25.6
OS
Windows
Logs / 报错日志
[17:33:03.971] [Core] [INFO] [provider.manager:856]: Providers ['deepseek_1/deepseek-v4-flash'] were removed from configuration.
[17:33:28.603] [Core] [ERRO] [v4.26.7] [api.app:178]: Unhandled exception in dashboard API
Traceback (most recent call last):
File "/home/cyrene/fork/AstrBot/main.py", line 244, in
asyncio.run(main_async(args.webui_dir))
│ │ │ │ └ None
│ │ │ └ Namespace(webui_dir=None, reset_password=False)
│ │ └ <function main_async at 0x786d796f2700>
│ └ <function run at 0x786d7c7780e0>
└ <module 'asyncio' from '/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/init....
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
│ │ └ <coroutine object main_async at 0x786d5e8f3300>
│ └ <function Runner.run at 0x786d7c5b5620>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<main_async() running at /home/cyrene/fork/AstrBot/main.py:216> wait_for=<_GatheringFuture p...
│ │ └ <function BaseEventLoop.run_until_complete at 0x786d7c5b3240>
│ └ <_UnixSelectorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x786d7c5b31a0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x786d7c5b4fe0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
handle._run()
│ └ <function Handle._run at 0x786d7c706b60>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/asyncio/task_group.py", line 28, in _handle
await app(scope, receive, send, sync_spawn, call_soon)
│ │ │ │ │ └ <function TaskGroup.spawn_app.._call_soon at 0x786d4d4d4360>
│ │ │ │ └ functools.partial(<bound method BaseEventLoop.run_in_executor of <_UnixSelectorEventLoop running=True closed=False debug=Fals...
│ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <hypercorn.app_wrappers.ASGIWrapper object at 0x786d4e82be90>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/app_wrappers.py", line 34, in call
await self.app(scope, receive, send)
│ │ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <fastapi.applications.FastAPI object at 0x786d4f7b0440>
└ <hypercorn.app_wrappers.ASGIWrapper object at 0x786d4e82be90>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1163, in call
await super().call(scope, receive, send)
│ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
└ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/applications.py", line 90, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <bound method HTTPStream.app_send of <hypercorn.protocol.http_stream.HTTPStream object at 0x786d4cc52210>>
│ │ │ └ <bound method Queue.get of <Queue at 0x786d4ccaeff0 maxsize=10 tasks=2>>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.errors.ServerErrorMiddleware object at 0x786d4e86a1e0>
└ <fastapi.applications.FastAPI object at 0x786d4f7b0440>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/server.py", line 249, in dashboard_auth_middleware
return await call_next(request_)
│ └ <starlette.middleware.base._CachedRequest object at 0x786d4ccadb20>
└ <function BaseHTTPMiddleware.call..call_next at 0x786d4d4d6f20>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
│ │ │ │ └ <attribute 'context' of 'BaseException' objects>
│ │ │ └ KeyError('type')
│ │ └ <attribute 'cause' of 'BaseException' objects>
│ └ KeyError('type')
└ KeyError('type')
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ │ └ <starlette.requests.Request object at 0x786d4cbe6f60>
│ │ └ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <bound method APIRouter.app of <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>>
└ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2685, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d4eb153d0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1777, in _handle_selected
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d5ddd7530>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1786, in _handle_selected
await original_route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function APIRoute.handle at 0x786d5ecb8860>
└ APIRoute(path='/provider-sources/providers', name='create_provider_in_source_by_id', methods=['POST'])
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1265, in handle
await app(scope, receive, send)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app at 0x786d4c799620>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 151, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <starlette.requests.Request object at 0x786d4ccaf920>
│ └ <function request_response..app..app at 0x786d4c798540>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d707abba0>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app..app at 0x786d4c798540>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 137, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x786d4ccaf920>
└ <function get_request_handler..app at 0x786d4c798f40>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 691, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x786d5ec9fba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 345, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'_auth': AuthContext(username='astrbot', scopes=['*'], api_key_id=None, via='jwt'), 'service': <astrbot.dashboard.services.c...
│ └ <function create_provider_in_source_by_id at 0x786d5ddce200>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/api/providers.py", line 180, in create_provider_in_source_by_id
await service.create_provider(
│ └ <function ProviderConfigService.create_provider at 0x786d5e86ac00>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/services/config_service.py", line 1629, in create_provider
await self.provider_manager.create_provider(config)
│ │ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ │ └ <function ProviderManager.create_provider at 0x786d6ba30900>
│ └ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 896, in create_provider
await self.load_provider(new_config)
│ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ └ <function ProviderManager.load_provider at 0x786d6ba30540>
└ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 601, in load_provider
provider_config["type"],
└ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
KeyError: 'type'
[2026-07-26 17:33:28 +0800] [46864] [ERROR] Error in ASGI Framework
Traceback (most recent call last):
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/asyncio/task_group.py", line 28, in _handle
await app(scope, receive, send, sync_spawn, call_soon)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/hypercorn/app_wrappers.py", line 34, in call
await self.app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1163, in call
await super().call(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/applications.py", line 90, in call
await self.middleware_stack(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 193, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/server.py", line 249, in dashboard_auth_middleware
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2685, in app
await route.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1777, in _handle_selected
await route.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1786, in _handle_selected
await original_route.handle(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1265, in handle
await app(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 151, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 137, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 691, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 345, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/api/providers.py", line 180, in create_provider_in_source_by_id
await service.create_provider(
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/services/config_service.py", line 1629, in create_provider
await self.provider_manager.create_provider(config)
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 896, in create_provider
await self.load_provider(new_config)
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 601, in load_provider
provider_config["type"],
~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'type'
[17:33:28.644] [Core] [ERRO] [hypercorn.logging:115]: Error in ASGI Framework
Traceback (most recent call last):
File "/home/cyrene/fork/AstrBot/main.py", line 244, in
asyncio.run(main_async(args.webui_dir))
│ │ │ │ └ None
│ │ │ └ Namespace(webui_dir=None, reset_password=False)
│ │ └ <function main_async at 0x786d796f2700>
│ └ <function run at 0x786d7c7780e0>
└ <module 'asyncio' from '/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/init....
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
│ │ └ <coroutine object main_async at 0x786d5e8f3300>
│ └ <function Runner.run at 0x786d7c5b5620>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<main_async() running at /home/cyrene/fork/AstrBot/main.py:216> wait_for=<_GatheringFuture p...
│ │ └ <function BaseEventLoop.run_until_complete at 0x786d7c5b3240>
│ └ <_UnixSelectorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x786d5ddb8b60>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x786d7c5b31a0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x786d7c5b4fe0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
handle._run()
│ └ <function Handle._run at 0x786d7c706b60>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/server.py", line 249, in dashboard_auth_middleware
return await call_next(request_)
│ └ <starlette.middleware.base._CachedRequest object at 0x786d4ccadb20>
└ <function BaseHTTPMiddleware.call..call_next at 0x786d4d4d6f20>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
│ │ │ │ └ <attribute 'context' of 'BaseException' objects>
│ │ │ └ KeyError('type')
│ │ └ <attribute 'cause' of 'BaseException' objects>
│ └ KeyError('type')
└ KeyError('type')
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <starlette.middleware.base.BaseHTTPMiddleware object at 0x786d4ec4f440>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x786d705c9440>
│ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ │ └ <starlette.requests.Request object at 0x786d4cbe6f60>
│ │ └ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x786d4e86a1b0>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x786d4e86a180>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <bound method APIRouter.app of <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>>
└ <fastapi.routing.APIRouter object at 0x786d4ecf6ba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2685, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d4eb153d0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d4eb153d0>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1777, in _handle_selected
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter.handle at 0x786d5ecba7a0>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1766, in handle
await self.original_router.handle(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <function APIRouter.handle at 0x786d5eae0720>
│ └ <fastapi.routing.APIRouter object at 0x786d5ddd7530>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 2740, in handle
await included_router._handle_selected(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function _IncludedRouter._handle_selected at 0x786d5ecba840>
└ _IncludedRouter(original_router=<fastapi.routing.APIRouter object at 0x786d5ddd7530>, include_context=_RouterIncludeContext(i...
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1786, in _handle_selected
await original_route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ └ <function APIRoute.handle at 0x786d5ecb8860>
└ APIRoute(path='/provider-sources/providers', name='create_provider_in_source_by_id', methods=['POST'])
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 1265, in handle
await app(scope, receive, send)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app at 0x786d4c799620>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 151, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d4cd87d80>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ │ │ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
│ │ └ <starlette.requests.Request object at 0x786d4ccaf920>
│ └ <function request_response..app..app at 0x786d4c798540>
└ <function wrap_app_handling_exceptions at 0x786d73db09a0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x786d707abba0>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x786d4d4d7ce0>
│ └ {'type': 'http', 'http_version': '1.1', 'asgi': {'spec_version': '2.1', 'version': '3.0'}, 'method': 'POST', 'scheme': 'http'...
└ <function request_response..app..app at 0x786d4c798540>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 137, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x786d4ccaf920>
└ <function get_request_handler..app at 0x786d4c798f40>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 691, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x786d5ec9fba0>
File "/home/cyrene/fork/AstrBot/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 345, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'_auth': AuthContext(username='astrbot', scopes=['*'], api_key_id=None, via='jwt'), 'service': <astrbot.dashboard.services.c...
│ └ <function create_provider_in_source_by_id at 0x786d5ddce200>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/api/providers.py", line 180, in create_provider_in_source_by_id
await service.create_provider(
│ └ <function ProviderConfigService.create_provider at 0x786d5e86ac00>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/dashboard/services/config_service.py", line 1629, in create_provider
await self.provider_manager.create_provider(config)
│ │ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ │ └ <function ProviderManager.create_provider at 0x786d6ba30900>
│ └ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
└ <astrbot.dashboard.services.config_service.ProviderConfigService object at 0x786d4ecf7320>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 896, in create_provider
await self.load_provider(new_config)
│ │ └ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
│ └ <function ProviderManager.load_provider at 0x786d6ba30540>
└ <astrbot.core.provider.manager.ProviderManager object at 0x786d5dbebf50>
File "/home/cyrene/fork/AstrBot/astrbot/core/provider/manager.py", line 601, in load_provider
provider_config["type"],
└ {'id': 'deepseek_1/deepseek-v4-flash', 'enable': True, 'provider_source_id': 'deepseek_1', 'model': 'deepseek-v4-flash', 'mod...
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct