Private
Public Access
0
0

fix(qwen): align with dashscope 1.25.21 API; remove InvalidApiKey monkey-patch

This commit is contained in:
2026-06-11 01:26:53 -04:00
parent b75f60c3fe
commit de5e106234
3 changed files with 8 additions and 6 deletions
+4
View File
@@ -2390,6 +2390,10 @@ def _ensure_qwen_client() -> None:
if not api_key:
raise ValueError("Qwen API key not found in credentials.toml")
_qwen_region = creds.get("qwen", {}).get("region", "china")
if _qwen_region == "international":
dashscope.base_http_api_url = "https://dashscope-intl.aliyuncs.com/api/v1"
else:
dashscope.base_http_api_url = "https://dashscope.aliyuncs.com/api/v1"
dashscope.api_key = api_key
_qwen_client = dashscope.Generation