适合谁
- 不想付 Cursor 订阅 20-60 美金/月的独立开发者
- 已有 Anthropic / OpenAI API key 或愿意走中转
- 在 VS Code / JetBrains 写代码,不愿换 IDE
- 月 token 预计 30-60M 区间
前置条件:
- VS Code 1.85+ 或 JetBrains 2024.3+
- Anthropic / OpenAI API key 或一家 LLM 中转方的 key
- (可选)自托管 OneAPI / litellm 做多 key 聚合
装 Continue 插件
VS Code:Marketplace 搜「Continue」装最新版(2026-05 stable 是 v0.9+)。JetBrains:Plugin Marketplace 搜「Continue」同样装。
装完后 IDE 右下角出现 Continue 图标,点开侧边栏。
配置 config.yaml
第一次打开 Continue 会让你选模型源。Solopreneur 推荐直接编辑 config.yaml(位置 ~/.continue/config.yaml)。
基础配置(自带 Anthropic key)
models:
- title: Claude Opus 4.7
provider: anthropic
model: claude-opus-4-7
apiKey: sk-ant-xxx
- title: Claude Sonnet 4.6
provider: anthropic
model: claude-sonnet-4-6
apiKey: sk-ant-xxx
- title: Haiku 4.5 Tab
provider: anthropic
model: claude-haiku-4-5
apiKey: sk-ant-xxx
roles:
- autocomplete
走中转 baseURL(推荐 Solopreneur)
models:
- title: Claude Opus 4.7 (Relay)
provider: anthropic
model: claude-opus-4-7
apiBase: https://中转方域名/v1
apiKey: sk-中转方key
Solopreneur 国内访问官方 Anthropic 不稳,把 baseURL 改到一家主推 GPT-5.5 / Claude 4.7 的低价 API 中转,免外卡 + 多模型聚合,一个 key 在 Continue / Cursor / Claude Code 通用,月对账清晰。
模型分级配置
Continue 2026-04 后支持按 role 自动路由:
models:
- title: Tab 补全
provider: anthropic
model: claude-haiku-4-5
roles:
- autocomplete
- title: Chat 简单
provider: openai
model: gpt-5-mini
roles:
- chat
- title: Composer 重写
provider: anthropic
model: claude-sonnet-4-6
roles:
- edit
- title: Agent 多步
provider: anthropic
model: claude-opus-4-7
roles:
- apply
不同 role 自动选模型,Solopreneur 不需要手动切换。
开启 prompt caching
Anthropic 原生支持 caching,Continue 2026-04 后默认开启。手动确认:
models:
- title: Claude Opus 4.7
provider: anthropic
model: claude-opus-4-7
apiKey: sk-ant-xxx
enableCaching: true
Caching 命中后 cache hit 部分 token 成本降到原价 10%(Anthropic 官方 ratio)。Solopreneur 月 token 30M,caching 平均节省 30-40%,月省 20-50 美金。
跨地区使用 / 环境检查
国内访问
直连 api.anthropic.com / api.openai.com 在国内 P50 延迟 800ms+,慢。走中转可压到 200-400ms。Continue 配置 apiBase 后无需 VPN,IDE 直接打中转。
环境检查清单
- ~/.continue/config.yaml 语法正确(用 yaml lint)
- API key 单月限额已设
- Tab 补全模型是 Haiku 4.5 而不是 Opus(成本差 20 倍)
- prompt caching 已开启
- 模型切换器顶部能看到 4 档
月预算样例(访问于 2026-05-20)
| 项 | 月消耗 | 月成本(中转加价 15%) |
|---|---|---|
| Tab 补全(Haiku 4.5) | 5M | ≈ $4-7 |
| Chat 简单(GPT-5-mini) | 8M | ≈ $15-25 |
| Composer 重写(Sonnet 4.6) | 12M | ≈ $40-60 |
| Agent 多步(Opus 4.7) | 8M | ≈ $50-80 |
| 月总计 | ~33M | 10-170 |
caching 命中 30% 后实际 80-130 美金/月。
协作小坑
多人共用一个仓库
- 每人独立 ~/.continue/config.yaml
- API key 不要 commit 到仓库
- 用 .continueignore 排除敏感目录
config.yaml 团队同步
- 把 config 模板(去 apiKey)commit 到仓库 .continue.template.yaml
- README 写「新人 cp .continue.template.yaml ~/.continue/config.yaml」
- 大版本升级一起做
多模型差异化
- Tab 补全用 Haiku 不要用 Opus(性价比悬殊 20 倍)
- Chat 简单用 GPT-5-mini 不要用 Opus
- Composer 重写默认 Sonnet,复杂时手动切 Opus