fix(llms/vllm): honor VLLM_BASE_URL instead of always using localhost (#6897)

This commit is contained in:
Kartik
2026-08-14 16:49:18 +05:30
committed by GitHub
parent 96d45b78c7
commit c883f52130
3 changed files with 57 additions and 3 deletions
+1 -2
View File
@@ -37,8 +37,7 @@ class VllmLLM(LLMBase):
self.config.model = "Qwen/Qwen2.5-32B-Instruct"
self.config.api_key = self.config.api_key or os.getenv("VLLM_API_KEY") or "vllm-api-key"
base_url = self.config.vllm_base_url or os.getenv("VLLM_BASE_URL")
self.client = OpenAI(api_key=self.config.api_key, base_url=base_url)
self.client = OpenAI(api_key=self.config.api_key, base_url=self.config.vllm_base_url)
def _parse_response(self, response, tools):
"""