Compare commits

...

2 Commits

Author SHA1 Message Date
Yudi Hertanto 06aa2bce55
Update cli/utils.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-25 14:44:39 +07:00
Yudi Hertanto 978db49f5d
Update tradingagents/llm_clients/zai_client.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-25 14:44:30 +07:00
2 changed files with 5 additions and 3 deletions

View File

@ -269,7 +269,7 @@ def select_llm_provider() -> tuple[str, str]:
("Google", "https://generativelanguage.googleapis.com/v1"),
("Anthropic", "https://api.anthropic.com/"),
("xAI", "https://api.x.ai/v1"),
("Z.AI", "zai", "https://api.z.ai/api/coding/paas/v4"),
("Zai", "https://api.z.ai/api/coding/paas/v4"),
("Openrouter", "https://openrouter.ai/api/v1"),
("Ollama", "http://localhost:11434/v1"),
]

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",