桌面端网关配置指南
通过 AICodeMirror 轻松实现在 Claude App 中切换自定义模型
1 环境准备
- Windows 10/11 系统
- 已安装 Git
- 拥有管理员权限的 PowerShell
2 配置步骤
1. 完全关闭 Claude App
打开任务管理器,确认所有 claude.exe 进程已结束。
2. 找到配置文件
在资源管理器地址栏输入(替换“你的用户”):
C:\users\你的用户\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude-3p\claude_desktop_config.json
3. 写入中转配置
{
"deploymentMode": "3p",
"enterpriseConfig": {
"disableAutoUpdates": true,
"disableNonessentialServices": true,
"deploymentOrganizationUuid": "00000000-0000-4000-8000-000000000001",
"disableNonessentialTelemetry": true,
"inferenceProvider": "gateway",
"inferenceModels": ["claude-opus-4-6", "claude-sonnet-4-6"],
"disableEssentialTelemetry": true,
"inferenceGatewayBaseUrl": "https://api.aicodemirror.com/api/claudecode",
"inferenceGatewayApiKey": "替换为你的密钥",
"inferenceGatewayAuthScheme": "auto"
},
"_cfprefsMigrated": true,
"preferences": {
"coworkScheduledTasksEnabled": true,
"ccdScheduledTasksEnabled": false,
"sidebarMode": "task",
"coworkWebSearchEnabled": true
}
}
故障排查:Virtual Machine Platform
如果提示虚拟机平台不可用,请以管理员身份运行以下 PowerShell 命令:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart dism.exe /online /enable-feature /featurename:HypervisorPlatform /all /norestart bcdedit /set hypervisorlaunchtype auto shutdown /r /t 0
1 环境准备
- macOS 或主流 Linux 系统
- 已安装 Git
- 能够编辑本地 JSON 配置文件
2 配置步骤
1. 完全退出 Claude App
确认菜单栏或 Activity Monitor 中已无进程运行。
2. 配置文件路径
~/Library/Application Support/Claude-3p/claude_desktop_config.json
3. 写入中转配置
{
"enterpriseConfig": {
"inferenceProvider": "gateway",
"inferenceGatewayBaseUrl": "https://api.aicodemirror.com/api/claudecode",
"inferenceGatewayApiKey": "替换为你的密钥",
"inferenceGatewayAuthScheme": "auto",
"disableAutoUpdates": true,
"disableEssentialTelemetry": true,
"disableNonessentialTelemetry": true,
"disableNonessentialServices": true,
"inferenceModels": ["claude-opus-4-6", "claude-sonnet-4-6"],
"deploymentOrganizationUuid": "00000000-0000-4000-8000-000000000001"
}
}
💡 首次启动重要提醒
如果启动时停在 Setting up Claude's workspace..., 这通常是因为正在拉取必要的 VM/rootfs 资源。
解决方法: 请临时切换到能直接访问外网的网络环境,完成首次下载(拉取 downloads.claude.ai 资源)后,即可切换回常用网络。