Continue.dev 集成
VS Code / JetBrains AI 助手通过 config.yaml(或旧版 config.json)接入本平台 —— 聊天、自动补全、Embeddings 同一把 Key
Continue 是 VS Code / JetBrains 的开源 AI 助手。较新版本通过
~/.continue/config.yaml配置多模型 provider;旧版本使用~/.continue/config.json。两种格式本页都给出示例。
安装#
VS Code 装 Continue 插件,或 JetBrains 装 Continue plugin。
准备 API Key#
先在 model.dflop.top/dashboard/keys 创建 API Key(格式 sk-gpushare- + 64 位十六进制字符,总长 76 字符;创建后可在 Key 详情页随时重新查看)。鉴权细节见 鉴权。
配置(config.yaml,新版)#
编辑 ~/.continue/config.yaml,聊天 / 自动补全 / Embeddings 用 roles 区分:
name: 本平台
version: 0.0.1
models:
- name: Claude Sonnet 4.6 via 本平台
provider: openai
model: claude-sonnet-4-6
apiBase: https://api.dflop.top/v1
apiKey: sk-gpushare-xxx
roles:
- chat
- name: GPT-5.4 via 本平台
provider: openai
model: gpt-5.4
apiBase: https://api.dflop.top/v1
apiKey: sk-gpushare-xxx
roles:
- chat
- name: DeepSeek V3.2 (autocomplete)
provider: openai
model: deepseek-v3.2
apiBase: https://api.dflop.top/v1
apiKey: sk-gpushare-xxx
roles:
- autocomplete
字段名(
roles取值等)以你安装版本的 Continue 官方文档 为准;本平台侧只要求provider: openai+apiBase: https://api.dflop.top/v1+ 你的 Key。
配置(config.json,legacy 格式)#
旧版插件编辑 ~/.continue/config.json:
{
"models": [
{
"title": "Claude Sonnet 4.6 via 本平台",
"provider": "openai",
"model": "claude-sonnet-4-6",
"apiBase": "https://api.dflop.top/v1",
"apiKey": "sk-gpushare-xxx"
},
{
"title": "GPT-5.4 via 本平台",
"provider": "openai",
"model": "gpt-5.4",
"apiBase": "https://api.dflop.top/v1",
"apiKey": "sk-gpushare-xxx"
},
{
"title": "GLM-5.1 via 本平台",
"provider": "openai",
"model": "glm-5.1",
"apiBase": "https://api.dflop.top/v1",
"apiKey": "sk-gpushare-xxx"
}
]
}
保存后 Continue 自动 reload,模型选择器里会出现这些条目。
自动补全模型(legacy)#
config.json 旧制下,Tab autocomplete 用单独的 tabAutocompleteModel 配置:
{
"tabAutocompleteModel": {
"title": "DeepSeek V3.2 (autocomplete)",
"provider": "openai",
"model": "deepseek-v3.2",
"apiBase": "https://api.dflop.top/v1",
"apiKey": "sk-gpushare-xxx"
}
}
推荐用
deepseek-v3.2($0.27/M input)或grok-4-fast-non-reasoning($0.2/M)—— 自动补全调用频次极高,选低价小模型控费。
Embeddings#
平台已于 2026-07 下架 embedding SKU,POST /v1/embeddings 当前没有可用模型(调用返回 404 model_not_found)。Continue 的 codebase indexing 请改用本地方案 —— 例如 ollama 的 nomic-embed-text(完全离线、免费);config.yaml 新制不要配置指向本平台的 roles: [embed] 条目。
行为#
Continue 的聊天 / 自动补全请求走 OpenAI Chat 协议,可用模型 = GET /v1/models 返回的全部文本模型(60+ 个,持续增加;不在 OpenAI 协议原生通道上的模型由网关自动做协议翻译),详见 兼容矩阵 与 模型列表。
常见问题#
| 现象 | 排查 |
|---|---|
| 模型不在 dropdown | 检查 config.yaml / config.json 语法;Continue 会忽略不合法的 model 配置 |
401(invalid_api_key) | Key 无效 / 已吊销 / 已过期。检查是否复制完整(sk-gpushare- + 64 位十六进制);完整 Key 可随时在 控制台 Key 详情页 重新查看 |
400(model_not_found / model_not_allowed) | 检查 model 字段拼写是否为模型目录里的 model ID;model_not_allowed 说明这把 Key 设了模型白名单(allowed_models),去 控制台 编辑白名单或换一把无限制的 Key |
402(insufficient_quota,code quota_exceeded) | 账户余额耗尽。所有 Key 共享同一余额,新建 Key 不能解决 → 去 dflop.top/dashboard/billing 充值(Stripe,最低 $1);自动补全高频调用烧余额快,建议换 deepseek-v3.2 控费 |
| 自动补全很贵 | 切到 deepseek-v3.2 或 grok-4-fast-non-reasoning |
错误码完整说明见 错误处理。
其他客户端#
- Claude Code — 命令行 AI 编程
- Cursor — IDE 内置 AI
- Cline (VS Code) — agentic AI Coding
- Open WebUI — 自托管 ChatGPT 界面
- FlopCode — 本平台官方 fork