diff --git a/src/renderer/src/config/providers.ts b/src/renderer/src/config/providers.ts index 0008013af..db3d65e30 100644 --- a/src/renderer/src/config/providers.ts +++ b/src/renderer/src/config/providers.ts @@ -419,7 +419,7 @@ export const SYSTEM_PROVIDERS_CONFIG: Record = type: 'openai', apiKey: '', apiHost: 'https://dashscope.aliyuncs.com/compatible-mode/v1/', - anthropicApiHost: 'https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy', + anthropicApiHost: 'https://dashscope.aliyuncs.com/apps/anthropic', models: SYSTEM_MODELS.dashscope, isSystem: true, enabled: false diff --git a/src/renderer/src/pages/code/index.ts b/src/renderer/src/pages/code/index.ts index 152904373..b2ddeb9d6 100644 --- a/src/renderer/src/pages/code/index.ts +++ b/src/renderer/src/pages/code/index.ts @@ -72,7 +72,7 @@ export const getCodeToolsApiBaseUrl = (model: Model, type: EndpointType) => { }, dashscope: { anthropic: { - api_base_url: 'https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy' + api_base_url: 'https://dashscope.aliyuncs.com/apps/anthropic' } }, modelscope: { diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 19346dace..b54967a2e 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -2728,6 +2728,11 @@ const migrateConfig = { preset.settings.toolUseMode = DEFAULT_ASSISTANT_SETTINGS.toolUseMode } }) + // 更新阿里云百炼的 Anthropic API 地址 + const dashscopeProvider = state.llm.providers.find((provider) => provider.id === 'dashscope') + if (dashscopeProvider) { + dashscopeProvider.anthropicApiHost = 'https://dashscope.aliyuncs.com/apps/anthropic' + } return state } catch (error) { logger.error('migrate 166 error', error as Error)