Get the latest on AI, LLMs & developer tools
New MCP servers, model updates, and guides like this one — delivered weekly.
Claude Code is a good terminal agent, and plenty of people want to keep it while changing what sits behind it: a local model for privacy, a cheaper hosted model for volume, or a gateway for budgets and logs. The mechanism is the same in almost every case. Claude Code reads a base URL and a token from environment variables, so anything that speaks an Anthropic-compatible API can answer.
The catch is in the fine print. Anthropic does not support routing Claude Code to non-Claude models, several vendors restrict their plans to listed tools, and some tutorials online are out of date. This guide covers 12 options, copies setup commands from official docs, and marks everything we could not confirm. Our short version: Ollama or LM Studio for a local trial, a vendor plan from Z.ai, Kimi or MiniMax for hosted open models, and OpenRouter, Cloudflare or Vercel when you need a gateway with controls.
A third-party tutorial by the channel Prompt Engineer 48 (title as shown on YouTube). We did not verify its claims. Everything in this article comes from vendor docs and pricing pages.
The Short Answer
Pick by where you want the model to run and who you trust with your prompts. None of these picks are paid placements.
If you are comparing plans rather than wiring, our coding plans comparison looks at price per plan across Claude, ChatGPT, GLM, Kimi and MiniMax. This article is about the wiring and the rules.
What Anthropic Supports (and What It Does Not)
Anthropic's own LLM gateway page is blunt: it says Anthropic does not endorse, maintain or audit third-party gateway products, and does not support routing Claude Code to non-Claude models through any gateway. The model configuration page adds that ANTHROPIC_BASE_URL changes where requests are sent, not which model answers them.
That is a support statement, not a technical block. Every product below proves the wiring works in practice. But you should read it as: if tool calls break or quality drops, Anthropic will not help, and the model vendor or the router project is your only support route. Also note that the model alias variables (ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL) are how most vendor guides map Claude Code's internal names onto their own models.
Three Wiring Patterns
Every option here fits one of three patterns, and knowing which one you are in saves hours of debugging.
- Direct to an Anthropic-compatible endpoint. Ollama, LM Studio, llama.cpp, GLM, Kimi and MiniMax each expose one. No router is needed. You set a base URL, a token and model names.
- Through a translating proxy. Claude Code Router, LiteLLM and 9router accept Claude Code traffic locally and translate it for whichever provider you chose. They add fallback and logging and add a process to maintain.
- Through a hosted gateway. OpenRouter, Cloudflare AI Gateway and Vercel AI Gateway sit between you and the provider and add observability, budgets or caching. Cloudflare's documented Claude Code routes are Anthropic, Bedrock and Vertex.
For a wider look at gateways beyond Claude Code, see our LLM API gateways comparison. For harnesses other than Claude Code, see the open-source terminal coding agents roundup.
How We Evaluated
This is a desk-research comparison done on November 29, 2026. We read each vendor's Claude Code page, pricing page and licence file, pulled GitHub star counts from the repository pages, and checked every video and X post through its oEmbed or syndication endpoint. Pricing pages that hide numbers behind toggles (Z.ai, Kimi, OpenRouter) were loaded in a real browser.
We did not install and run all twelve options, so we make no claims about speed, tool-call reliability or code quality on any model. Setup snippets are copied from official docs except where we say otherwise (the llama.cpp wiring is our own extrapolation). Where a vendor's pages were unclear we say so rather than pick a number. MiniMax's live pricing page did not render for us, and the figures we quote come from a vendor docs page about an ended offer.
Master Comparison Table
| Product | Type | Where it runs | Cost to start | Vendor Claude Code doc |
|---|---|---|---|---|
| Router | Local | Free, MIT | Project README lists Claude Code | |
| Gateway | Hosted | Free plan; 5.5% fee on credits | Yes, guarantees Anthropic first-party only | |
| Proxy | Self-hosted | Free, MIT outside enterprise dir | Yes, non-Anthropic tutorial | |
| Runner | Local and cloud | $0 plan; Pro $20/month | Yes | |
| Runner | Local | Free plan $0 | Yes | |
| Engine | Local | Free, MIT | No, endpoint docs only | |
| Plan | Hosted by Z.ai | $18/month list (Lite) | Yes | |
| Plan | Hosted by Kimi | Plus $15/month on annual billing | Yes | |
| Plan | Hosted by MiniMax | $22/month (Go), see note | Yes | |
| Router | Local | Free, MIT | README lists Claude Code | |
| Gateway | Hosted | Core features free | Yes, Claude routes | |
| Gateway | Hosted | Free tier; no token markup | Yes, dedicated endpoint |
GitHub stars on November 29, 2026: Ollama 188.4k, llama.cpp 136.5k, LiteLLM 64.1k, Claude Code Router 38.4k, 9router 33.0k. Stars show popularity, not quality.
1. Claude Code Router
![]()
Open-source local model gateway and control plane (MIT). Claude Code Router, usually shortened to CCR, is a project by musistudio that sits between Claude Code and the model providers you want to use. Claude Code talks to one stable local endpoint, and CCR decides which provider and model actually answers. The README for release v3.1.6 describes a desktop app for macOS, Windows and Linux, an npm command line, and a Docker option. It is the most direct answer to the search query “claude code router”, and it is not an Anthropic product.

