From 1a6307a34d02a0a50cd8a25b7de53ed3d8fd4946 Mon Sep 17 00:00:00 2001 From: wenmengzhou Date: Tue, 22 Jul 2025 15:28:25 +0800 Subject: [PATCH] feat: update models to qwen3-coder series and optimize routing - Replace qwen3-235b-a22b with qwen3-coder-plus and qwen3-coder-flash - Optimize router configuration for different scenarios: - default/think/longContext: use qwen3-coder-plus (stronger model) - background: use qwen3-coder-flash (faster model) - Update test cases to validate new model configurations - Ensure all routing configurations work correctly --- __tests__/claude-code-router-config.test.js | 9 +++++++++ bin/claude-code-router-config.js | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/__tests__/claude-code-router-config.test.js b/__tests__/claude-code-router-config.test.js index d517a2f..4e75ef5 100644 --- a/__tests__/claude-code-router-config.test.js +++ b/__tests__/claude-code-router-config.test.js @@ -189,6 +189,15 @@ describe("ClaudeCodeRouterConfig", () => { expect(configContent).toHaveProperty("Router"); expect(configContent.transformers).toHaveLength(1); expect(configContent.Providers).toHaveLength(1); + + // Check models configuration + expect(configContent.Providers[0].models).toEqual(["qwen3-coder-plus", "qwen3-coder-flash"]); + + // Check router configuration + expect(configContent.Router.default).toBe("dashscope,qwen3-coder-plus"); + expect(configContent.Router.think).toBe("dashscope,qwen3-coder-plus"); + expect(configContent.Router.background).toBe("dashscope,qwen3-coder-flash"); + expect(configContent.Router.longContext).toBe("dashscope,qwen3-coder-plus"); }); }); diff --git a/bin/claude-code-router-config.js b/bin/claude-code-router-config.js index cd88fbd..2cd2be1 100755 --- a/bin/claude-code-router-config.js +++ b/bin/claude-code-router-config.js @@ -186,17 +186,17 @@ class ClaudeCodeRouterConfig { api_base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions", api_key: dashscopeApiKey, - models: ["qwen3-235b-a22b"], + models: ["qwen3-coder-plus", "qwen3-coder-flash"], transformer: { use: ["dashscope"], }, }, ], Router: { - default: "dashscope,qwen3-235b-a22b", - think: "dashscope,qwen3-235b-a22b", - background: "dashscope,qwen3-235b-a22b", - longContext: "dashscope,qwen3-235b-a22b", + default: "dashscope,qwen3-coder-plus", + think: "dashscope,qwen3-coder-plus", + background: "dashscope,qwen3-coder-flash", + longContext: "dashscope,qwen3-coder-plus", }, };