refactor: rename provider to alicode (Aliyun Coding)

Rename alicloud to alicode to clearly indicate Aliyun's Coding Plan service.

- Provider ID: alicode (short for Aliyun Coding)
- Model format: alicode/qwen3.5-plus
- Simplified mapping - no more bidirectional aliases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
BiuBiu_Hu 2026-02-26 08:01:53 +08:00
parent b0ec81f4a5
commit d14c18f77f
9 changed files with 13 additions and 20 deletions

View file

@ -72,7 +72,7 @@ const PROVIDER_MODELS_CONFIG = {
authHeader: "x-api-key",
parseResponse: (data) => data.data || []
},
alicloud: {
alicode: {
url: "https://coding.dashscope.aliyuncs.com/v1/models",
method: "GET",
headers: { "Content-Type": "application/json" },

View file

@ -464,7 +464,7 @@ async function testApiKeyConnection(connection) {
return { valid, error: valid ? null : "Invalid API key" };
}
case "alicloud": {
case "alicode": {
// 阿里云百炼 Coding Plan uses OpenAI-compatible API
const res = await fetch("https://coding.dashscope.aliyuncs.com/v1/chat/completions", {
method: "POST",

View file

@ -103,19 +103,19 @@ export async function POST(request) {
case "kimi":
case "minimax":
case "minimax-cn":
case "alicloud": {
case "alicode": {
const claudeBaseUrls = {
glm: "https://api.z.ai/api/anthropic/v1/messages",
"glm-cn": "https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",
kimi: "https://api.kimi.com/coding/v1/messages",
minimax: "https://api.minimax.io/anthropic/v1/messages",
"minimax-cn": "https://api.minimaxi.com/anthropic/v1/messages",
alicloud: "https://coding.dashscope.aliyuncs.com/v1/chat/completions",
alicode: "https://coding.dashscope.aliyuncs.com/v1/chat/completions",
};
// glm-cn and alicloud use OpenAI format
if (provider === "glm-cn" || provider === "alicloud") {
const testModel = provider === "alicloud" ? "qwen3.5-plus" : "glm-4.7";
// glm-cn and alicode use OpenAI format
if (provider === "glm-cn" || provider === "alicode") {
const testModel = provider === "alicode" ? "qwen3.5-plus" : "glm-4.7";
const glmCnRes = await fetch(claudeBaseUrls[provider], {
method: "POST",
headers: {