Who it is for. Developers who want to keep the Claude Code interface but switch between several providers (OpenRouter, DeepSeek, Moonshot, Kimi Code, Z.AI and similar) without hand-editing environment variables each time, and people who also run Codex, OpenCode or other agents against the same set of providers.
Key features
- One local endpoint for several agents. The README lists Claude Code, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode and others as supported clients.
- Provider coverage across OpenAI Chat and Responses, Anthropic Messages, Gemini formats, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian and custom compatible providers.
- Reliability controls: retries, credential pools, key rotation and ordered fallback models.
- Add-ons such as Fusion vision, web search, MCP tools and ToolHub for models that lack those abilities natively.
- Request logs with resolved routes, latency, token usage, cost estimates and account status.
- Free and MIT licensed. The LICENSE file reads MIT, Copyright 2025 musistudio.
- Large community: 38.4k GitHub stars on November 29, 2026.
- A desktop UI means you can configure providers without writing JSON by hand.
- Fallback and key rotation help when a cheap provider rate limits you.
- It is one more local process to run, update and secure, and it holds your provider keys.
- Anthropic does not support routing Claude Code to non-Claude models through any gateway, so quality problems are yours to debug.
- The project moves fast (a v3 desktop app now leads the README), so older blog tutorials may describe a different setup flow.
- Translation between formats can lose features that only Anthropic models handle well, such as some tool-call patterns.
Benefits for running Claude Code
- You can point Claude Code at a cheap or free model for routine edits and switch to a stronger model for hard tasks, from one dashboard.
- Logs and cost estimates show where tokens go, which is hard to see when each provider has its own console.
- Because it is local, nothing but your chosen providers sees your prompts.
Pricing, free tier and limits
Pricing (as of November 29, 2026). The software is free. You pay each upstream provider directly. CCR itself lists no paid tier in the README we read.
Free tier or trial. Everything is free to download and use. Provider free tiers (for example OpenRouter free models) work behind it.
Limits. No limits from CCR itself. Rate limits and context windows come from whichever provider and model you route to.
Standout use case. Switching Claude Code between two or three providers during a day, with fallback when one is slow or out of quota.
Skip it if you only ever use one provider with a native Anthropic-compatible endpoint (GLM, Kimi, MiniMax, Ollama). Those need no router at all.
Install and start (from the README)
npm install -g @musistudio/claude-code-router@latest
ccr ui
# Open http://127.0.0.1:3458 and follow Providers -> Server -> Agent Profiles.
# The model gateway itself listens on http://127.0.0.1:3456.These commands come from the README Quick Start. The README also offers a desktop app download as the recommended path. We did not reproduce the per-provider profile fields here because they live in the UI and change between releases.
Sources: CCR README, CCR LICENSE.
2. OpenRouter
![]()
Hosted multi-provider gateway (pay as you go). OpenRouter is a hosted API that fronts many model providers behind one key. Its pricing page lists 600+ models and 80+ providers on paid plans. OpenRouter publishes a dedicated Claude Code integration guide, and that guide is careful about what it promises: it says Claude Code with OpenRouter is only guaranteed to work with the Anthropic first-party provider, because Claude Code sends standard Anthropic Messages payloads without OpenRouter’s provider object.
MiniMax M2.5 is live now on OpenRouter! @MiniMax_AI's update to their powerful agentic model M2.1 comes with improved reliability and performance on long running tasks.
— @OpenRouter February 12, 2026
Who it is for. Teams and solo developers who want one bill, spend limits and usage analytics in front of Claude Code, and anyone who wants to experiment with non-Anthropic models and accepts that this part is not guaranteed.
Key features
- Anthropic-compatible base URL at https://openrouter.ai/api (not /api/v1, because Claude Code appends /v1/messages).
- Provider failover between multiple Anthropic providers when one is down or rate limited.
- Budgets and spend controls, activity logs and export, prompt caching and a management API key on paid plans.
- Presets that set provider order, and privacy settings that can restrict requests to Anthropic only.
- A free plan with 25+ free models from 4 free providers, per the pricing page.
- One key and one invoice across many providers.
- Budget controls are useful when several developers share Claude Code access.
- No code to host. Setup is a handful of environment variables.
- OpenRouter says it does not mark up inference and charges a fee on credit purchases instead.
- Only the Anthropic first-party path is guaranteed. Other models may work but are on you.
- A 5.5% fee ($0.80 minimum) applies when you buy credits.
- The free plan has no budgets, no auto-routing and no prompt caching, per the pricing table.
- Your prompts pass through a third party.
Benefits for running Claude Code
- Failover across Anthropic providers can keep Claude Code working during an outage on one route.
- Central spend limits stop a runaway agent loop from draining a card.
- You can compare providers by cost and latency in one dashboard.
Pricing, free tier and limits
Pricing (as of November 29, 2026). Plan fees from the pricing page: Free plan fee N/A, Standard 5.5%, Business 8%, Enterprise discounts available. The FAQ states a 5.5% fee ($0.80 minimum) on credit purchases and a 5% fee on crypto payments.
Free tier or trial. Yes. The Free plan gives chat and API access, 25+ free models and 4 free providers, with activity logs but no auto-routing, budgets or prompt caching.
Limits. Free models carry their own rate limits. Paid usage is limited by your credit balance and provider limits.
Standout use case. A team that wants Claude models with failover, budgets and analytics, and optionally a cheap open model for side tasks.
Skip it if you want a guaranteed, supported way to run non-Claude models. OpenRouter’s own guide does not give that guarantee.
Connect Claude Code (from the OpenRouter guide)
export OPENROUTER_API_KEY="<your-openrouter-api-key>"
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_API_KEY="" # must be explicitly empty
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 # optional model pickerThe guide warns that variables are expanded when the shell profile loads, so define OPENROUTER_API_KEY before the line that uses it, and that values in settings.json are literal strings, not expanded.
Sources: OpenRouter Claude Code guide, OpenRouter pricing, OpenRouter FAQ.
3. LiteLLM
![]()
Open-source self-hosted proxy (MIT outside its enterprise directory). LiteLLM is a Python proxy that translates between provider formats. Its docs include a tutorial titled “Use Claude Code with Non-Anthropic Models” (last updated 2026-11-27) that shows how to run the LiteLLM proxy, define models in a config.yaml, and point Claude Code at the proxy so requests keep the Anthropic Messages format on the Claude Code side while LiteLLM talks OpenAI, Gemini, Vertex or other providers on the other side.
Who it is for. Platform teams who want a central, self-hosted gateway for many developers, with their own keys and policies, and who are comfortable running a server.
Key features
- A /v1/messages endpoint on the proxy so Claude Code can use it as an Anthropic-style API.
- A model_list in config.yaml that maps friendly model names to provider models and keys.
- A master key you set with LITELLM_MASTER_KEY, which Claude Code sends as its auth token.
- Examples for OpenAI, Google AI Studio and Vertex AI models in the tutorial.
- Self-hosted, so keys and prompts stay on infrastructure you control.
- MIT license for the code outside litellm/enterprise. The repo had 64.1k stars on November 29, 2026.
- Official docs page exists specifically for Claude Code with non-Anthropic models.
- Good fit for sharing one gateway across a team.
- You run, patch and monitor a server. That is real operational work.
- Some features live in an enterprise directory under a separate license. We did not review its terms or any hosted pricing.
- Setup is YAML plus environment variables, slower than a desktop app for a single developer.
- Anthropic still does not support the non-Claude routing this enables.
Benefits for running Claude Code
- You can give each developer a proxy key instead of handing out provider keys.
- Model names in config.yaml become the names developers pass to claude --model, which keeps team setups consistent.
- It works with whatever providers your company already pays for.
Pricing, free tier and limits
Pricing (as of November 29, 2026). The open-source proxy is free. We did not check enterprise or hosted pricing, so we do not quote any.
Free tier or trial. Yes, the open-source proxy is free to run. You pay the model providers you configure.
Limits. Limits come from the providers behind it and from your own server capacity.
Standout use case. A company that wants one internal Anthropic-compatible endpoint backed by several providers.
Skip it if you are a solo developer who only wants to try a local model. Ollama or LM Studio is faster to set up.
Install and run (from the LiteLLM tutorial)
uv tool install 'litellm[proxy]'
# config.yaml (OpenAI example from the tutorial)
model_list:
- model_name: gpt-6.1-sol
litellm_params:
model: openai/gpt-6.1-sol
api_key: os.environ/OPENAI_API_KEY
export OPENAI_API_KEY="your-openai-api-key"
export LITELLM_MASTER_KEY="sk-<paste-a-long-random-key>"
litellm --config /path/to/config.yaml # proxy listens on port 4000
export ANTHROPIC_BASE_URL="http://0.0.0.0:4000"
export ANTHROPIC_AUTH_TOKEN="$LITELLM_MASTER_KEY"
claude --model gpt-6.1-solThe model name gpt-6.1-sol is the tutorial’s own example. Replace it with a model your key can use.
Sources: LiteLLM tutorial, LiteLLM LICENSE.
4. Ollama
![]()
Local model runner with an Anthropic-compatible API (MIT) and optional cloud models. Ollama runs open models on your machine and exposes an Anthropic-compatible API. Its Claude Code page says Ollama connects Claude Code to local and cloud models, and it ships a one-command launcher. This is the most common answer to “claude code with local llm” and “ollama coding agent”.
A third-party video by Ksk Royal (title as shown on YouTube), not verified by us.
.@Kimi_Moonshot's kimi-k2.7-code is now available on Ollama's cloud!
— @ollama June 13, 2026

