From 51b180d991fce9c48aa798674d0916d4f0529757 Mon Sep 17 00:00:00 2001 From: Yuxing Deng Date: Fri, 27 Feb 2026 20:13:07 +0800 Subject: [PATCH] fix: adding GPUStack chat model requires v1 suffix (#13237) ### What problem does this PR solve? Refer to issue: #13236 The base url for GPUStack chat model requires `/v1` suffix. For the other model type like `Embedding` or `Rerank`, the `/v1` suffix is not required and will be appended in code. So keep the same logic for chat model as other model type. ### Type of change - [X] Bug Fix (non-breaking change which fixes an issue) --- rag/llm/chat_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py index 6575bf633a..e763fca53a 100644 --- a/rag/llm/chat_model.py +++ b/rag/llm/chat_model.py @@ -1634,7 +1634,7 @@ class LiteLLMBase(ABC): elif self.provider == SupportedLiteLLMProvider.GPUStack: completion_args.update( { - "api_base": self.base_url, + "api_base": urljoin(self.base_url, "v1"), } ) elif self.provider == SupportedLiteLLMProvider.Azure_OpenAI: