Xuanji — AI skill for Claude Code
璇玑 Xuanji —— Go 单二进制 AI 网关,OpenAI / Anthropic 双协议汇聚.
How to install Xuanji
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open icefairy/xuanji and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Xuanji does
璇玑 Xuanji —— Go 单二进制 AI 网关,OpenAI / Anthropic 双协议汇聚。one-api / new-api / LiteLLM 轻量替代品,自动分流、负载、重试,成本优先路由,高可用不中断。
Alternatives in AI
- Deepreasoning — A high-performance LLM inference API and Chat UI that integrates DeepSeek R1's CoT reasoning traces with Anthr 5.4k ★
- WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
- Cc Mirror — Create multiple isolated Claude Code variants with custom providers (Z.ai, MiniMax, OpenRouter, LiteLLM) 2.1k ★
README
璇玑 Xuanji
如果这个项目对你有帮助,不妨在 GitHub 上点亮 Star ⭐,让更多开发者发现它
**OpenAI / Anthropic 协议汇聚 · 负载 · 分流网关** *Go 生态 · 单二进制 · 零外部依赖 · one-api / LiteLLM 轻量替代*
璇玑(北斗第一星,古代天文仪器的轴心枢纽)——汇聚万向,运转分流。 用 Go 自研的轻量 AI 网关,为 Hermes、Claude Code、OpenCode 等各类 AI 工具提供一个统一入口,汇聚多家上游(硅基流动、商汤、DeepSeek 系中转、vLLM、OpenRouter 等),按成本与健康状态自动分流。
**它是 one-api / new-api / LiteLLM / Portkey / Kong AI Gateway 等网关的轻量替代品**:同样解决"多家上游统一入口、API Key 管理、成本控制、故障切换",但体积、依赖、部署成本低一个量级;同时它也是 **CC Switch 这类桌面配置切换器的服务端替代方案**——不需要切换,网关自动调度。
**🎯 定位:个人 / 小团队自用**。没有计费、用户管理、配额兑换码等运营功能,短期内也不打算加入——它是给你自己的 AI 工作流做统一入口与成本调度的,不是给多用户做计费分发的。按 API Key 的用量统计(请求数 / Tokens / 成功率)可以帮你区分不同 AI 程序用得多。
**GitHub**:[https://github.com/icefairy/xuanji](https://github.com/icefairy/xuanji) — 欢迎 Issue、PR、Star ⭐
**Gitee 镜像**:[https://gitee.com/icefairy/xuanji-gateway](https://gitee.com/icefairy/xuanji-gateway) — 国内用户访问更快
💬 加入微信社群
扫码加入璇玑交流群,一起探讨 AI 网关的使用与优化
为什么自研
现有 `oneapi` / `new-api` 等网关对 OpenAI 协议兼容不好(流式、工具调用、多模态字段容易丢),且太重。本项目追求:
- 轻量:Go 单二进制 + SQLite,零外部依赖,内存占用极小
- 协议严格:OpenAI + Anthropic 双协议,流式 SSE 逐行透传
- 可控:所有配置数据库化,CRUD 即热重载,全程可视化
核心特性
🧭 双协议接入
| 协议 | 端点 | 说明 |
|---|---|---|
| OpenAI | POST /v1/chat/completions |
聊天补全(流式/非流式) |
POST /v1/embeddings |
文本嵌入 | |
POST /v1/images/generations |
图片生成 | |
POST /v1/rerank |
重排 | |
POST /v1/audio/speech |
语音合成 | |
POST /v1/audio/transcriptions |
语音识别 | |
GET /v1/models |
模型列表 | |
| Anthropic | POST /v1/messages |
Claude 消息(Claude Code 直 |
Related Skills
Claude Controller
claude-controller is a bash script that gives you a single command to switch Claude Code between four AI backe
Claude To ChatGPT
This project converts the API of Anthropic's Claude model to the OpenAI Chat API format.
Devo
Model-neutral agent desktop/runtime for private, enterprise, and OpenAI-compatible / Anthropic-compatible mode
TurboLLM
Run any local LLM engine, auto-tuned to your GPU — polished web UI + OpenAI/Anthropic-compatible API. Point Cl
Byokey
Turn AI subscriptions into standard API endpoints. OpenAI & Anthropic compatible gateway — for Amp Code, Curso
Amux
Bidirectional LLM API adapter with IR pattern. Seamlessly convert between OpenAI, Anthropic, DeepSeek, and mor
Related Agents
LLM Orchestrator
Use this agent for LLM integration work — prompt engineering, multi-provider abstraction (OpenRouter, Gemini,
AI ML
AI/ML 통합 전문가 + LLM API 최신 모델/SDK 코딩 가이드. RAG 시스템, 문서 분석, OpenAI/Anthropic/Gemini/Ollama 최신 API 보장. "AI integra
AI LLM Engineer
Use this agent when the user types /ai or asks for ai/llm engineer work — e.g., build a RAG pipeline over our