If you want the same Ollama runtime inside a different agent, our Antigravity with local Ollama models guide walks through that setup.
Who it is for. Developers who want to try Claude Code against a local model with the least setup, and people who want an optional paid cloud route to larger open models.
Key features
- ollama launch claude starts Claude Code wired to Ollama.
- Local models plus cloud models (a model name ending in :cloud, as in the docs’ examples).
- Capabilities listed on the Claude Code page: chat, command line, tool calling with compatible models, file edits, subagents, web search, web fetch, vision and thinking controls.
- Anthropic compatibility is a subset of the Messages API.
- Fastest path from nothing to a local Claude Code session.
- MIT license and 188.4k GitHub stars on November 29, 2026.
- No API key from a model vendor is needed for local models.
- Pay-as-you-go cloud usage at $0 subscription for people who only need occasional big models.
- The docs recommend a 64k or larger context window for bigger repositories, which costs memory.
- Several Anthropic features are not supported: count_tokens, tool_choice, metadata, prompt caching, batches, citations, PDF support and streaming error events.
- On cloud models, hosted web search and advanced tool controls are not fully supported, per the docs.
- Local model quality is below frontier hosted models for hard multi-file work.
Benefits for running Claude Code
- Your code never leaves the machine when you use a local model.
- No per-token bill for local runs.
- The same Ollama install also serves other tools, as our Antigravity guide shows.
Pricing, free tier and limits
Pricing (as of November 29, 2026). From ollama.com/pricing: Pay as you go $0 (run models locally, 3 concurrent requests, no service fees). Pro $20/month, or $200 per year ($16.67/month billed annually), with $60 of usage credits per month. Max $100/month with $300 of credits and 10 concurrent requests. Team $500/month with $1,000 of shared credits. Enterprise is custom.
Free tier or trial. Yes. Local use is free. Cloud models are pay per token on the $0 plan.
Limits. 3 concurrent requests on the $0 plan and 10 on Max, per the pricing page. Local limits are your hardware.
Standout use case. A laptop or desktop with a decent GPU or unified memory, running a coding-tuned open model offline.
Skip it if your machine has little memory. A small model with a tiny context window makes Claude Code frustrating.
Launch and manual setup (from the Ollama docs)
ollama launch claude
# Or set the variables yourself (Ollama docs):
export ANTHROPIC_AUTH_TOKEN=ollama # required but ignored
export ANTHROPIC_BASE_URL=http://localhost:11434
export ANTHROPIC_API_KEY=""
claude --model <your-ollama-model>The docs’ own manual example uses a cloud model name with the :cloud suffix. For a local model, use the name you pulled with Ollama, and set the context length to 64k or higher for larger repositories.
Sources: Ollama Claude Code docs, Ollama Anthropic compatibility, Ollama pricing.
5. LM Studio
![]()
Desktop and headless local model server with an Anthropic-compatible endpoint. LM Studio’s Claude Code page says Claude Code can talk to LM Studio through its Anthropic-compatible POST /v1/messages endpoint. You start the local server (from the app or with the lms command line tool), set three environment variables, and run claude with a local model name.

