From 06859104e8d866af043085e3c186578251644312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=B3=E8=99=8E?= Date: Wed, 18 Mar 2026 03:11:21 +0800 Subject: [PATCH] fix: apply base_url to GoogleClient LLM instance --- tradingagents/llm_clients/google_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tradingagents/llm_clients/google_client.py b/tradingagents/llm_clients/google_client.py index a1bd386b..dd15b900 100644 --- a/tradingagents/llm_clients/google_client.py +++ b/tradingagents/llm_clients/google_client.py @@ -38,6 +38,10 @@ class GoogleClient(BaseLLMClient): """Return configured ChatGoogleGenerativeAI instance.""" llm_kwargs = {"model": self.model} + # Apply base_url if configured (for v1beta endpoint support) + if self.base_url: + llm_kwargs["api_endpoint"] = self.base_url + for key in ("timeout", "max_retries", "google_api_key", "callbacks"): if key in self.kwargs: llm_kwargs[key] = self.kwargs[key]