mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-23 04:09:49 +00:00
fix(alicode-intl): split into Coding Plan + Model Studio providers
8b9cac1 swapped alicode-intl to the DashScope compatible-mode endpoint to
fix #2591 for standard DashScope keys, but that broke Coding Plan keys
(sk-sp-...) which only work on coding-intl.dashscope.aliyuncs.com. The two
key types use two different hosts and are not interchangeable.
- alicode-intl: revert to coding-intl endpoint (Coding Plan keys)
- alims-intl: new provider for dashscope-intl/compatible-mode (standard keys)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c4a120af8f
commit
55628eea02
@@ -620,10 +620,13 @@ async function testApiKeyConnection(connection, effectiveProxy = null) {
|
||||
return { valid, error: valid ? null : "Invalid API key" };
|
||||
}
|
||||
case "alicode":
|
||||
case "alicode-intl": {
|
||||
// Aliyun Coding Plan uses OpenAI-compatible API
|
||||
case "alicode-intl":
|
||||
case "alims-intl": {
|
||||
// Aliyun Coding Plan uses OpenAI-compatible API; alims-intl uses Model Studio compatible-mode
|
||||
const aliBaseUrl = connection.provider === "alicode-intl"
|
||||
? "https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions"
|
||||
: connection.provider === "alims-intl"
|
||||
? "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions"
|
||||
: "https://coding.dashscope.aliyuncs.com/v1/chat/completions";
|
||||
const res = await fetchWithConnectionProxy(aliBaseUrl, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user