支持的服务商
XSI 按 Provider Key 的上游主机名自动选择路径映射与鉴权方式,客户端始终使用官方协议的标准路径(如 /v1/chat/completions、/v1/messages)。Azure 与 Vertex AI 通过 config.provider_type 声明,见《Provider Key API》。
原生支持
| 服务商 | Provider 地址 | 支持的协议 | 说明 |
|---|---|---|---|
| OpenAI | https://api.openai.com | 全部 OpenAI 接口,含 Responses WebSocket、Realtime、Live | 无 /v1 的路径自动补全 |
| Azure OpenAI / Azure AI | https://<resource>.openai.azure.com 等 | Chat、Responses、Embeddings、Images、Audio | provider_type: azure,支持 deployment 映射与 api-version;Realtime 实时连接请使用 OpenAI 上游 |
| Anthropic | https://api.anthropic.com | Messages、count_tokens、Files | 鉴权固定为 x-api-key |
| Google Gemini | https://generativelanguage.googleapis.com | Gemini 原生接口;OpenAI 兼容的 Chat 与 Embeddings | 原生路径使用 x-goog-api-key |
| Google Vertex AI | https://aiplatform.googleapis.com | Gemini 原生接口 | provider_type: vertex,服务账号鉴权 |
| xAI | https://api.x.ai | Chat、Responses、Images、Videos | 视频任务按账号绑定轮询 |
| DeepSeek | https://api.deepseek.com | Chat、Responses、Messages、联网工具、OCR、TTS(含 WebSocket)、ASR、Files、余额 | 见《DeepSeek 全家桶接入》 |
| 阿里云百炼 / DashScope | https://*.aliyuncs.com | Chat、Embeddings、Rerank、Responses、Messages、Realtime | Realtime 自动映射到 /api-ws/v1/realtime |
| 火山方舟 | https://ark.cn-beijing.volces.com | Chat、Responses、Embeddings、Images、Messages | 含 Coding Plan 路径 |
| 百度千帆 | https://*.baidubce.com | Chat、Responses、Embeddings、Images、Rerank、Messages | |
| 智谱 | https://open.bigmodel.cn、https://api.z.ai | Chat、Embeddings、Images、Messages | |
| Moonshot | https://api.moonshot.cn | Chat、Messages | |
| MiniMax | https://api.minimaxi.com | Chat、Messages | |
| 腾讯云 | https://api.lkeap.cloud.tencent.com | Chat、Messages | |
| LongCat | https://api.longcat.chat | Chat、Messages | |
| Perplexity | https://api.perplexity.ai | Chat | |
| Cohere | https://api.cohere.ai | Chat、Embeddings(兼容接口) | |
| DeepInfra | https://api.deepinfra.com | Chat | |
| Fireworks | https://api.fireworks.ai | Chat、Completions、Responses、Messages、Rerank | |
| GitHub Models | https://models.github.ai | Chat | |
| Groq、Cerebras、SiliconFlow、OpenRouter、Ollama | 各自官方地址 | OpenAI 兼容接口 | Bearer 鉴权,路径原样转发 |
| Cloudflare AI Gateway | https://gateway.ai.cloudflare.com/... | 按网关配置 | 使用 cf-aig-authorization 鉴权 |
接入其他兼容服务
任何提供 OpenAI 兼容或 Anthropic 兼容接口的服务(包括自建的 vLLM、SGLang、Ollama 等)都可以作为 Provider:
Provider填写服务的基础地址,可以包含路径前缀,例如https://llm.internal.example.com/openai,XSI 会把请求路径拼接在其后。- OpenAI 风格路径使用
Authorization: Bearer转发,/messages路径使用x-api-key。 - Provider 是公网 IP 时,XSI 会为
/chat/completions、/embeddings、/responses、/messages自动补全/v1。
模型与价格
接入服务商之后,还需要让模型出现在价格表中,XSI 才能正确计费与映射:
- 默认价格表
api/pricing.json已包含 GPT、Claude、Grok、DeepSeek、GLM、Kimi、Doubao、Qwen 等系列的主力模型。 - 其他模型可通过租户
PRICING新增,见《计费与价格》。 - 公开价格可在模型目录或
GET /x-pricing中查看。