Update tradingagents/llm_clients/zai_client.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Yudi Hertanto 2026-03-25 14:44:30 +07:00 committed by GitHub
parent c9e1675150
commit 978db49f5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -22,14 +22,16 @@ class ZAIClient(BaseLLMClient):
"base_url": self.base_url or self.DEFAULT_BASE_URL,
}
api_key = os.environ.get("ZAI_API_KEY")
api_key = self.kwargs.get("api_key")
if api_key is None:
api_key = os.environ.get("ZAI_API_KEY")
if api_key:
llm_kwargs["api_key"] = api_key
for key in (
"timeout",
"max_retries",
"api_key",
"callbacks",
"http_client",
"http_async_client",