现在Lighthouse已经适配了国内的im软件(QQ、企业微信、飞书、钉钉),可以直接使用面板来完成配置。同样,面板也支持了许多主流大模型提供商,那么如果我们有其他的第三方提供商(例如七牛、硅基流动等)需要配置,这篇文章教会你如何接入这些第三方提供商。
重要
在选择模型提供商时,请确定你的轻量应用服务器地域在模型提供商支持的地域中
接入自定义AI提供商
只要在轻量应用服务器控制台,应用管理中将下方的自定义模型相关字段填写进去后点击保存即可完成自定义模型的配置:
MiniMax
以minimax,使用"Anthropic"协议,使用MiniMax-M2.5模型为例:
国内版 - platform.minimaxi.com/user-center…
{
"provider": "minimax",
"base_url": "https://api.minimaxi.com/anthropic",
"api": "anthropic-messages",
"api_key": "your-api-key-here",
"model": { "id": "MiniMax-M2.5", "name": "MiniMax M2.5" }
}
国际版 - platform.minimax.io/user-center… AI代码解释
{
"provider": "minimax",
"base_url": "https://api.minimax.io/anthropic",
"api": "anthropic-messages",
"api_key": "your-api-key-here",
"model": { "id": "MiniMax-M2.5", "name": "MiniMax M2.5" }
}
硅基流动
以硅基流动,使用"OpenAI"协议,使用DeepSeekv3.2模型为例:
{
"provider": "siliconflow",
"base_url": "https://api.siliconflow.cn/v1",
"api": "openai-completions",
"api_key": "your-api-key-here",
"model": {
"id": "deepseek-ai/DeepSeek-V3.2",
"name": "DeepSeek-V3.2"
}
}
Kimi Code
⚠️:在非官方(Kimi CLI)中使用Kimi Code会员权益有可能被Kimi视为滥用和违规,导致会员权益停用或账号封禁。 详见 Kimi Code 使用范围
使用Kimi Code,以Kimi-k2.5 模型为例:
{
"provider": "kimicode",
"base_url": "https://api.kimi.com/coding",
"api": "anthropic-messages",
"api_key": "your-api-key-here",
"model": {
"id": "kimi-k2.5",
"name": "Kimi K2.5"
}
}
Google Gemini
使用 Google Gemini API,以最新的 Gemini 3 Flash 模型为例:
{
"provider": "google",
"base_url": "https://generativelanguage.googleapis.com/v1beta/openai",
"api": "openai-completions",
"api_key": "your-api-key-here",
"model": {
"id": "gemini-3-flash-preview",
"name": "Gemini 3 Flash"
}
}
OpenAI (GPT)
官方文档:developers.openai.com/api/docs
使用 OpenAI 官方 API,以最新的 GPT-5.2 模型为例:
{
"provider": "openai",
"base_url": "https://api.openai.com/v1",
"api": "openai-completions",
"api_key": "your-api-key-here",
"model": {
"id": "gpt-5.2",
"name": "GPT-5.2"
}
}
Anthropic Claude
官方文档:platform.claude.com/docs/zh-CN/…
使用 Anthropic Claude API,以最新的 Claude Opus 4.6 模型为例:
{
"provider": "anthropic",
"base_url": "https://api.anthropic.com",
"api": "anthropic-messages",
"api_key": "your-api-key-here",
"model": {
"id": "claude-opus-4-6",
"name": "Claude Opus 4.6"
}
}
xAI Grok
使用 xAI Grok API(兼容 OpenAI 协议),以最新的 Grok 4.1 模型为例:
{
"provider": "xai",
"base_url": "https://api.x.ai/v1",
"api": "openai-completions",
"api_key": "your-api-key-here",
"model": {
"id": "grok-4.1",
"name": "Grok 4.1"
}
}
OpenRouter
使用 OpenRouter API(兼容 OpenAI 协议),以NVIDIA: Nemotron 3 Nano 30B A3B 模型(限时免费)为例:
{
"provider": "openrouter",
"base_url": "https://openrouter.ai/api/v1",
"api": "openai-completions",
"api_key": "your-api-key-here",
"model": {
"id": "nvidia/nemotron-3-nano-30b-a3b:free",
"name": "NVIDIA: Nemotron 3 Nano 30B A3B"
}
}
通用配置模板
如果上述没有你想要的模型,可以使用以下通用模板接入任何兼容OpenAI/Anthropic协议的模型:
{
"provider": "provider_name",
"base_url": "baseurl",
"api": "API协议",
"api_key": "your-api-key-here",
"model": {
"id": "model_id",
"name": "model_name"
}
}
参数说明
| 参数 | 说明 | 示例 |
|---|---|---|
| provider | 提供商名称,自定义即可 | siliconflow |
| base_url | API 基础地址 | api.siliconflow.cn/v1 |
| api | API 协议类型:openai-completions 用于兼容 OpenAI Chat Completions API 的模型;anthropic-messages 用于兼容 Anthropic Messages API 的模型 | openai-completions |
| api_key | 提供商的 API 密钥 | sk-xxx |
| model.id | 模型的唯一标识符 | deepseek-ai/DeepSeek-V3.2 |
| model.name | 模型的显示名称 | DeepSeek-V3.2 |