Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By cablatev0.7.5MITIn 1 marketplace
Per-window model switcher, subagent router, and automatic 429 failover for Claude Code — switch any window from the /provider panel, route subagents to any provider, and keep working when quota runs out.
Trending plugins
7-day copy clicks
Code that runs inside Claude Code on every session, as you, unsandboxed.
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it runs programs; writes files; reads files; reads environment variables (ANTHROPIC_BASE_URL, CLAUDE_CONFIG_DIR, HOME, OS, USERPROFILE); sets environment variables; reads your settings; sends prompts on its own.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Switch any Claude Code window to another model from an interactive panel, route subagents to any provider,
and automatically fail over when Claude hits a usage limit—all on localhost, with Remote Control and statuslines intact.
English · 繁體中文 · Install · Features · Configuration · Changelog
Claude Code binds model settings globally across every terminal window. model-relay runs a lightweight router on localhost (127.0.0.1:8950) so each window and subagent can use the model you want—with zero external cloud proxies.
| When… | Without model-relay | With model-relay |
|---|---|---|
| You want to switch just one window to another model | Editing settings.json switches every open terminal at once | Type /provider to switch only the current window from the panel above your prompt (and write its active model to model-relay-status/<session id> for your statusline) |
You want haiku or a specific subagent on another model | Changing global env vars forces your main Opus/Sonnet chat onto that endpoint too | /provider alias haiku <name> offloads haiku globally, or model-relay:<name> spawns a one-off subagent on that provider with all tools intact |
| Claude hits a 5-hour usage limit (HTTP 429) or a provider hiccups | Your turn fails mid-task until quota resets | Automatic retries and failover.chain hand the request to your backup provider and pin only that window while new windows return to Claude after cooldown |
You use Remote Control (claude.ai/code) from your phone or browser | Custom ANTHROPIC_BASE_URL blocks Remote Control from connecting | Local HTTPS proxy mode (/provider rc on) keeps Remote Control working while routing each window independently |
Third-party gateways lose history/tools or reject ToolSearch / cache_control | message-threads deltas cause mid-chat amnesia, and ToolSearch hides tools or triggers HTTP 400 | Automatically sends full conversations keeps ToolSearch working, and cleans cache_control per provider on the fly |
model-relay is built for Claude Code users who combine a Claude subscription with backup or specialized endpoints (z.ai, DeepSeek, Kimi, MiniMax, OpenRouter, or a gateway on your own machine). Each provider has to accept Anthropic's /v1/messages format; a service that only speaks OpenAI Chat Completions needs a local translator (see Limitations). If you need a multi-tenant cloud proxy for an entire organization, use LiteLLM instead—model-relay is a single-user localhost daemon.
Requires Node.js 20+ and Claude Code 2.1.287 or later (tested on Node.js 22.23.2 and Claude Code 2.1.306).
⚠️ Upgrading from 0.6 or earlier? Updating the plugin alone is not enough. Version 0.7+ reads only
"format": 2in~/.claude/model-relay.json. Until you migrate your config and restart the router, an old 0.6 router still running in the background keeps running 0.6 code (without 0.7's conversation/tool loss fix or localhost security check), and once that process stops, the plugin will not start a new router until you migrate. Run/provider setup upgrade my model-relay configand Claude does it with you, or follow UPGRADING.md by hand (node tools/setup.mjs migrate, thenmigrate --go, then/provider restart).
claude plugin marketplace add cablate/model-relay
claude plugin install model-relay@model-relay
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub cablate/model-relay --plugin model-relayPlugins from other owners that cover similar ground