fix: correct Tongyi-Qianwen international endpoint typo (compatible-model -> compatible-mode) (#17887)

## Summary
- `api/apps/services/provider_api_service.py` hardcoded the DashScope
international base URL for Tongyi-Qianwen as `.../compatible-model/v1`
instead of `.../compatible-mode/v1`, in two places (`list_providers`,
lines ~93 and ~116).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mage Lu
2026-08-05 20:37:45 +08:00
committed by GitHub
parent 14b943a04a
commit d9d75690de

View File

@@ -90,7 +90,7 @@ def list_providers(tenant_id: str, all_available: bool = False):
if factory_info["name"].lower() == "siliconflow":
provider["url"]["intl"] = factory_info_map.get("siliconflow_intl", {}).get("url", "https://api.siliconflow.com/v1")
elif factory_info["name"] == "Tongyi-Qianwen":
provider["url"]["intl"] = "https://dashscope-intl.aliyuncs.com/compatible-model/v1"
provider["url"]["intl"] = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
providers.append(provider)
providers.sort(key=lambda x: (factory_rank_mapping.get(x["name"]), x["name"]))
return True, providers
@@ -113,7 +113,7 @@ def list_providers(tenant_id: str, all_available: bool = False):
if factory_info["name"].lower() == "siliconflow":
provider["url"]["intl"] = factory_info_map.get("siliconflow_intl", {}).get("url", "https://api.siliconflow.com/v1")
elif factory_info["name"] == "Tongyi-Qianwen":
provider["url"]["intl"] = "https://dashscope-intl.aliyuncs.com/compatible-model/v1"
provider["url"]["intl"] = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
providers.append(provider)
providers.sort(key=lambda x: (factory_rank_mapping.get(x["name"]), x["name"]))
return True, providers