Selecting the right open-weight coding model in 2026 requires balancing performance against infrastructure costs. Kimi K3.1 Pro offers massive 2.8 trillion parameter power for complex agentic tasks but requires data-center hosting. GLM-5.3 provides a mid-range balance of reasoning control and API pricing for long-horizon work. DeepSeek V4.1 Flash delivers the most cost-effective, MIT-licensed solution for high-volume tasks. Qwen3.8-27B is ideal for developers needing a smaller, Apache 2.0-licensed model for local hardware, while GLM-5.3-Flash serves as a multimodal, MIT-licensed option for fast, visual-heavy agent loops. These choices help developers optimize for specific licensing, hardware, and budget constraints.
The best open source coding LLM in late 2026 depends on a question most roundups skip: do you want to download the weights, or just pay less per token? Seven open-weight models now post coding scores within sight of Claude and GPT, and they range from a 27-billion-parameter model to a 2.8-trillion-parameter one.
We compared each model's Hugging Face model card, the vendor's own benchmark tables, its license, and its official API pricing page as of November 2026. Every benchmark figure here is reported by the company that made the model, and the vendors don't use the same test harnesses, so treat cross-vendor gaps of a few points as noise.
This guide is for developers choosing a model for a coding agent, an IDE plugin, or their own product. Each section covers what the model does well, where it falls short, what its license lets you do, and what it costs through the API. The order isn't a ranking. By the end you'll know which model fits your budget, your hardware, and your legal team.
1. Kimi K3.1 Pro
Best for: Teams that want the strongest open-weight agentic coder and can pay for it.
Kimi K3.1 Pro is Moonshot AI's flagship, and its full weights are now on Hugging Face. Moonshot describes it as an open-weight, natively multimodal agentic model with 2.8 trillion parameters, 104 billion of them active per token, and a one-million-token context window. It reads images as well as text.
The coding numbers are the reason it's here. On Moonshot's table, it scores 65.7 on Terminal-Bench 4.0, a test of coding agents working in a real terminal, against 66.4 for Claude Opus 5.5 and 58.2 for GPT-6 Astra. It also leads its own table on SWE Marathon (51.7) and lands at 75.5 on DeepSWE v1.1.
Key features for developers:
Thinking effort: Low, high, or max, set per request with one field
The gaps show up on long software projects. On Program Bench, which checks whether a model can rebuild whole programs, K3.1 Pro scores 31.5 against 65.0 for Opus 5.5. DeepSeek V4.1 Flash also edges it on DeepSWE (77.0 to 75.5) at a fraction of the price. There's a small integration gotcha too: in multi-turn chats and tool calls, you have to send back the full assistant message, including its reasoning, or results degrade.
Then there's the license. K3.1 Pro ships under a custom Kimi K3.1 Pro License instead of MIT or Apache, so have someone read it before you build a product on the weights. And at 2.8 trillion parameters, self-hosting is a data-center job. Zeniteq's Kimi K3.1 Pro launch coverage has more on the Highspeed tier.
2. GLM-5.3
Best for: Long-horizon agent work at a mid-range API price.
GLM-5.3 from Z.ai keeps GLM-5.2's base model and gets all its gains from post-training. Z.ai calls it the most capable open-weights model for coding and reports a 50% jump over GLM-5.2 on its in-house coding benchmark.
The public numbers back up some of that. On Z.ai's table, GLM-5.3 climbs from 4.6 to 28.3 on Terminal Bench 3.0, the hardest terminal test in the set, where Kimi K3 scores 17.4 and GPT-5.6 Sol scores 34.6. It posts 66.9 on DeepSWE v1.1 and 88.2 on Terminal Bench 2.1.
What you get:
Reasoning control: Low, high, and max effort, defaulting to max
Deployment options: SGLang, vLLM, TokenSpeed, Transformers, KTransformers, and Unsloth are all supported
Chip support: Z.ai documents deployment on Ascend NPUs as well as Nvidia GPUs
Input: Text only, so screenshots and mockups need a different model
Z.ai's own table also shows where it's weaker. GLM-5.3 trails Fable 5 on ProgramBench and FrontierSWE, and GPT-5.6 Sol on ProgramBench. Its exploit-writing skills also grew faster than Z.ai expected, enough to get their own section in the model card, so run its agents in a sandbox with tight network rules.
The license is the part to read twice. GLM-5.3 uses its own GLM-5.3 License instead of the MIT terms on the Flash model below. Zeniteq covered the catch in GLM-5.3's open-weight license, which only bites for very large hosted-model businesses, but your lawyers will want to confirm that before you ship.
3. DeepSeek V4.1 Flash
Best for: The lowest API price on this list, under an MIT license.
DeepSeek's current coding workhorse is DeepSeek-V4.1-Flash-1017, the 1017 build served under the model name deepseek-flash. It handles one million tokens of context and up to 384K tokens of output, with thinking on by default and a non-thinking mode you can switch to.
On coding, it punches far above its price. DeepSeek's model card lists 77.0 on DeepSWE v1.1 and 68.2 on NL2Repo-Bench, ahead of Kimi K3 and GLM-5.3 on both. DeepSeek says the 1017 update also finishes tasks faster with shorter outputs, which lowers what each task costs.
What stands out for developers:
Two API formats: OpenAI-style and Anthropic-style base URLs, so it drops into Claude Code
Fill-in-the-middle: Code completion inside a file, in non-thinking mode only (beta)
Off-peak: $0.15 input and $0.60 output, half the peak rate
Cache hits: $0.006 peak, $0.003 off-peak
Peak hours: 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday through Friday
The weights are released under the MIT License, the simplest terms on this list after Apache 2.0. The trade-offs sit elsewhere. Terminal-Bench 4.0 is its weak spot (42.3, against Kimi K3.1 Pro's 65.7), so heavy terminal-driven agents may stall more often. The release also ships without a Jinja chat template; DeepSeek provides a Python reference encoder and a Rust toolkit instead, which adds setup work if you self-host.
Data location matters for some teams too. Using DeepSeek's hosted API sends your code to DeepSeek; running the MIT weights yourself avoids that, but it's a large model. Zeniteq's DeepSeek V4.1 Flash launch coverage walks through what changed from V4.
4. Qwen3.8-27B
Best for: Self-hosting on modest hardware under the most permissive license here.
Qwen3.8-27B is the small model in Alibaba's Qwen3.8 family, and at 27 billion parameters it's a fraction of the size of everything else on this list. It's a dense model (every parameter works on every token) with image and video understanding built in. Its Apache 2.0 license lets you ship it in a commercial product with almost no conditions.
Size usually costs you accuracy, but less than you'd expect here. On Qwen's table it scores 61.7 on SWE-bench Pro, ahead of Alibaba's hosted Qwen3.7-Plus (57.6), and 73.0 on Terminal Bench 2.1, up from 63.4 for Qwen3.6-27B. If you've been running Qwen3.6 or the older Qwen3-Coder, it's a clear step up.
Features worth knowing:
Context: 262,144 tokens natively, extendable to about one million
Thinking control: On by default, can be switched off per request, with adjustable effort
Preserved reasoning: It can keep its earlier reasoning across turns, which helps multi-step coding agents
Serving: SGLang, vLLM, and TokenSpeed have Qwen3.8 recipes
There's no official price yet. Alibaba says a hosted Qwen3.8-27B on Qwen Cloud is coming soon, so today you either run it yourself or use a third-party host. That's the main trade-off: the cheapest way in is your own GPU.
The second trade-off is ceiling. Its DeepSWE v1.1 score of 42.2 sits well below DeepSeek V4.1 Flash's 77.0, so long, multi-file tasks are where you'll notice the gap. If you need more muscle from the same family, Alibaba also announced open weights for Qwen3.8-Max, a 2.4-trillion-parameter model with 95 billion active, though that's a cluster-sized download with its own license to check.
5. GLM-5.3-Flash
Best for: Cheap, fast agent loops that need to see screenshots.
GLM-5.3-Flash is Z.ai's smaller, newer sibling to GLM-5.3, and it's built on a fresh base model. It has 320B total parameters with 18B active, an MIT license, and native image and video input, which makes it the first multimodal model in the GLM-5 series.
Z.ai says it beats GLM-5.2 at one-tenth the price while approaching Claude Opus 4.8 on coding. Its docs list 63.4 on DeepSWE v1.1 against 46.2 for GLM-5.2, and 29.0 against Opus 4.8's 29.5 on Z.ai's in-house coding benchmark. It mixes two kinds of attention (the part of a model that tracks long context), which Z.ai says cuts KV-cache memory 4.44 times compared with GLM-5.3. That's what makes long sessions cheap to serve.
Key features:
Context: 1M tokens in, 128K tokens out
Visual coding loop: It can look at rendered pages and app screens to check its own front-end work
Tools: Function calling, structured JSON output, and context caching
Coding Plan: Three times the quota of GLM-5.3 on Z.ai's subscription, with off-peak use at half the points
The catch is consistency on the hardest tasks. It trails the full GLM-5.3 on DeepSWE (63.4 vs. 66.9), and thinking can't be turned off, so quick one-line completions still pay for reasoning tokens. Check how your agent handles a model that always reasons before you switch a whole pipeline to it.
6. Kimi K2.7 Code
Best for: Self-hosters who want a coding-tuned model under a permissive license.
Kimi K2.7 Code is Moonshot's dedicated coding model, built on Kimi K2.6. It's a 1-trillion-parameter model with 32B active, a 256K context window, and a Modified MIT License. Moonshot says it uses about 30% fewer thinking tokens than K2.6, which means faster and cheaper answers for the same task.
On Moonshot's chart it scores 62.0 on Kimi Code Bench v2 (up from 50.9 for K2.6) and 81.1 on MCP Mark Verified, a tool-use test. GPT-5.5 and Claude Opus 4.8 still lead it on most rows, so think of it as a strong mid-tier coder.
Why developers pick it:
Native INT4 weights: Smaller downloads and lower memory needs than full-precision checkpoints
Drop-in deployment: Same architecture as K2.5 and K2.6, so existing vLLM, SGLang, or KTransformers setups carry over
Multimodal: Accepts image and video input
Agent fit: Moonshot recommends pairing it with its Kimi Code CLI
Here's the big caveat. Moonshot's pricing page says K2 series models closed to newly registered users on October 31, 2026, and all K2 models will retire from the API by the end of December. Existing users still pay $0.95 per million input tokens and $4.00 per million output tokens until then.
So the API route is closing. The weights stay open, which makes K2.7 Code a self-hosting pick now, and a 1T-parameter model still needs a multi-GPU server. If you want Moonshot's hosted coding model going forward, K3.1 Pro is where the company is steering you; confirm your migration date before building anything new on K2.7 Code's API.
7. Ling 3.1 Flash
Best for: Teams who want a large MIT-licensed model with a 1M-token window.
Its self-reported coding results are solid. The model card lists 68.74 on SWE-bench Pro, 88.5 on SWE-bench Multilingual, and 59.7 on DeepSWE. InclusionAI also says it works well inside Claude Code, Kilo Code, Qwen Code, and other agent frameworks, which matters if you don't want to switch tools.
What to know:
Architecture: A hybrid of linear and standard attention, built to keep long contexts cheap
Serving: Day-zero SGLang support with speculative decoding, plus a vLLM path
Hardware: The reference setup runs on eight Nvidia H200 GPUs, or four GB300s
Access: The card links to OpenRouter and lists Novita as an inference provider
There's no first-party price list on the model card, so what you pay depends on the host you pick. Compare a couple of providers before committing, since hosted prices for the same open model can differ a lot.
Two cautions. InclusionAI says its own LingCode harness gives the model significant gains on some coding agent tasks, and that harness isn't public yet, so its best agent scores may be hard to reproduce in your setup. And eight H200s is a serious bill if you self-host. Run your own repository through it before trusting the leaderboard numbers.
How to choose the right open source coding LLM?
The right open source coding LLM is the one whose license, price, and hardware needs fit your situation; on raw coding scores, the top five are closer than their marketing suggests. Start with how you'll run it, then narrow by price and license.
What to look for in an open source coding LLM
License terms: MIT and Apache 2.0 let you ship almost anything. Custom licenses (Kimi K3.1 Pro, GLM-5.3) add conditions, and skipping the read can block a launch late in the process.
Agentic coding scores: DeepSWE, Terminal-Bench, and SWE-bench Pro test multi-step work in real repos. A model that aces short completions can still stall on a 40-file refactor.
Price per output token: Output costs three to five times more than input on every model here, and coding agents write a lot. Compare on input price alone and you'll underestimate the bill.
Cache pricing: Agents resend the same files every turn, so cached-input rates often drive the real cost.
Hardware to self-host: Active parameters set speed; total parameters set memory. A 1T-parameter model needs a multi-GPU server even if only 32B parameters work per token.
API stability: A retiring endpoint (Kimi K2.7 Code) means a forced migration a few months in.
If you want the best agent results and can pay: Pick Kimi K3.1 Pro.
If cost per task matters most: Pick DeepSeek V4.1 Flash, and schedule batch work off-peak.
If your agent needs to see the UI it builds: Pick GLM-5.3-Flash.
If you'll self-host on a single server or less: Pick Qwen3.8-27B.
If your legal team wants MIT or Apache only: Choose from DeepSeek V4.1 Flash, GLM-5.3-Flash, Ling 3.1 Flash, or Qwen3.8-27B.
If you're already running Kimi K2.6 locally: Kimi K2.7 Code is a drop-in upgrade.
Skip the category if you need the very top scores on whole-program builds; Claude Opus 5.5 still leads Kimi K3.1 Pro by a wide margin on Program Bench.
Final thoughts
Open-weight coding models have closed most of the gap. Kimi K3.1 Pro sits within a point of Claude Opus 5.5 on Terminal-Bench 4.0, and DeepSeek V4.1 Flash matches frontier DeepSWE scores for about $5 to $11 a month in our example. What separates the best open source coding LLM for you is license, price, and hardware, since raw coding scores are now close.
My pick is DeepSeek V4.1 Flash for most developers, because its MIT license, low price, and top DeepSWE score cover the common case with no legal review. I'd reach for Kimi K3.1 Pro when an agent keeps failing on long terminal tasks, and Qwen3.8-27B when the code can't leave your own machines.
What do you think of this list? Is there an open-weight coding model you'd add, like MiniMax or Mistral's Devstral, or one you'd swap out?
What do you think of this list? Share your thoughts in the comments.
Frequently Asked Questions
5 questions
1
Is an open-weight model the same as open source?
No. An open-weight model lets you download and run the trained weights, but the training data and code usually stay private. Most "open source" coding LLMs, including all seven here, are open-weight, and their licenses range from Apache 2.0 to custom terms.
2
What is the cheapest open source coding LLM to use through an API?
Can I use these open source coding LLMs commercially?
Yes, though the terms differ. Qwen3.8-27B uses Apache 2.0, and DeepSeek V4.1 Flash, GLM-5.3-Flash, and Ling 3.1 Flash use MIT. Kimi K2.7 Code, Kimi K3.1 Pro, and GLM-5.3 carry modified or custom licenses you should read first.
4
Which open source coding LLM can I run on my own hardware?
Qwen3.8-27B is the most practical, because it's a 27-billion-parameter dense model. Every other model here is a mixture-of-experts model with 320 billion to 2.8 trillion total parameters, which means multi-GPU servers.
5
Do open-weight coding models work with Claude Code?
Yes. Kimi and DeepSeek both offer Anthropic-compatible APIs, Z.ai benchmarks GLM-5.3 inside Claude Code, and InclusionAI says Ling 3.1 Flash works well there too. Set the base URL and model name in your agent's settings and they'll behave like any other provider.