feat: add Alibaba Cloud Coding Plan support

Add support for Alibaba Cloud Bailian Coding Plan, a coding-focused AI service
that provides fixed monthly pricing for multiple models.

Changes:
- Add alicloud provider with OpenAI-compatible API endpoint
- Support 8 models: qwen3.5-plus, kimi-k2.5, glm-5, MiniMax-M2.5,
  qwen3-max, qwen3-coder-next, qwen3-coder-plus, glm-4.7
- Use "ali" as provider alias (ali/model format)
- Add API key validation and connection testing
- Add frontend provider definition with "ALi" text icon

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
BiuBiu_HuandClaude Opus 4.5 committed 2026-02-26 07:58:40 +08:00
1 parent f933dd9c61
commit b0ec81f4a5
8 files changed
+60 -5

No files matched your search

@@ -71,6 +71,14 @@ const PROVIDER_MODELS_CONFIG = {
},
authHeader: "x-api-key",
parseResponse: (data) => data.data || []
},
alicloud: {
url: "https://coding.dashscope.aliyuncs.com/v1/models",
method: "GET",
headers: { "Content-Type": "application/json" },
authHeader: "Authorization",
authPrefix: "Bearer ",
parseResponse: (data) => data.data || []
}
};
+18
View File
@@ -464,6 +464,24 @@ async function testApiKeyConnection(connection) {
return { valid, error: valid ? null : "Invalid API key" };
}
case "alicloud": {
// 阿里云百炼 Coding Plan uses OpenAI-compatible API
const res = await fetch("https://coding.dashscope.aliyuncs.com/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${connection.apiKey}`,
"content-type": "application/json",
},
body: JSON.stringify({
model: "qwen3.5-plus",
max_tokens: 1,
messages: [{ role: "user", content: "test" }],
}),
});
const valid = res.status !== 401 && res.status !== 403;
return { valid, error: valid ? null : "Invalid API key" };
}
case "deepseek": {
const res = await fetch("https://api.deepseek.com/models", {
headers: { Authorization: `Bearer ${connection.apiKey}` },