Claude Code model router
Castari Proxy
Use Claude Agent SDK and Claude Code with other providers/models
Install
git clone https://github.com/castari/castari-proxy.gitFrom the README
Castari Proxy Castari Proxy lets you run the Claude Agent SDK against any model—including OpenRouter catalog models—without changing your agent logic. Install the castari-proxy wrapper, point it at the hosted Castari Worker, and keep using the same SDK APIs. The worker translates Anthropic-style Messages requests to whichever upstream (Anthropic or OpenRouter) matches the model string you provide. Don't want to hit the hosted worker? See Self-Hosting the Worker for instructions to deploy your own copy. Repo Overview This repository contains three main components that work together to enable multi-provider support for the Claude Agent SDK: 1. Wrapper Package (src/) The castari-proxy npm package provides queryCastari(), a drop-in replacement for the SDK's query() function. It: - Resolves which provider to use based on the model string (e.g., or:gpt-5-mini → OpenRouter) - Intercepts SDK network calls via a global fetch hook - Injects routing headers and metadata into outgoing requests - Handles subagent model inheritance for the Task tool 2. Cloudflare Worker (worker/) A stateless proxy that translates between API formats. It: - Routes requests to Anthropic (passthrough) or OpenRouter (with translation) - Converts Anthropic Messages API ↔ OpenRouter Chat Completions format - Handles streaming (SSE) translation with tool call assembly - Enforces server tool policies (MCP, web search, etc.) 3. Demo Application (claude-agent-demo/) A full-stack Next.js reference implementation of the Claude Agent SDK featuring: - 12-model selection UI (3 Claude + 9 OpenRouter models) - Streaming chat with real-time tool execution visualization - Image upload support, extended thinking controls, session management - Transcript recording and permission policies Table of Contents 1. Repo…
Details
- Repository
- castari/castari-proxy
- Language
- TypeScript
- License
- MIT
- Last updated
- 16 November 2025
FAQ
What is Castari Proxy?
Use Claude Agent SDK and Claude Code with other providers/models It is a model router for Claude Code, from castari/castari-proxy on GitHub.
How do I install Castari Proxy?
Clone castari/castari-proxy from GitHub and follow the setup steps in its README.
Is Castari Proxy popular?
castari/castari-proxy has 89 GitHub stars and 16 forks. It was last updated on 16 November 2025.
More model routers & proxies
CC Translate Proxy
101GGGODLIN/cc-translate-proxy
Type 中文, CC sees English. Sidecar i18n proxy for Claude Code.
Llm Task Orchestrator
123naberbabammm34343/llm-task-orchestrator
Top AI Router 2026: Split Codex for Quick Code & Claude for Complex Refactoring
Claude Proxy
114John-Rood/claude-proxy
Lightweight proxy that routes Anthropic API billing through Claude Code subscriptions. Zero dependencies, ~150 lines.
Agent CLI To API
84leeguooooo/agent-cli-to-api
Expose agent CLIs (Codex, Cursor Agent, Claude Code, Gemini) as an OpenAI-compatible /v1 API gateway.
Openapis
95IngARodriguez/openapis
Free Claude API + free OpenAI API in one unified proxy. Drop-in compatible with Anthropic SDK, OpenAI SDK, Claude Code CLI, OpenCode, LangChain. 100+ models (Claude Opus 4.7, Sonnet 4.6, Haiku 4.5, GPT-5.5, GPT-5.4-mini, GPT-5.3-codex). Open beta — totally free.
Tamp
95sliday/tamp
Token compression proxy for Claude Code. 50% fewer tokens, zero behavior change.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.