Who it is for. People who prefer a graphical model manager, want to browse and load models visually, or want to run Claude Code on a laptop while a stronger machine hosts the model (LM Link).
Key features
- Anthropic-compatible /v1/messages endpoint on port 1234 by default.
- A command line server start: lms server start --port 1234.
- Optional authentication, in which case ANTHROPIC_AUTH_TOKEN must be your LM Studio API token.
- LM Link to run Claude Code on a laptop while the model runs on a separate rig.
- Friendly model browser and loader.
- Official docs page and a screenshot of the working setup.
- Works offline once the model is downloaded.
- Remote rig option through LM Link.
- The docs ask for a model and server settings with more than about 25k context. Tools like Claude Code can consume a lot of context.
- Only as good as the local model you load.
- LM Studio’s website now leads with its Bionic agent and cloud plans, so check which features you actually need.
- Anthropic does not support this route.
Benefits for running Claude Code
- A visual way to confirm which model and context length are loaded.
- Private by default for local models.
- A good second opinion if Ollama does not behave on your hardware.
Pricing, free tier and limits
Pricing (as of November 29, 2026). The pricing page (lmstudio.ai/pricing) shows Bionic Free at $0 (run local LLMs using llama.cpp and MLX), Bionic+ at $20/month (US-hosted open-source models, with Kimi K3, GLM 5.3 and DeepSeek V4 Flash named) and Pro at $100/month (5x usage limits). Those paid plans are for LM Studio’s hosted Bionic inference, not for the local Claude Code route.
Free tier or trial. Yes. The Free plan covers local models.
Limits. Local limits are your hardware. Bionic+ and Pro limits beyond what the page states were not checked.
Standout use case. Visually choosing a quantized coding model and testing context length before pointing Claude Code at it.
Skip it if you prefer a pure command line workflow. Ollama or llama.cpp will feel lighter.
Server and Claude Code (from the LM Studio docs)
lms server start --port 1234
export ANTHROPIC_BASE_URL=http://localhost:1234
export ANTHROPIC_AUTH_TOKEN=lmstudio
export CLAUDE_CODE_ATTRIBUTION_HEADER=0
claude --model openai/gpt-oss-20bIf Require Authentication is enabled in LM Studio, set ANTHROPIC_AUTH_TOKEN to your LM Studio API token instead of the placeholder. The model name is the docs’ example.
Sources: LM Studio Claude Code docs, LM Studio pricing.
6. llama.cpp
![]()
Open-source inference engine with a built-in Anthropic-compatible endpoint (MIT). llama.cpp is the engine many local tools are built on. Its llama-server documents a POST /v1/messages endpoint described as an Anthropic-compatible Messages API, with streaming through server-sent events. The docs are candid: no strong claims of compatibility with the Anthropic spec are made. They also say tool use requires the --jinja flag.
Who it is for. Advanced users who want maximum control over quantization, context size and hardware flags, and who do not mind assembling the Claude Code wiring themselves.
Key features
- llama-server with /v1/messages, including system prompts, tools, tool_choice and stop sequences.
- Tool use through the --jinja flag.
- Docker images (including a CUDA server image) are documented for running the server in a container.
- An extra_params field for llama.cpp options (seed, min_p, repeat_penalty) that the Anthropic API has no field for.
- MIT license, 136.5k GitHub stars on November 29, 2026.
- Most control over performance flags.
- No account, no cloud, no vendor.
- The endpoint is part of the server itself, so there is no extra proxy.
- No official Claude Code recipe on the server page. The setup below is our own pattern, not vendor documentation.
- Compatibility is best effort, by the project’s own wording.
- You manage model files, quantization and context yourself.
- Steeper than Ollama or LM Studio.
Benefits for running Claude Code
- The same server can be reused by other tools.
- Fine-grained control lets you squeeze a larger model or longer context onto limited hardware.
- Good for headless boxes and home labs.
Pricing, free tier and limits
Pricing (as of November 29, 2026). Free and open source. You pay only for your own hardware and electricity.
Free tier or trial. Yes, entirely.
Limits. Everything depends on your hardware, model and flags.
Standout use case. A home server with a strong GPU serving a coding model to Claude Code on a laptop over the network.
Skip it if you want a guided install. Start with Ollama or LM Studio instead.
Our example wiring (not a published llama.cpp recipe)
# Start the server. --jinja is required for tool use per the llama.cpp docs.
llama-server -m model.gguf --jinja --port 8080
# Our pattern, copied from how Ollama and LM Studio document Claude Code:
export ANTHROPIC_BASE_URL=http://localhost:8080
export ANTHROPIC_AUTH_TOKEN=local # placeholder, any value
claude --model <model-name-your-server-reports>The first command uses flags that appear in the llama-server documentation. The environment variable lines are our own extrapolation from the Ollama and LM Studio guides, and we did not run them for this article. Treat them as a starting point and check the server logs if Claude Code fails.
Sources: llama.cpp server docs, llama.cpp repository.
7. GLM Coding Plan
![]()
Subscription with an Anthropic-compatible endpoint, from Z.ai. The GLM Coding Plan is Z.ai’s subscription for GLM models. Z.ai publishes a Claude Code guide, an Anthropic-compatible endpoint at https://api.z.ai/api/anthropic, and a rule that the plan is limited to a list of officially supported tools. Claude Code is on that list. The pricing page headline says a single plan unlocks a suite of agent tools, with Claude Code among those named.
GLM-5.2 is now available to all GLM Coding Plan users, including Lite, Pro, Max, and Team plans.
— @Zai_org June 13, 2026
Rules matter here. Z.ai's supported tools page says the plan is limited to use within its officially supported tools and product environments, and that users may not use their subscription benefits for tools or scenarios outside that scope. Claude Code is on the list. That is better than most unofficial routes, but it is not a licence to plug the plan into anything.
Who it is for. Developers who want a flat monthly price and a hosted model instead of running anything locally, and who will stay inside the tools Z.ai lists.
Key features
- Plans named Lite, Pro and Max, with usage expressed in credits per week (Lite 10,000 credits per week; Pro 6x Lite; Max 14x Lite).
- Support for 20+ agent tools including ZCode and Claude Code.
- Latest-model switching: the docs describe GLM-5.4 and a default mapping to GLM-5.3-Flash.
- A Coding Tool Helper (npx @z_ai/coding-helper) that configures supported tools.
- Clear flat plans and a published Claude Code guide.
- No hardware needed.
- Yearly billing lowers the monthly price noticeably.
- Pro and Max add faster generation and priority access, per the pricing page.
- The plan may only be used in the officially supported tools and environments. Using it elsewhere is outside the stated rules.
- Credits per week are an opaque unit compared with tokens.
- Concurrency is dynamic and tied to the plan tier. Lite is recommended for one project at a time.
- Data and policy questions need your own review.
Benefits for running Claude Code
- Predictable monthly cost for a heavy coding workload.
- A vendor-documented path, which is better than an unofficial proxy trick.
- Larger context settings (the docs show a 1,000,000 auto compact window for GLM-5.4).
Pricing, free tier and limits
Pricing (as of November 29, 2026). From z.ai/subscribe: list prices of $18/month (Lite), $80/month (Pro) and $168/month (Max). The page shows 20% off for quarterly and 30% off for yearly billing, and the yearly view we read displayed $12.6, $56 and $117.6 per month. Quarterly prices were not displayed, so we do not state them.
Free tier or trial. No free tier on the page. A docs page mentions trial card recipients, but we did not verify trial terms.
Limits. Lite: 10,000 credits per week. Pro: 6x Lite. Max: 14x Lite. Concurrency scales with tier and is higher off-peak, per the usage policy.
Standout use case. Day-to-day Claude Code work on a hosted open model at a flat monthly price.
Skip it if you want to use the plan inside tools that are not on Z.ai’s supported list.
Claude Code settings (from the Z.ai docs)
# Z.ai's helper (or edit ~/.claude/settings.json yourself):
npx @z_ai/coding-helper
# settings.json env block from the Claude Code guide:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your_zai_api_key",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"API_TIMEOUT_MS": "3000000"
}
}The guide also shows a longer block that maps the Haiku, Sonnet and Opus aliases to GLM model names and sets an auto compact window. Copy that block from the guide, because model names change with each release.
Sources: Z.ai GLM Coding Plan, Z.ai Claude Code guide, Z.ai supported tools, Z.ai usage policy.
8. Kimi Code
![]()
Subscription with an Anthropic-compatible endpoint, from Moonshot AI. Kimi Code is the coding product inside Kimi’s membership plans. Kimi’s docs have a Use in Third-Party Tools section with a Claude Code page that says it describes a general integration approach: forwarding Claude Code requests to the Kimi Code API through environment variables. The doc points at https://api.kimi.ai/coding/ and the k3.1-pro model.
Extra API quota for Kimi K2.7 Code builders. If you're building with Kimi API, get 20%-30% extra quota when you top up $100+ by July 2.
— @Kimi_Moonshot June 13, 2026
That post is about the pay-per-use Kimi API and is dated June 2026, so it is context for how Kimi sells API access, not a statement about membership plans. For the model itself, see our Kimi K3.1 Pro guide.
Who it is for. Developers who want Moonshot’s K3.1 Pro in a terminal workflow, and who are happy to buy a Kimi membership.
Key features
- K3.1 Pro with a 1-million-token context window, per Kimi’s docs.
- A documented settings.json method and a terminal-variable method (the doc says pick one, do not mix them).
- A K3.1 Pro Highspeed option on Pro, Max and Ultra tiers.
- Docs for other third-party agents too, including OpenCode, Codex and Hermes Agent.
- Vendor-published Claude Code instructions.
- A long context window.
- Four paid tiers, so you can start small.
- Annual billing discounts shown on the page.
- The docs warn that K3.1 Pro supports thinking mode only, and requests with thinking disabled are rejected.
- The docs recommend the native Kimi Code protocols for the most stable results, and say protocol conversion through proxy tools may vary. Claude Code through this endpoint is a converted route.
- The pricing page carried a notice that K3.1 Pro requests may queue or fail at launch.
- The membership bundles other Kimi features, so the price is not just for coding.
Benefits for running Claude Code
- A vendor-endorsed way to use Kimi from Claude Code.
- Plain environment-variable setup.
- See our Kimi K3.1 Pro guide for the model itself.
Pricing, free tier and limits
Pricing (as of November 29, 2026). From kimi.com/membership/pricing: Plus $15/month on annual billing ($19 monthly; $180 billed annually), Pro $31/month ($39 monthly; $372 per year), Max $79/month ($99 monthly; $948 per year), Ultra $159/month ($199 monthly; $1,908 per year). The page lists Kimi Code available on Plus, Pro, Max and Ultra.
Free tier or trial. A Free plan exists at $0, but the page does not say that Kimi Code is included in it, so we do not claim that.
Limits. The plans differ in agent credits (Plus more than Free, Pro 2x, Max 5x, Ultra 10x, per the page). Kimi Code specific rate limits were not stated on the pages we read.
Standout use case. Long-context coding sessions where a 1M window matters.
Skip it if you need a documented hard guarantee on rate limits, or you do not want to pay for a bundled membership.
settings.json (from the Kimi docs, abbreviated)
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.kimi.ai/coding/",
"ANTHROPIC_API_KEY": "<YOUR_KIMI_CODE_API_KEY>",
"ANTHROPIC_MODEL": "k3.1-pro",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "k3.1-pro"
}
}The Kimi page lists more alias variables than the four above and an optional script step that edits your Claude Code login state before first launch. Copy the full block and the script from the Kimi doc rather than from this abbreviated example. The doc also warns that keys in settings.json are plaintext, and that the env field overrides variables exported in your terminal.
Sources: Kimi Code: Claude Code guide, Kimi membership pricing.
9. MiniMax M Plan
![]()
Subscription with an Anthropic-compatible endpoint, from MiniMax. MiniMax’s M Plan is its subscription for the M-series models. The docs page titled Claude Code says to use the latest MiniMax M-series models in Claude Code, with a setup wizard and a manual settings.json option pointing at https://api.minimax.io/anthropic. The page names MiniMax-M3.1-Flash with a 1M context marker as the model in its example.
MiniMax Code CLI is open now.
— @MiniMax_AI September 18, 2026
Who it is for. Developers who want a subscription-based alternative backend and a guided wizard to configure Claude Code.
Key features
- A setup wizard: npx -y mmx-cli@latest agent setup, which can install Claude Code and writes ~/.claude/settings.json.
- A manual settings.json route with a MiniMax-specific model name.
- A 1M context marker on the model name and an auto compact window setting in the example.
- Tiers named Go, Explore and Build.
- Wizard that backs up and edits the settings for you.
- Vendor-written Claude Code page.
- Tiered plans.
- Clear warning about conflicting environment variables.
- The live pricing page did not render for us. Our figures come from the vendor’s own documentation page about an ended launch offer, not from the live subscribe page.
- A launch offer ended on October 14, 2026, so older articles quoting 50% off the first month are out of date.
- Usage limits per tier were not confirmed in the pages we could read.
- The wizard edits your global Claude Code settings.
Benefits for running Claude Code
- Quick configuration for people who dislike editing JSON.
- A hosted alternative if you want neither a local model nor a router.
- MiniMax says M Plan promotions come from time to time, so watch the announcements.
Pricing, free tier and limits
Pricing (as of November 29, 2026). The monthly-offer docs page lists regular monthly prices of $22 (Go), $55 (Explore) and $132 (Build). Those figures sit in a table describing the ended launch offer, and the live pricing page did not render for us, so confirm them at checkout.
Free tier or trial. No free tier confirmed.
Limits. Not confirmed. Check the M Plan usage page before buying.
Standout use case. A one-command setup for people who want MiniMax models inside Claude Code.
Skip it if you need verified per-plan limits before you commit.
Wizard or settings.json (from the MiniMax docs)
# Clear conflicting variables first, as the docs warn:
unset ANTHROPIC_AUTH_TOKEN
unset ANTHROPIC_BASE_URL
# Option 1: wizard
npx -y mmx-cli@latest agent setup
# Option 2: edit ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic",
"ANTHROPIC_AUTH_TOKEN": "<MINIMAX_API_KEY>",
"ANTHROPIC_MODEL": "MiniMax-M3.1-Flash[1m]"
}
}The full docs example also sets alias variables for Sonnet, Opus and Haiku, an effort level and an auto compact window. Copy the complete block from the page. Use an M Plan API key from the MiniMax console.
Sources: MiniMax Claude Code docs, MiniMax monthly offer page, MiniMax M Plan subscribe page.
10. 9router
![]()
Open-source local AI router (MIT) with a dashboard. 9router is a community project (repository decolua/9router) that describes itself as a way to connect AI code tools such as Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline and OpenClaw to 40+ providers and 100+ models. You run a local dashboard, connect providers, and give your coding tool a local endpoint. It is popular because it promises free routes, and that is exactly where you should read the fine print.
A third-party video by Build AI With Hamid, which the 9router README itself links. Titles like “free unlimited” are marketing, and we did not verify the claim.
Our full 9router guide covers routing, token saving and risks. For the wider picture of free setups, read our free Claude Code guide.
Who it is for. Hobbyists who want to experiment with free or cheap providers and do not mind community software, plus people following the many YouTube setup videos.
Key features
- Local dashboard at http://localhost:20128 after npm install -g 9router.
- An endpoint at http://localhost:20128/v1 that tools use with a key copied from the dashboard.
- Provider tiers including subscription, cheap and free routes. The README mentions Kiro AI (about 50 credits per month free) and OpenCode Free as free providers.
- Fallback across providers.
- Free to run, MIT licensed, 33.0k GitHub stars on November 29, 2026.
- Dashboard makes provider switching easy.
- Works with many tools, not just Claude Code.
- Our existing guide walks through it in detail.
- It is community software, not a vendor product, and Anthropic does not support non-Claude routing.
- Free tiers and subscription routes depend on the terms of each provider, which can change or forbid the usage. We did not audit them.
- The README says the repository package is private and points to source or Docker for local development, while also showing an npm install, so read the current instructions carefully.
- Your keys and prompts pass through a local proxy you did not write.
Benefits for running Claude Code
- A low-cost way to test how other models behave inside Claude Code.
- Handy when you juggle several providers.
- Lots of community walkthroughs to follow.
Pricing, free tier and limits
Pricing (as of November 29, 2026). Free software. Each provider you connect has its own pricing or free tier. The README mentions Kiro AI at roughly 50 credits per month free; treat that as the README’s claim, not a checked offer.
Free tier or trial. Yes, the router is free and the README advertises free provider routes.
Limits. Set by each connected provider.
Standout use case. Trying many free or cheap providers behind one local URL.
Skip it if you handle client code or sensitive repositories. Use a vendor-documented route instead.
Install and connect (from the README)
npm install -g 9router
# Dashboard opens at http://localhost:20128
# In the coding tool settings (README):
# Endpoint: http://localhost:20128/v1
# API Key: copy from the dashboard
# Model: pick a model shown in the dashboardThe README’s example model string (a Kiro-prefixed Claude model) is just an example. Use whichever model the dashboard shows for the provider you connected. Our 9router guide covers the tool in more depth.
Sources: 9router README.
11. Cloudflare AI Gateway
![]()
Hosted proxy for observability, caching and rate limiting. Cloudflare AI Gateway sits in front of model providers. The Claude Code page in Cloudflare’s docs says that pointing Claude Code at AI Gateway instead of a provider directly gives observability, caching, rate limiting and centralized credentials. The page covers Anthropic, Amazon Bedrock and Google Vertex AI routes, which are all Claude paths.

