Best Local LLMs for Open Claude Code

Open-source Claude Code CLI reimplementation, with an undocumented endpoint override for local models

Open Claude Code (by ruvnet) is a fully open-source reimplementation of Anthropic's Claude Code CLI, built from the same architecture, with 25 tools, MCP transports, and permission modes. Its documented provider support covers 5 cloud vendor APIs (Anthropic, OpenAI, Google, AWS Bedrock, Vertex), each needing a paid vendor key; the project's README makes no mention of Ollama, llama.cpp, or local models. It does expose a configurable OPENAI_BASE_URL (default https://api.openai.com/v1, described in its config as an "OpenAI-compatible base URL"), an undocumented setting that in practice can be repointed at a local OpenAI-compatible server. Because this is a community workaround rather than an officially supported feature, reliability is not guaranteed. If you get it working, the model requirements mirror Claude Code's agentic, tool-call-heavy loop: tool-calling reliability above all.

Best pick
Qwen3.6 35B-A3BAgent-tuned MoE with the strongest open-weight tool-calling here; 100K+ context, runs on a 24GB Mac.
What Open Claude Code needs
Reliable structured tool-calling plus a 32K+ context window, for the undocumented local-endpoint setup described below. Open Claude Code drives the same 25-tool agentic loop as Claude Code, so weak tool-callers break it.
Table 1Tier list

Open Claude Code local LLM tier list

11 models
SS: Best in class2
ModelSizeRAMWhyRun
Qwen3.6 35B-A3B35B32GBAgent-tuned MoE with the strongest open-weight tool-calling here; 100K+ context, runs on a 24GB Mac.
Qwen3.5 35B-A3B Instruct35B32GBProven agentic MoE used in local Claude Code setups; disables internal CoT so the agent drives reasoning.
AA: Strong, reliable3
ModelSizeRAMWhyRun
Qwen2.5 Coder 14B14B16GBTrained for tool use; the most dependable mid-size coding workhorse for an OpenAI-compatible agent CLI.
Gemma 4 31B31B32GBLow tool-call error rates in agentic testing; run with thinking off.
Qwen3 30B30B32GBCapable agentic MoE; reliable tool calls and 256K context for repo-scale work.
BB: Usable with caveats3
ModelSizeRAMWhyRun
LFM2 24B-A2B Instruct24B24GBLiquid's tool-dispatch MoE, efficient on-device agent, fits ~14.5GB; lighter coding depth.
Qwen2.5 Coder 7B7B8GBSolid 8GB fallback with real tool-use training; weaker on long multi-step chains.
Mistral Small 22B22B32GBDecent function calling, fits ~32GB Macs, but long tool sequences can hit format errors.
CC: Works, but not recommended3
ModelSizeRAMWhyRun
DeepSeek-R1 Distill Qwen 14B14B16GBStrong reasoning, but R1 distills drop tool calls into content instead of the tool_calls array.
Phi-4 14B14B24GBLacks proper tool-calling; fine as a chat model, unreliable as an agent.
Qwen3.5 4B Instruct4B6GBAgent-tuned but too small to stay coherent across the long agentic loop.

Tiers weigh tool-calling reliability, context window, and coding quality for Open Claude Code specifically. A model can rank higher for one tool than another. RAM figures are for Q4 quantization. Sources are listed below.

Setup

Local setup notes

Install with npx @ruvnet/open-claude-code or npm i -g @ruvnet/open-claude-code. Officially the CLI only talks to Anthropic, OpenAI, Google, AWS Bedrock, or Vertex, each requiring a paid API key. As an undocumented workaround, run a local OpenAI-compatible server (Ollama, llama.cpp, LM Studio), then set OPENAI_BASE_URL to it (e.g. http://localhost:11434/v1) with OPENAI_API_KEY set to any dummy value, and select your model. Raise the context window to 32K+ for the agentic loop, and expect rougher edges than the officially documented cloud providers.

FAQ

Frequently asked questions

Can Open Claude Code run on local open-source models?
Not officially. Its documented providers are Anthropic, OpenAI, Google, AWS Bedrock, and Vertex, all cloud APIs requiring a paid vendor key; the README does not mention Ollama, llama.cpp, or local models. It does expose a configurable OPENAI_BASE_URL (default https://api.openai.com/v1), so in practice you can point it at a local OpenAI-compatible server (Ollama, llama.cpp, LM Studio) with OPENAI_API_KEY set to any dummy value. Treat this as an undocumented, unsupported workaround, not an officially backed feature.
How is Open Claude Code different from the official Claude Code?
It is an open-source reimplementation built from the same architecture, with 25 tools, MCP transports, slash commands, and permission modes. Its documented provider list (Anthropic, OpenAI, Google, Bedrock, Vertex) is cloud-only like the official client, but its generic OPENAI_BASE_URL setting can be repointed at a local OpenAI-compatible server as an undocumented workaround. The official Claude Code is closed-source and defaults to Anthropic's API.
Which local model is best for Open Claude Code?
If you use the undocumented local-endpoint workaround above, the agent-tuned Qwen3.5/3.6 35B-A3B MoE models are the strongest pick. They emit reliable structured tool calls with 100K+ context and run on a 24GB Apple Silicon Mac. For smaller machines, Qwen2.5 Coder 14B is the dependable lighter pick.
Sources

Sources

Directory

Other AI coding tools

Related

Explore more