> ## Documentation Index
> Fetch the complete documentation index at: https://www.qhaigc.net/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Continue 接入启航AI教程

> 在 Continue 中通过 config.yaml 配置启航AI

# Continue 接入启航AI教程

## 教程说明

本教程介绍如何在 Continue 中接入启航AI。Continue 当前主推 `config.yaml`，因此不再使用旧的 `config.json` 作为主流程。

## 适用版本或适用形态

* VS Code 中的 Continue
* JetBrains IDE 中的 Continue
* 使用全局 `~/.continue/config.yaml` 的版本

## 前置条件

* 安装 Continue 插件
* 启航AI API Key
* 可编辑 Continue 的 `config.yaml`

## 官方支持的接入方式

Continue 通过模型提供配置接入 OpenAI 兼容接口。常用字段包括：

* `name`
* `provider: openai`
* `model`
* `apiKey`
* `apiBase`

## 逐步配置

1. 打开 Continue 的配置文件 `~/.continue/config.yaml`。
2. 新增一个模型配置。
3. 将 `provider` 设为 `openai`。
4. 将 `apiKey` 填为启航AI API Key。
5. 将 `apiBase` 填为启航AI的兼容接口地址。
6. 将 `model` 填为要使用的模型名。
7. 保存配置并重载 Continue。

示例：

```yaml theme={null}
models:
  - name: 启航AI
    provider: openai
    model: gpt-4o
    apiKey: your-api-key
    apiBase: https://api.qhaigc.net/v1
```

## 验证是否接入成功

* Continue 能正常加载配置
* 面板中可以选到新增模型
* 发起一次对话后能收到启航AI的回复

## 常见问题

**Q: 为什么不要再用 `config.json`？**

A: 官方当前主线是 `config.yaml`，`config.json` 已不适合作为主教程。

**Q: 连接失败时先查什么？**

A: 先查 `apiBase`、`apiKey` 和 `model`，再确认配置文件路径是否正确。

## 官方参考链接

* [Continue OpenAI Provider 文档](https://docs.continue.dev/customize/model-providers/top-level/openai)
* [Continue YAML 迁移说明](https://docs.continue.dev/docs/reference/yaml-migration)
* [Continue 自托管/OpenAI-compatible 指南](https://www.docs.continue.dev/guides/how-to-self-host-a-model)

## 最后更新时间

2026-03-21
