Cline 配置
Cline 是一款流行的 VS Code AI 编码插件(前身为 Claude Dev)。通过 OfoxAI 接入,可以使用多种模型。
配置步骤
1. 安装 Cline
在 VS Code 扩展市场搜索 Cline 并安装。
2. 选择 API Provider
- 打开 Cline 侧边栏
- 点击设置图标
- 在 API Provider 选择 OpenAI Compatible
3. 填写配置
| 配置项 | 值 |
|---|---|
| Base URL | https://api.ofox.ai/v1 |
| API Key | 你的 OfoxAI API Key |
| Model ID | anthropic/claude-sonnet-4.5 |
也可以选择 Anthropic 作为 Provider,将 Base URL 设置为 https://api.ofox.ai/anthropic。这样可以使用 Anthropic 原生协议的全部功能。
使用 Anthropic Provider(推荐)
如果主要使用 Claude 模型,推荐选择 Anthropic Provider:
| 配置项 | 值 |
|---|---|
| API Provider | Anthropic |
| Base URL | https://api.ofox.ai/anthropic |
| API Key | 你的 OfoxAI API Key |
| Model | anthropic/claude-sonnet-4.5 |
推荐模型
| 场景 | 模型 | 说明 |
|---|---|---|
| 日常编码 | anthropic/claude-sonnet-4.5 | 代码能力均衡 |
| 复杂重构 | anthropic/claude-opus-4.6 | 深度理解和推理 |
| 快速问答 | openai/gpt-4o-mini | 快速响应 |
| 长文件分析 | google/gemini-2.5-flash | 大上下文窗口 |
常见问题
Q: 提示模型不支持
确认模型 ID 格式正确,包含 provider/ 前缀。
Q: 无法使用 Tool Use 功能
使用 Anthropic Provider 配置可以获得完整的 Tool Use 支持。