本文档介绍如何在 Cursor、Windsurf、Continue 等主流 AI 编程工具中接入 Nexhina,让这些工具使用你自己的模型和额度。
Add model| 用途 | 模型名 | 说明 |
|---|---|---|
| 日常编码 | deepseek-v3 | 性价比最高,中文理解好,编码能力强 |
| 复杂推理 | deepseek-r1 | 推理链模型,适合调试、数学、逻辑 |
| 通用对话 | qwen-max | 阿里通义,中文场景表现优秀 |
| 长文本 | qwen-plus | 128K 上下文,性价比高 |
| 中文写作 | glm-4 | 智谱,中文理解和生成好 |
| 配置项 | 填写内容 |
|---|---|
| API Key | sk-your-Nexhina-key(你的 Nexhina 令牌) |
| Base URL | https://token.nexhina.cn/v1 |
Verify,显示成功即配置完成。Cmd+L / Ctrl+L)@Docs 功能可以把外部文档作为上下文注入对话,让模型基于你的 API 文档回答问题。Add new doc| 配置项 | 值 |
|---|---|
| Name | Nexhina Docs |
| URL | https://token.cshuacai.cn (你的文档站点地址) |
| Start URL(可选) | 文档首页地址 |
Save 保存@Docs ,选择 Nexhina Docs@Nexhina Docs 如何使用 Function Calling?@Nexhina Docs 帮我写一个调用 Embedding 接口的 Python 函数| 配置项 | 值 |
|---|---|
| API Base URL | https://token.nexhina.cn/v1 |
| API Key | sk-your-Nexhina-key |
| Model | deepseek-v3 或其他可用模型 |
~/.windsurf/settings.json:{
"aiProvider": "openai-compatible",
"openaiCompatible": {
"baseUrl": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key",
"models": [
{ "id": "deepseek-v3", "name": "DeepSeek V3" },
{ "id": "deepseek-r1", "name": "DeepSeek R1" },
{ "id": "qwen-max", "name": "Qwen Max" },
{ "id": "glm-4", "name": "GLM-4" }
]
}
}~/.continue/config.json(或 ~/.continue/config.yaml):{
"models": [
{
"title": "Nexhina DeepSeek V3",
"provider": "openai",
"model": "deepseek-v3",
"apiBase": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key"
},
{
"title": "Nexhina DeepSeek R1",
"provider": "openai",
"model": "deepseek-r1",
"apiBase": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key"
},
{
"title": "Nexhina Qwen Max",
"provider": "openai",
"model": "qwen-max",
"apiBase": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key"
},
{
"title": "Nexhina GLM-4",
"provider": "openai",
"model": "glm-4",
"apiBase": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key"
}
],
"tabAutocompleteModel": {
"title": "Nexhina Autocomplete",
"provider": "openai",
"model": "deepseek-v3",
"apiBase": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key"
},
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-large",
"apiBase": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key"
}
}| 字段 | 说明 |
|---|---|
models | 对话模型列表,会出现在 Continue 的模型选择下拉框中 |
tabAutocompleteModel | 代码补全模型,建议用快模型(deepseek-v3) |
embeddingsProvider | 代码库索引的 Embedding 模型 |
github.copilot.chat注意:Copilot 对自定义模型的支持在持续迭代,具体配置方式可能随版本变化。如不支持自定义模型,建议使用 Cursor 或 Continue 作为替代。
| 配置项 | 值 |
|---|---|
| Server URL | https://token.nexhina.cn/v1 |
| API Key | sk-your-Nexhina-key |
| Model | deepseek-v3 或其他 |
Test Connection 验证| 客户端 | 平台 | 配置方式 |
|---|---|---|
| ChatBox | 桌面端 | 设置 → API Base URL + Key |
| NextChat | Web | 设置 → 接口地址 + Key |
| LobeChat | Web/桌面 | 设置 → 模型服务 → 代理地址 + Key |
| Open WebUI | Web | 设置 → API URL + Key |
| Cherry Studio | 桌面端 | 设置 → API 地址 + Key |
| 配置项 | 值 |
|---|---|
| API Base URL | https://token.nexhina.cn/v1 |
| API Key | sk-your-Nexhina-key |
| 检查项 | 正确值 |
|---|---|
| Base URL | https://token.nexhina.cn/v1(末尾带 /v1) |
| API Key | sk- 开头,无多余空格 |
| 模型名 | 必须是 GET /v1/models 返回的 id,注意大小写 |
| 网络连通 | 能 curl https://token.nexhina.cn/v1/models 正常返回 |
deepseek-v3 不是 DeepSeek-V3)deepseek-v3deepseek-r1)做补全tabAutocompleteModel 中单独配置快速模型model_not_found?models 数组中添加不同 apiBase 的配置即可。embeddingsProvider 配置正确:{
"provider": "openai",
"model": "text-embedding-3-large",
"apiBase": "https://token.nexhina.cn/v1",
"apiKey": "sk-your-Nexhina-key"
}| 配置项 | 值 |
|---|---|
| Base URL | https://token.nexhina.cn/v1 |
| API Key | sk-your-Nexhina-key |
| 工具 | 配置入口 | 说明 |
|---|---|---|
| Cursor | Settings → Models → API Key | 填 Base URL + Key |
| Windsurf | Settings → AI Provider | 选 Compatible |
| Continue | ~/.continue/config.json | 编辑配置文件 |
| JetBrains | Settings → Tools → AI Assistant | 选 Custom Provider |
| ChatBox | 设置 → API | 填地址 + Key |
| LobeChat | 设置 → 模型服务 | 填代理地址 + Key |
| NextChat | 设置 → 接口 | 填地址 + Key |
| Open WebUI | 设置 → API | 填 API URL + Key |