ClaudeGate โ€“ Use OpenRouter Models (0x Alpha, DeepSeek) in Claude Code CLI ClaudeGate, a new open-source local API gateway, enables Claude Code CLI and Anthropic SDK applications to use any AI model, including free and frontier models from OpenRouter, DeepSeek, and others, by translating Anthropic's Messages API into OpenAI-compatible Chat Completions. The tool features zero-crash SSE streaming, multi-provider failover, PII sanitization, and support for 24+ provider presets, with a 10-minute keep-alive timeout. High-Performance Universal Bridge connecting Claude Code CLI & Anthropic SDKs to ANY AI Model. Zero-crash streaming, multi-provider failover, chain-of-thought sanitization, PII redactor, and 24+ provider presets. ๐Ÿ“Œ 1. Project Overview -1-project-overview ๐Ÿ“ธ 2. Live Demo & Terminal Previews -2-live-demo--terminal-previews โœจ 3. Features -3-features ๐Ÿ› ๏ธ 4. Tech Stack %EF%B8%8F-4-tech-stack ๐Ÿ—๏ธ 5. Architecture %EF%B8%8F-5-architecture ๐Ÿ“ 6. Project Structure -6-project-structure โš™๏ธ 7. Installation and Setup %EF%B8%8F-7-installation-and-setup ๐Ÿš€ 8. Usage & User Flow -8-usage--user-flow ๐Ÿงช 9. Testing & Diagnostics -9-testing--diagnostics ๐Ÿ”’ 10. Security & Privacy Safeguards -10-security--privacy-safeguards ๐Ÿ’ก 11. Engineering Decisions -11-engineering-decisions ๐Ÿ”ฎ 12. Limitations and Future Improvements -12-limitations-and-future-improvements ๐Ÿค 13. Contributing & Code of Conduct -13-contributing--code-of-conduct ๐Ÿ“„ 14. License -14-license Claude Code CLI https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview is one of the most capable agentic coding tools available today. However, it is natively locked to Anthropic's commercial cloud endpoints. ClaudeGate is a lightweight, high-throughput, and secure local API gateway that bridges Anthropic's Messages API protocol /v1/messages and /v1/messages/count tokens into standard OpenAI-compatible Chat Completions. With ClaudeGate, developers can power Claude Code CLI, Cursor, and Anthropic SDK applications using: - ๐Ÿ†“ Free & Frontier AI Cloud Models : Stealth Ox Alpha, OpenRouter Claude Opus 5 / Sonnet 5 / Haiku 4.5 , OpenAI GPT-5.6 Sol / Terra / Luna , DeepSeek V4-Pro & V4-Flash , Google Gemini 3.1 Pro / 3.7 Flash / 3.5 Flash-Lite , Alibaba Qwen Qwen3.8-Max / Qwen3.7-Plus / Qwen3.8-27B , Moonshot Kimi K3 2.8T & K2.7 Code , Meta Muse Spark 1.2 & Muse Glimmer , Z.ai GLM GLM-5.3 & GLM-5-Turbo , MiniMax M3 & M2.7 , Cohere Command A+ / A / R7B , Mistral Large 3 / Medium 3.5 / Small 4 , Perplexity Sonar Reasoning Pro . - ๐Ÿ”’ 100% Private Local Offline Models : Ollama, LM Studio, vLLM DeepSeek V4-Pro quantized, Qwen3.6-35B-A3B, Muse Glimmer - zero data leaves your machine . - ๐Ÿง  Next-Gen Model Mapping : Seamlessly routes all Claude versions Claude 3.5, 3.7, 4.x, 4.5, 5.x, Fable, Mythos to your configured BIG MODEL , MIDDLE MODEL , and SMALL MODEL tiers or passes through direct model slugs. - ๐Ÿข Enterprise Private Deployments : Azure OpenAI Service, AWS Amazon Q via Kiro Bridge , Meta Muse Spark. ClaudeGate in active operation, translating Claude Code CLI tool calls, bash commands, and streaming tokens in real-time: - โšก Zero-Crash SSE Streaming : Translates raw OpenAI chunk streams into Anthropic Server-Sent Events content block start , content block delta , message delta , message stop . Mid-stream disconnects and upstream errors are caught gracefully without crashing Starlette/ASGI. - ๐Ÿ”„ Automatic Multi-Provider Failover : Seamlessly fails over from primary upstream to backup providers e.g. OpenRouter$\rightarrow$ Groq$\rightarrow$ local Ollama on transient 503 , 429 , or timeout errors without dropping the active client session. - ๐Ÿ›ก๏ธ PII & Secret Sanitizer : Intercepts outgoing prompts and automatically scrubs AWS keys, GitHub PATs, OpenAI tokens, and SSH private keys before requests leave your computer SANITIZE SECRETS=true . - ๐Ÿ› ๏ธ Full Bi-directional Tool / Function Calling : Seamlessly translates Claude Code file-system operations, terminal commands, and search tools into OpenAI function calls and vice versa. - ๐Ÿงน Chain-of-Thought / : Cleanses internal reasoning tokens and