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.
Open Claude Code local LLM tier list
11 models| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| Qwen3.6 35B-A3B | 35B | 32GB | Agent-tuned MoE with the strongest open-weight tool-calling here; 100K+ context, runs on a 24GB Mac. | |
| Qwen3.5 35B-A3B Instruct | 35B | 32GB | Proven agentic MoE used in local Claude Code setups; disables internal CoT so the agent drives reasoning. |
| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| Qwen2.5 Coder 14B | 14B | 16GB | Trained for tool use; the most dependable mid-size coding workhorse for an OpenAI-compatible agent CLI. | |
| Gemma 4 31B | 31B | 32GB | Low tool-call error rates in agentic testing; run with thinking off. | |
| Qwen3 30B | 30B | 32GB | Capable agentic MoE; reliable tool calls and 256K context for repo-scale work. |
| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| LFM2 24B-A2B Instruct | 24B | 24GB | Liquid's tool-dispatch MoE, efficient on-device agent, fits ~14.5GB; lighter coding depth. | |
| Qwen2.5 Coder 7B | 7B | 8GB | Solid 8GB fallback with real tool-use training; weaker on long multi-step chains. | |
| Mistral Small 22B | 22B | 32GB | Decent function calling, fits ~32GB Macs, but long tool sequences can hit format errors. |
| Model | Size | RAM | Why | Run |
|---|---|---|---|---|
| DeepSeek-R1 Distill Qwen 14B | 14B | 16GB | Strong reasoning, but R1 distills drop tool calls into content instead of the tool_calls array. | |
| Phi-4 14B | 14B | 24GB | Lacks proper tool-calling; fine as a chat model, unreliable as an agent. | |
| Qwen3.5 4B Instruct | 4B | 6GB | Agent-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.
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.
Get told when a better model fits your MacBook Air M5 16 GB
Get one email when a new open-weight model is a better fit for this machine.
For: MacBook Air M5 16 GB
You'll also get the weekly ModelFit email. By signing up you agree to our Privacy Policy. Unsubscribe from either email anytime, in one click.
Frequently asked questions
Can Open Claude Code run on local open-source models?
How is Open Claude Code different from the official Claude Code?
Which local model is best for Open Claude Code?
Sources
- Open Claude Code: open-source Claude Code CLI reimplementation (ruvnet)
- README: documented providers are Anthropic, OpenAI, Google, AWS Bedrock, Vertex, no local-model mention
- Configurable OPENAI_BASE_URL / ANTHROPIC_BASE_URL (env config, undocumented in the README)
- Per-model agentic tool-calling results (shared Claude Code loop)
- DeepSeek-R1 distills drop tool calls into content
Other AI coding tools
- Claude CodeAnthropic's terminal coding agent, driven by a local modelCLI agent
- OpenCodeOpen-source terminal coding agent (Ollama / OpenAI-compatible)CLI agent
- OpenClawSelf-hosted agentic assistant with first-class Ollama supportSelf-hosted agent
- AiderTerminal AI pair-programmer with its own edit-format leaderboardTerminal pair-programmer
- ClineAutonomous coding agent for VS Code (formerly Claude Dev)IDE extension
- Roo CodeAutonomous VS Code agent with modes (a Cline fork)IDE extension
- Continue.devOpen-source chat, edit & autocomplete for VS Code / JetBrainsIDE extension
- GooseBlock's open-source autonomous developer agent (MCP-driven)CLI agent
- CodexOpenAI's coding agent, driven by a local model via its built-in Ollama providerCLI agent