Introduction
Open-weight models have caught up. In 2026 you no longer have to choose between "frontier quality" and "download the weights and run them yourself" — the best open-weight releases are genuinely competitive at agentic coding, the hardest thing you can ask a coding model to do. The field is crowded and fast-moving, so this guide focuses on the five that matter for coding work and gives you a way to choose between them based on your actual constraint: coding quality, cost, license, or hardware.
The contenders are DeepSeek V4, GLM-5.2, Kimi K3, Alibaba's Qwen open tier, and MiniMax M3. All are mixture-of-experts models with roughly 1M-token context windows. Where they differ — and it's the difference that should drive your choice — is price, license, and what each is optimized for.
What "agentic coding" actually demands
Agentic coding is not autocomplete. It means the model plans a change, reads and edits multiple files, runs tools, reads the output, and iterates — often over a long session. That stresses three capabilities beyond raw code generation: reliable tool use (function calling), a large context window to hold a real codebase, and stability over long horizons so quality doesn't degrade halfway through a multi-step task. A model can write a clean function in isolation and still fail as an agent. Keep those three demands in mind as we go through the contenders.
GLM-5.2: the current open-weight coding leader
Zhipu AI's GLM-5.2 tops most third-party open-weight coding roundups as of July 2026, and it's the one reported to trade blows with closed frontier models on the harder agentic and SWE-Bench-style evaluations. It's a 753B-parameter MoE with a sparse attention stack, a usable 1M-token context, and — importantly — a permissive MIT license, so you can download the weights and run inference on your own infrastructure without licensing friction.
Pricing via API sits around $1.40 input / $4.40 output per million tokens (as of July 2026), the mid-range of this group. If your priority is the strongest open-weight coding quality and you can either pay that rate or stand up the hardware, GLM-5.2 is the default recommendation.
DeepSeek V4: best price-performance
DeepSeek V4 is the value champion. At roughly $0.435 input / $0.87 output per million tokens it's dramatically cheaper than the closed frontier and cheaper than GLM, while staying close on coding quality — which is why it anchors the price floor for serious open-weight work. It ships in two sizes: V4-Pro (1.6T total / 49B active parameters) for maximum quality, and V4-Flash (284B / 13B active) as the accessible option that fits a small multi-GPU box or a quantized single-GPU build. Both carry an MIT license and a 1M context.
If you're running high volume, self-hosting on a budget, or simply want the best quality-per-dollar, DeepSeek V4 is the one to beat. See our companion piece on self-hosted vs API economics for when running it yourself actually pays off.
Kimi K3: the agentic specialist
Moonshot AI's Kimi K3 is a 2.8T-parameter MoE built for tool-using, multi-step work — the "agentic" part of agentic coding. Moonshot's lineage (K2.6 and the K2-Code variants before it) has consistently punched above its weight on the tougher agentic and sub-agent-parallelism benchmarks, making Kimi the pick when your workload is harness-driven pipelines with well-defined task scopes rather than one-shot generation.
Two caveats. First, API pricing is higher — around $3 input / $15 output per million tokens — so it's not the budget choice. Second, on licensing: K3's open weights were announced for release on July 27, 2026, so confirm the current license and availability before you plan a self-hosted deployment around it.
Qwen and MiniMax: the widest family and the cheapest frontier
Qwen has the broadest lineup and the most permissive open tiers. Note the split: Alibaba's flagship Qwen3.7-Max is closed-weight and API-only, while the open-weight coding strength lives in the Qwen open/Plus tier, which ships under Apache-style licensing and is frequently cited as a top open-weight choice for demanding agentic coding. If license permissiveness and a wide model family (including code-specialized variants and the Qwen Code CLI) matter to you, Qwen is the ecosystem play.
MiniMax M3 is the cheapest frontier-ish open-weight option at about $0.30 input / $1.20 output per million tokens, and it adds native multimodality with a 1M context. Its license is a more restricted community license, so read the terms — but for cost-sensitive coding at scale it's a strong contender. NVIDIA's Nemotron 3 Ultra ($0.50 / $2.20, OpenMDW license) is another well-priced open option worth a look.
How to choose
Match the model to your binding constraint:
| Your priority | Pick | Why |
|---|---|---|
| Best open-weight coding quality | GLM-5.2 | Leads open-weight coding roundups; MIT license |
| Best price-performance | DeepSeek V4 | Frontier-close quality at a fraction of the cost; MIT |
| Cheapest to self-host | DeepSeek V4-Flash | 13B active params fits a single GPU / quantized build |
| Agentic, tool-heavy pipelines | Kimi K3 | Built for multi-step, sub-agent parallelism |
| Most permissive license + widest family | Qwen open tier | Apache-style, code-specialized variants |
| Cheapest frontier-ish + multimodal | MiniMax M3 | Lowest price among capable open models |
Prices and rankings above are a July 2026 snapshot; verify current pricing on each provider's page before committing, and read the specific license before any commercial deployment.
The harness matters more than the model
One finding cuts across every roundup: these models perform significantly better inside a structured agent harness — with real tool access, file operations, and an iteration loop — than in raw chat mode. That investment isn't optional for production use. A well-built harness with a mid-tier model routinely beats a frontier model driven sloppily. Tools like Cline, Qwen Code, and Kimi Code exist precisely to provide that scaffolding, and running these open weights locally via Ollama or LM Studio is increasingly practical. Choose a capable model, then spend your effort on the harness around it.
Conclusion
There is no single "best" open-weight coding model in 2026 — there's a best one for your constraint. GLM-5.2 leads on quality, DeepSeek V4 wins on price-performance and self-hosting, Kimi K3 specializes in agentic pipelines, Qwen offers the most permissive licensing, and MiniMax M3 is the cheapest capable option. All of them are close enough to the closed frontier that, for most coding work, the open-weight route is now a real choice rather than a compromise. Decide your priority, read the license, and remember that the harness you wrap around the model will affect your results more than the leaderboard position.