Skip to main content

Best Open-Weight Coding Models

The current open-weight models for coding agents come from Moonshot AI, DeepSeek, Z.ai, Qwen, MiniMax and Mistral. Read the license before you build on one, because only some use MIT or Apache 2.0.

An open-weight model publishes its trained weights. You can run it on your own GPUs, fine-tune it, or call the vendor's hosted API at a lower price than most closed models. This page compares the open-weight models that vendors position for coding and agent work. Figures were checked against each vendor's official model card, license file and pricing page in November 2026 and will change.

Models at a Glance​

Hosted prices are each vendor's own API list price in US dollars per million tokens.

ModelVendorWeights releasedTotal / active parametersContext windowHosted inputHosted output
Kimi K3.1 ProMoonshot AINov 20262.8T / 104B1M$2$10
DeepSeek-V4-Pro-0813DeepSeekAug 2026Not stated1M$1.32$3.96
DeepSeek-V4.1-Flash-1017DeepSeekOct 2026Not stated1M$0.30$1.20
GLM-5.3Z.aiAug 2026Not stated1M$1.40$4.40
GLM-5.3-FlashZ.aiAug 2026320B / 18B1M$0.15$0.50
Qwen3.8-2.4T-A95BQwenAug 20262.4T / 95B262K native$2$6
Qwen3.8-27BQwenAug 202627B dense262K nativeNot yet hostedNot yet hosted
MiniMax-M3.1-FlashMiniMaxOct 2026About 428B / 23B1M$0.15$0.60
Mistral Large 4Mistral AISep 20261.05T / 52B1M$0.70$2.10
gpt-oss-120bOpenAIAug 2025117B / 5.1B131KNot listedNot listed

DeepSeek prices are peak rates, and off-peak rates are half. Qwen's hosted price is for Qwen3.8-Max, the hosted version built on the 2.4T weights. It serves a 1M context window, while the weights support 262,144 tokens natively and up to 1,010,000 with extension. Qwen says Qwen3.8-27B will get a hosted version later.

Licenses​

The license decides whether you can ship a product on the weights. MIT and Apache 2.0 grant broad commercial use. The vendor licenses below copy MIT's grant and then add conditions.

ModelLicenseMain conditions beyond MIT
DeepSeek-V4-Pro-0813, DeepSeek-V4.1-Flash-1017, GLM-5.3-FlashMITNone
Qwen3.8-27B, gpt-oss-120bApache 2.0None beyond Apache terms
Kimi K3.1 ProKimi K3.1 Pro LicenseA model-as-a-service business above $20M revenue in 12 months needs a separate agreement. Products above 100M monthly users or $20M monthly revenue must display the model name.
GLM-5.3GLM-5.3 LicenseA model-as-a-service business above $10B revenue in 12 months must pass a Z.ai security review.
Qwen3.8-2.4T-A95BQwen3.8-Max LicenseA model-as-a-service or AI coding or office-assistant business above $50M revenue in 12 months needs a separate license. Large products must display the model name.
MiniMax-M3.1-FlashMiniMax Community LicenseThe base grant covers non-commercial use. Commercial use requires a "Built with MiniMax M3.1-Flash" notice and a one-time email to MiniMax, and written approval above $20M yearly revenue.
Mistral Large 4Mistral Ecosystem Open-Weight LicenseAny model-as-a-service business needs a separate commercial license, with no revenue threshold.

Internal use is exempt from the model-as-a-service conditions in the Kimi, Qwen and Mistral licenses. The Qwen3.8-Max License names AI coding products explicitly. If you are building a coding tool, read that clause with a lawyer before you depend on the weights.

Vendor-Reported Coding Scores​

Each vendor publishes benchmark results on its model card. The table shows DeepSWE v1.1, a coding benchmark that five of these model cards report. Each vendor ran it with its own agent framework and context limit, so the scores are not a fair ranking. Treat them as the vendor's claim.

ModelDeepSWE v1.1Agent framework the vendor usedSource
DeepSeek-V4.1-Flash-101777.0Mini-SWE-V2DeepSeek model card
Kimi K3.1 Pro75.5Claude CodeMoonshot AI model card
MiniMax-M3.1-Flash73.7mini-SWE-agent, 512K contextMiniMax model card
GLM-5.366.9mini-swe-agent, 400K contextZ.ai model card
Qwen3.8-Max56.6Best of Claude Code and mini-SWE-agent, 256K contextQwen model card

Hosting Your Own vs Calling the API​

Self-hosting gives you control over data and rate limits, but the largest models need a multi-GPU server. Kimi K3.1 Pro and Qwen3.8 have 2.4T to 2.8T parameters. Moonshot ships Kimi K3.1 Pro weights in MXFP4 to shrink the memory footprint, and Mistral publishes an NVFP4 checkpoint of Large 4 for Blackwell GPUs. At the small end, OpenAI states that gpt-oss-120b fits on a single H100 GPU, and Qwen3.8-27B is a dense 27B model.

Moonshot AI, Z.ai, Qwen and Mistral document vLLM and SGLang support on their model cards. Active parameters set the compute spent per token. GLM-5.3-Flash activates 18B and MiniMax-M3.1-Flash activates 23B, and both sit among the cheapest hosted options.

Using Them in Coding Tools​

You do not need to self-host to try these models in a coding agent. Moonshot AI, DeepSeek and MiniMax offer Anthropic-compatible endpoints, and Moonshot and DeepSeek publish setup guides for Claude Code. DeepSeek also documents Codex and OpenCode. Z.ai sells a coding plan for Claude Code, Cline, OpenCode and Kilo Code. GitHub Copilot lists Kimi K3, the predecessor of K3.1 Pro, as generally available.

How to Choose​

The right model depends on what you will do with it. For a hosted API at the lowest price, GLM-5.3-Flash, MiniMax-M3.1-Flash and DeepSeek's deepseek-flash endpoint cost $0.15 to $0.30 per million input tokens. For the largest open models, Kimi K3.1 Pro and Qwen3.8 are the 2.4T-plus options. For a product that redistributes or serves the weights, start from the MIT and Apache 2.0 models and treat the others as needing legal review.

Vendor scores do not transfer to your codebase. Run each candidate on 20 to 50 closed issues from your own repository, with a failing test for each, and compare pass rate and cost per passing task.

Open-weight models fit well as cheaper workers under a stronger lead model, a pattern covered in agent orchestration. Whichever model you choose, quality gates decide whether its changes pass.

Next Steps​