From c827aeaab231dd5de8bcb9839293aa80b249c28b Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Tue, 2 Sep 2025 04:18:16 +0800 Subject: [PATCH] feat(code): add 'modelscope' to CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS and define its API base URL - Updated CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS to include 'modelscope'. - Added API base URL configuration for 'modelscope' under the anthropic provider settings. --- src/renderer/src/pages/code/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/pages/code/index.ts b/src/renderer/src/pages/code/index.ts index 8ea7423b4f..99e311bdbc 100644 --- a/src/renderer/src/pages/code/index.ts +++ b/src/renderer/src/pages/code/index.ts @@ -23,7 +23,7 @@ export const CLI_TOOLS = [ ] export const GEMINI_SUPPORTED_PROVIDERS = ['aihubmix', 'dmxapi', 'new-api'] -export const CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS = ['deepseek', 'moonshot', 'zhipu', 'dashscope'] +export const CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS = ['deepseek', 'moonshot', 'zhipu', 'dashscope', 'modelscope'] export const CLAUDE_SUPPORTED_PROVIDERS = ['aihubmix', 'dmxapi', 'new-api', ...CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS] // Provider 过滤映射 @@ -62,6 +62,11 @@ export const getCodeToolsApiBaseUrl = (model: Model, type: EndpointType) => { anthropic: { api_base_url: 'https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy' } + }, + modelscope: { + anthropic: { + api_base_url: 'https://api-inference.modelscope.cn' + } } }