From 5a8fbc5a81b79bda80a1ad89b8c63eb4c82aaf53 Mon Sep 17 00:00:00 2001 From: Billy Bao Date: Thu, 6 Nov 2025 18:54:13 +0800 Subject: [PATCH] Fix: Can't add more models (#11076) ### What problem does this PR solve? Currently we cannot add any models, since factory is a string, and the return type of get_allowed_llm_factories() is List[object] https://github.com/infiniflow/ragflow/pull/11003 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/llm_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py index 3d9be95f7..97bc487d7 100644 --- a/api/apps/llm_app.py +++ b/api/apps/llm_app.py @@ -128,7 +128,7 @@ def add_llm(): api_key = req.get("api_key", "x") llm_name = req.get("llm_name") - if factory not in get_allowed_llm_factories(): + if factory not in [f.name for f in get_allowed_llm_factories()]: return get_data_error_result(message=f"LLM factory {factory} is not allowed") def apikey_json(keys):