支持的服务商

XSI 按 Provider Key 的上游主机名自动选择路径映射与鉴权方式,客户端始终使用官方协议的标准路径(如 /v1/chat/completions、/v1/messages)。Azure 与 Vertex AI 通过 config.provider_type 声明,见《Provider Key API》。

原生支持

服务商Provider 地址支持的协议说明
OpenAIhttps://api.openai.com全部 OpenAI 接口,含 Responses WebSocket、Realtime、Live无 /v1 的路径自动补全
Azure OpenAI / Azure AIhttps://<resource>.openai.azure.com 等Chat、Responses、Embeddings、Images、Audioprovider_type: azure,支持 deployment 映射与 api-version;Realtime 实时连接请使用 OpenAI 上游
Anthropichttps://api.anthropic.comMessages、count_tokens、Files鉴权固定为 x-api-key
Google Geminihttps://generativelanguage.googleapis.comGemini 原生接口;OpenAI 兼容的 Chat 与 Embeddings原生路径使用 x-goog-api-key
Google Vertex AIhttps://aiplatform.googleapis.comGemini 原生接口provider_type: vertex,服务账号鉴权
xAIhttps://api.x.aiChat、Responses、Images、Videos视频任务按账号绑定轮询
DeepSeekhttps://api.deepseek.comChat、Responses、Messages、联网工具、OCR、TTS(含 WebSocket)、ASR、Files、余额见《DeepSeek 全家桶接入》
阿里云百炼 / DashScopehttps://*.aliyuncs.comChat、Embeddings、Rerank、Responses、Messages、RealtimeRealtime 自动映射到 /api-ws/v1/realtime
火山方舟https://ark.cn-beijing.volces.comChat、Responses、Embeddings、Images、Messages含 Coding Plan 路径
百度千帆https://*.baidubce.comChat、Responses、Embeddings、Images、Rerank、Messages
智谱https://open.bigmodel.cn、https://api.z.aiChat、Embeddings、Images、Messages
Moonshothttps://api.moonshot.cnChat、Messages
MiniMaxhttps://api.minimaxi.comChat、Messages
腾讯云https://api.lkeap.cloud.tencent.comChat、Messages
LongCathttps://api.longcat.chatChat、Messages
Perplexityhttps://api.perplexity.aiChat
Coherehttps://api.cohere.aiChat、Embeddings(兼容接口)
DeepInfrahttps://api.deepinfra.comChat
Fireworkshttps://api.fireworks.aiChat、Completions、Responses、Messages、Rerank
GitHub Modelshttps://models.github.aiChat
Groq、Cerebras、SiliconFlow、OpenRouter、Ollama各自官方地址OpenAI 兼容接口Bearer 鉴权,路径原样转发
Cloudflare AI Gatewayhttps://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 中查看。

相关文档