From 24335485bfb13d20e3dd7512f0ab9dac29d96627 Mon Sep 17 00:00:00 2001 From: Billy Bao Date: Wed, 5 Nov 2025 17:32:12 +0800 Subject: [PATCH] Fix: get_allowed_llm_factories() return type (#11031) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What problem does this PR solve? Fix: get_allowed_llm_factories() return type #11003 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) 截图 2025-11-05 17-02-01 --- api/utils/api_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/utils/api_utils.py b/api/utils/api_utils.py index 898052447..fb1d06f5b 100644 --- a/api/utils/api_utils.py +++ b/api/utils/api_utils.py @@ -626,8 +626,8 @@ async def is_strong_enough(chat_model, embedding_model): def get_allowed_llm_factories() -> list: - factories = LLMFactoriesService.get_all() + factories = list(LLMFactoriesService.get_all()) if settings.ALLOWED_LLM_FACTORIES is None: - return list(factories) + return factories return [factory for factory in factories if factory.name in settings.ALLOWED_LLM_FACTORIES]