Who it is for. Teams already on Cloudflare who want logs, caching and rate limits around Claude Code, with Claude models rather than open models.
Key features
- Gateway endpoint https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/<GATEWAY_ID>/anthropic.
- Authentication to the gateway with a cf-aig-authorization header.
- Unified Billing credits (Cloudflare bills you) or your own provider key.
- Routes for Amazon Bedrock and Google Vertex AI with stored provider keys.
- Core AI Gateway features are free, per the pricing page.
- Centralized credentials keep provider keys out of developer laptops.
- Inference pricing from providers is passed through with no markup.
- Good observability story.
- The documented Claude Code setup covers Anthropic, Bedrock and Vertex. It is not a ready recipe for running open models in Claude Code.
- A 5% fee applies to credits bought through Unified Billing (a $100 purchase costs $105).
- Log retention and storage follow rules that differ by account age.
- Setup needs an account ID, gateway ID and token.
Benefits for running Claude Code
- Visibility into Claude Code spend and requests across a team.
- Rate limiting as a safety net.
- Optional caching.
Pricing, free tier and limits
Pricing (as of November 29, 2026). From the AI Gateway pricing page: core features are free. Unified Billing adds a 5% fee on credits purchased, for example $100 of credit is charged as $105, with provider inference passed through at no markup. Accounts that created their first gateway on or after September 24, 2026 store logs in Workers Logs and follow Workers Logs pricing. Older accounts use Legacy Logs, capped at 100,000 logs total on Workers Free and 10,000,000 per gateway on Workers Paid.
Free tier or trial. Yes, the core features, plus whatever free Cloudflare plan your account has.
Limits. Log limits as above. Provider rate limits still apply.
Standout use case. Putting a logging and rate-limiting layer in front of a team’s Claude Code usage.
Skip it if your goal is to run non-Claude models. This page does not document that.
Anthropic route (from the Cloudflare docs)
export ANTHROPIC_BASE_URL="https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/<GATEWAY_ID>/anthropic"
export ANTHROPIC_API_KEY="<CF_AIG_TOKEN>"
export ANTHROPIC_CUSTOM_HEADERS="cf-aig-authorization: Bearer <CF_AIG_TOKEN>"
claudeCloudflare explains that ANTHROPIC_API_KEY must be set because Claude Code requires the variable, and that the cf-aig-authorization header is what authenticates you to the gateway.
Sources: Cloudflare AI Gateway: Claude Code, Cloudflare AI Gateway pricing.
12. Vercel AI Gateway
![]()
Hosted gateway with a dedicated Claude Code endpoint. Vercel’s docs page Claude Code and Claude Agent SDK with AI Gateway says AI Gateway provides Anthropic-compatible API endpoints, and it has a dedicated path (https://ai-gateway.vercel.sh/claude-code) plus a one-command CLI setup. The page last updated 2026-09-13 mentions picking a gateway model with /model and keeping a Claude subscription while routing through the gateway.
Who it is for. Developers already on Vercel who want a single credit balance, traces and a model catalog inside Claude Code.
Key features
- npx vercel@latest ai-gateway setup --agent claude-code writes the settings, empties ANTHROPIC_API_KEY and enables gateway model discovery.
- On macOS the setup stores the key in the Keychain instead of a plaintext file.
- Backups of changed files as .bak and a --dry-run option.
- Usage and traces in the AI Gateway Overview and Vercel Observability.
- One-command setup.
- No markup and no platform fee on tokens, per the pricing doc, including with your own key on the paid tier.
- Secrets can stay out of config files.
- Free tier for trying it out.
- The free tier covers a subset of models and has lower per-model rate limits, with HTTP 429 responses when exceeded.
- We did not verify which non-Claude models behave well inside Claude Code through this endpoint.
- Ties your workflow to a vendor account.
- Anthropic does not support non-Claude routing.
Benefits for running Claude Code
- Cost visibility without hosting a proxy.
- A model picker fed from the gateway catalog.
- Straightforward for teams already using Vercel.
Pricing, free tier and limits
Pricing (as of November 29, 2026). The pricing doc says AI Gateway charges no markup and no platform fee on tokens: you pay the provider’s list price from purchased credits. Free credits start with your first request and cover a subset of models. We did not copy per-model prices, which change often.
Free tier or trial. Yes, a free tier with a subset of models and lower rate limits.
Limits. Free tier requests are rate limited per model. Buying credits moves you to the paid tier with higher limits.
Standout use case. A fast, low-friction gateway with spend visibility for a Vercel-based team.
Skip it if you want a self-hosted, vendor-neutral setup.
CLI setup (from the Vercel docs)
npx vercel@latest ai-gateway setup --agent claude-code
# Then, inside Claude Code:
# /model pick a gateway modelPer the docs, the command writes ~/.claude/settings.json with ANTHROPIC_BASE_URL=https://ai-gateway.vercel.sh/claude-code and sets CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1. Use --dry-run first if you want to see changes.
Sources: Vercel AI Gateway: Claude Code, Vercel AI Gateway pricing.
Pricing Table
All figures USD, from the vendor pages named in each section, read on November 29, 2026. Taxes excluded.
| Product | Plan | Price | What the page says |
|---|---|---|---|
| Software | $0 | MIT licensed; you pay providers | |
| Free | $0, fee N/A | 25+ free models, 4 free providers | |
| Standard / Business | 5.5% / 8% platform fee | FAQ: 5.5% ($0.80 min) when buying credits | |
| Open-source proxy | $0 | Enterprise pricing not checked | |
| Pay as you go | $0 | Local models, 3 concurrent requests | |
| Pro | $20/month ($16.67 annual) | $60 usage credits per month | |
| Max | $100/month | $300 credits, 10 concurrent requests | |
| Team | $500/month | $1,000 shared credits | |
| Bionic Free | $0 | Local LLMs via llama.cpp and MLX | |
| Bionic+ / Pro | $20 / $100 per month | Hosted open models; Pro has 5x limits | |
| Software | $0 | Hardware cost only | |
| Lite / Pro / Max | $18 / $80 / $168 per month list | Yearly view: $12.6 / $56 / $117.6 per month | |
| Plus / Pro / Max / Ultra | $15 / $31 / $79 / $159 per month annual | Monthly: $19 / $39 / $99 / $199 | |
| Go / Explore / Build | $22 / $55 / $132 per month | From a docs page on an ended offer; live page did not render | |
| Software | $0 | Providers have their own pricing | |
| Core | $0 | Unified Billing adds 5% fee on credits | |
| Credits | Provider list price | No markup or platform fee on tokens |
Feature Matrix
Yes, no or partial, based only on what the pages we read say. “Not checked” means we did not confirm it.
| Product | Runs locally | Hosted | Free to start | Vendor Claude Code doc | Non-Claude models documented | Fallback or routing |
|---|---|---|---|---|---|---|
| Yes | No | Yes | Partial (README) | Yes | Yes | |
| No | Yes | Yes | Yes | Partial | Yes (Anthropic providers) | |
| Yes | No | Yes | Yes | Yes | Not checked | |
| Yes | Partial (cloud models) | Yes | Yes | Yes | No | |
| Yes | Partial (Bionic) | Yes | Yes | Yes | No | |
| Yes | No | Yes | No | Yes | No | |
| No | Yes | No | Yes | Yes (GLM) | No | |
| No | Yes | Partial | Yes | Yes (Kimi) | No | |
| No | Yes | Not checked | Yes | Yes (MiniMax) | No | |
| Yes | No | Yes | Partial (README) | Yes | Yes | |
| No | Yes | Yes | Yes | No (Claude routes) | Not checked | |
| No | Yes | Yes | Yes | Not checked | Not checked |
Best For X
| If you want | Start with | Why |
|---|---|---|
| A local trial in five minutes | Ollama | ollama launch claude and a documented Claude Code page |
| A point-and-click model manager | LM Studio | Official Claude Code page, visual model loader |
| Maximum hardware control | llama.cpp | Server has /v1/messages built in; you tune flags |
| Several providers from one UI | Claude Code Router | Desktop app, fallback models, logs |
| One internal endpoint for a team | LiteLLM | Self-hosted, YAML, official non-Anthropic tutorial |
| Hosted open models, flat price | GLM, Kimi or MiniMax plan | Vendor guides and published list prices |
| Budgets across developers | OpenRouter | Spend controls on paid plans |
| Logs and rate limits on Claude | Cloudflare AI Gateway | Free core features, Claude routes documented |
| Token traces without hosting a proxy | Vercel AI Gateway | One-command CLI setup, no token markup |
| To experiment with free routes | 9router | Free software; read provider terms first |
Keys and Safety
- Plaintext keys. Kimi's guide warns that keys in settings.json are stored in plaintext and should not be committed. OpenRouter warns the same about shell profiles. Vercel's CLI stores the key in the macOS Keychain instead.
- Local proxies hold your keys. Claude Code Router, LiteLLM and 9router sit on your machine with provider credentials. Treat them like any local credential store.
- Prompts leave your machine on hosted routes. Local runners are the only option where code stays put.
- Plan rules. Z.ai limits its plan to listed tools. We did not find a comparable statement in the Kimi and MiniMax pages we read, but we did not read their full terms, so check them yourself.
- Free routes. Free tiers that depend on third-party accounts can disappear. Our free Claude Code guide covers the trade-offs.
Common Mistakes
- Leaving old ANTHROPIC_* variables in a shell profile. MiniMax and Kimi both warn about this.
- Using https://openrouter.ai/api/v1 instead of https://openrouter.ai/api. Claude Code appends /v1/messages, so the path doubles.
- Forgetting to blank ANTHROPIC_API_KEY where the guide says to (OpenRouter, Ollama manual setup, Vercel).
- Giving a local model a tiny context window. LM Studio and Ollama both warn that Claude Code uses a lot of context.
- Mixing Kimi's two configuration methods. Their page says to pick one.
- Copying a model name from a year-old tutorial. Names such as GLM versions change with releases, so use the current vendor page.
- Assuming “free” means no limits. Check concurrency and rate limits, as Ollama and Vercel list them.
- Skipping a plan's tool rules. Z.ai publishes a supported tools list.
For habits that make Claude Code better whatever model is behind it, see our Claude Code best practice guide.
FAQ
Can Claude Code run with a local LLM?
Yes, technically. Ollama, LM Studio and llama.cpp each document an Anthropic-compatible /v1/messages endpoint, and Ollama and LM Studio have Claude Code pages. You set ANTHROPIC_BASE_URL to the local server and pass a local model name. Anthropic itself says it does not support routing Claude Code to non-Claude models through any gateway, so expect to debug quality and tool-call problems yourself.
Does Anthropic support using Claude Code with non-Claude models?
No. Anthropic's LLM gateway page says it does not endorse, maintain or audit third-party gateway products and does not support routing Claude Code to non-Claude models through any gateway. Its model configuration page adds that ANTHROPIC_BASE_URL changes where requests are sent, not which model answers them.
What is Claude Code Router?
Claude Code Router (CCR) is an MIT-licensed local gateway by musistudio. Claude Code talks to one local endpoint and CCR routes to providers such as OpenRouter, DeepSeek, Moonshot, Kimi Code and Z.AI, with fallback models, key rotation and request logs. It had 38.4k GitHub stars when we checked on November 29, 2026. It is a community project, not an Anthropic product.
Claude Code Router vs LiteLLM: which should I use?
CCR is a desktop-friendly, single-user gateway with a UI and per-agent profiles. LiteLLM is a self-hosted proxy configured with YAML, better suited to a team that wants one internal endpoint and master keys. Both are free to run, and both only translate formats, so model quality still depends on what sits behind them. We did not benchmark either.
Can I use Claude Code with OpenRouter and a free model?
OpenRouter's pricing page lists a Free plan with 25+ free models. But OpenRouter's own Claude Code guide says the setup is only guaranteed to work with the Anthropic first-party provider, so a free model may work but is not covered by that guarantee. The Free plan also has no budgets, auto-routing or prompt caching, per the pricing table.
How do I set up Claude Code with GLM?
Subscribe to the GLM Coding Plan, create a Z.ai API key, then put ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic into the env block of ~/.claude/settings.json. Z.ai also offers a helper (npx @z_ai/coding-helper). Copy the full model mapping block from docs.z.ai because model names change between releases.
Is it allowed to use the GLM Coding Plan inside Claude Code?
Yes. Z.ai's supported tools page lists Claude Code, and says the plan is limited to its listed tools and product environments and that users may not use plan benefits for tools or scenarios outside that scope. So Claude Code is in scope, but a random third-party app is not necessarily. Read Z.ai's page before wiring the plan into anything else.
How much context do local models need for Claude Code?
Vendors give minimums, not guarantees. LM Studio advises more than about 25k context and notes that tools like Claude Code can consume a lot of context. Ollama says to choose a model with enough context and to set 64k or higher for larger repositories. Larger windows use more memory, so check your hardware.
Which local model is best for Claude Code?
We did not benchmark models, so we do not name a winner. LM Studio's page uses openai/gpt-oss-20b as its example, which is an illustration and not a recommendation. Pick a model that supports tool calling, fits your memory with a large context window, and test it on a small repository first.
What does Ollama support when used as an Anthropic API?
Ollama documents a subset of the Messages API. Not supported: the count_tokens endpoint, tool_choice, metadata, prompt caching, the Batches API, citations, PDF support and error events during streaming. Claude Code can still run, but any feature that depends on those will not work as it does against Anthropic.
What is the cheapest way to run Claude Code on another model?
Local models cost nothing per token but need hardware. Ollama has a $0 pay-as-you-go plan, Cloudflare AI Gateway core features are free, and Vercel AI Gateway and OpenRouter have free tiers with limits. Subscriptions start at the list prices in our pricing table, such as $18 per month for GLM Lite. The cheapest option for you depends on your volume and hardware.
Why is Claude Code ignoring my gateway settings?
Conflicting variables are the usual cause. MiniMax's guide tells you to unset ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL before configuring, because they override the settings file, and to check shell profiles for leftovers. Kimi's guide says the env field in settings.json overrides same-named variables exported in the terminal, so pick one method and do not mix them.
Is 9router safe to use with Claude Code?
It is a community project under the MIT license, not a vendor product, and we did not audit its code or the terms of the providers it connects. Free routes can change or be withdrawn. Keep it away from client code and sensitive repositories, and read our 9router guide for the risks we covered there.
Can I keep my Claude subscription and still use a gateway?
Vercel's AI Gateway docs include a section on using Claude Code Max, keeping your Claude subscription and routing through the gateway. We did not test it. Other gateways in this guide mostly replace the login with an API key, so check each vendor's page.
Sources
All pages read on November 29, 2026.
- Claude Code: LLM gateway and model configuration
- Claude Code Router README
- OpenRouter Claude Code guide, pricing, FAQ
- LiteLLM tutorial
- Ollama Claude Code, Anthropic compatibility, pricing
- LM Studio Claude Code, pricing
- llama.cpp
- Z.ai GLM Coding Plan, Claude Code guide, supported tools
- Kimi Code: Claude Code, membership pricing
- MiniMax Claude Code, monthly offer
- 9router README
- Cloudflare AI Gateway: Claude Code
- Vercel AI Gateway: Claude Code
Names in this list: Claude Code Router, OpenRouter, LiteLLM, Ollama, LM Studio, llama.cpp, GLM Coding Plan, Kimi Code, MiniMax M Plan, 9router, Cloudflare AI Gateway, Vercel AI Gateway. Prices and rules change often, so confirm on the vendor page before you buy.
