Windsurf 配置指南
Windsurf 是 Codeium 出品的 AI 代码编辑器(基于 VS Code),支持通过 BYOK(Bring Your Own Key)接入自定义 API。
配置步骤
1. 打开设置
菜单栏 → Windsurf → Settings(macOS)
或快捷键 Cmd+,(macOS)/ Ctrl+,(Windows/Linux)
2. 进入 API Key 配置
左侧导航选择 Windsurf Settings → Cascade → API Keys
3. 填写 Anthropic 配置
在 Anthropic API Key 一栏填入您的 Inkess Token:
your-token-here
然后在 Anthropic Base URL 填入:
https://llm.starapp.net/api/llm
部分版本的 Windsurf 不支持修改 Base URL,此时参考下方 OpenAI 兼容方式。
4. 使用 OpenAI 兼容协议(备选)
如果 Anthropic 方式不可用,使用 OpenAI 兼容端点:
在 OpenAI API Key 填入 Token,OpenAI Base URL 填入:
https://llm.starapp.net/api/llm/v1
然后在模型选择中填写 claude-sonnet-4-6 等模型 ID。
验证配置
在编辑器中打开 Cascade 面板(右侧边栏),发送一条消息,看到响应则配置成功。
常见问题
Q:填入 API Key 后提示「Invalid Key」 A:Windsurf 会向 Anthropic 官方验证 Key 格式,若格式不兼容,请改用 OpenAI 兼容方式。
Q:模型选不到 Claude A:确认已在 Windsurf Settings 中启用了 BYOK 模式,并重启编辑器。
Q:可用模型 ID 有哪些? A:见模型列表。