<>CLI agent· 11 local models ranked

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.

Open Claude Code: ModelFit

Best pick

Qwen3.6 35B-A3B

Agent-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

SS: Best in class
Qwen3.6 35B-A3B35B· 32GB RAM

Agent-tuned MoE with the strongest open-weight tool-calling here; 100K+ context, runs on a 24GB Mac.

Qwen3.5 35B-A3B Instruct35B· 32GB RAM

Proven agentic MoE used in local Claude Code setups; disables internal CoT so the agent drives reasoning.

AA: Strong, reliable
Qwen2.5 Coder 14B14B· 16GB RAM

Trained for tool use; the most dependable mid-size coding workhorse for an OpenAI-compatible agent CLI.

Gemma 4 31B31B· 32GB RAM

Low tool-call error rates in agentic testing; run with thinking off.

Qwen3 30B30B· 32GB RAM

Capable agentic MoE; reliable tool calls and 256K context for repo-scale work.

BB: Usable with caveats
LFM2 24B-A2B Instruct24B· 24GB RAM

Liquid's tool-dispatch MoE, efficient on-device agent, fits ~14.5GB; lighter coding depth.

Qwen2.5 Coder 7B7B· 8GB RAM

Solid 8GB fallback with real tool-use training; weaker on long multi-step chains.

Mistral Small 22B22B· 32GB RAM

Decent function calling, fits ~32GB Macs, but long tool sequences can hit format errors.

CC: Works, but not recommended
DeepSeek-R1 Distill Qwen 14B14B· 16GB RAM

Strong reasoning, but R1 distills drop tool calls into content instead of the tool_calls array.

Phi-4 14B14B· 24GB RAM

Lacks proper tool-calling; fine as a chat model, unreliable as an agent.

Qwen3.5 4B Instruct4B· 6GB RAM

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.

Open Claude Code official site ↗

The weekly local-AI refresh

New open-weight models, real Apple Silicon benchmarks, and the one model worth running on your Mac this week. Free, one email a week, unsubscribe anytime.

By subscribing you agree to our Privacy Policy and to receive the weekly email. Unsubscribe anytime.

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

Other AI Coding Tools

Explore More

modelfit.io