From b8de508dbc546641fa8b6b97e80053af0b77d8d5 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 27 Sep 2026 21:14:47 +0200 Subject: [PATCH] fix: keep arena model access after editing it in Settings > Models (#31309) Saving an arena model in Admin Settings > Models (for example to set default tools or capabilities) creates a model entry with the arena id. That entry replaced the arena model's metadata wholesale, dropping the access grants, model_ids and filter_mode configured in Admin Settings > Evaluations. From then on every non-admin user lost the arena model, even when it was public, and chats through it ignored the configured model pool. The override now keeps those three keys from the evaluation config, which is where arena access and the model pool are managed. Everything else set in Settings > Models (tools, capabilities, description, profile image) still applies. Verified end to end on base and patched: after the override a user sees and can chat with a public arena model (base: hidden, 400), private arena models stay hidden, and 20 admin chats all route to the configured pool (base: spread across all models). Fixes #29564 --- backend/open_webui/utils/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/open_webui/utils/models.py b/backend/open_webui/utils/models.py index 0bd933115b..bba1729a44 100644 --- a/backend/open_webui/utils/models.py +++ b/backend/open_webui/utils/models.py @@ -182,8 +182,18 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None) if model: if custom_model.is_active: + arena_meta = model['info']['meta'] if model.get('arena') else None model['name'] = custom_model.name model['info'] = custom_model.model_dump() + if arena_meta: + # Evaluation config owns arena access grants and model_ids + model['info']['meta'].update( + { + key: arena_meta[key] + for key in ('access_grants', 'model_ids', 'filter_mode') + if key in arena_meta + } + ) schema = get_chat_variables_schema(custom_model.params.model_dump().get('system')) if schema: model['info'].setdefault('meta', {})['chat_variables_schema'] = schema