From 9a269ec8abc930ed45ff6a7803664d5f9131c44f Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 8 Mar 2026 02:02:59 +0100 Subject: [PATCH] fix: use path converter for model ID routes in analytics to support slashes (#22382) --- backend/open_webui/routers/analytics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/analytics.py b/backend/open_webui/routers/analytics.py index 61aec6633..1bd12f7bd 100644 --- a/backend/open_webui/routers/analytics.py +++ b/backend/open_webui/routers/analytics.py @@ -278,7 +278,7 @@ class ModelChatsResponse(BaseModel): total: int -@router.get("/models/{model_id}/chats", response_model=ModelChatsResponse) +@router.get("/models/{model_id:path}/chats", response_model=ModelChatsResponse) async def get_model_chats( model_id: str, start_date: Optional[int] = Query(None), @@ -367,7 +367,7 @@ class ModelOverviewResponse(BaseModel): tags: list[TagEntry] -@router.get("/models/{model_id}/overview", response_model=ModelOverviewResponse) +@router.get("/models/{model_id:path}/overview", response_model=ModelOverviewResponse) async def get_model_overview( model_id: str, days: int = Query(30, description="Number of days of history (0 for all)"),