Models

Best Open Source LLM for Coding: Models Compared

Checked 2026-10-31

Loading poll...

For coding agents, the open models with the strongest vendor-reported scores on 31 October 2026 are GLM-5.3, DeepSeek-V4-Pro-0813, Kimi K3 and DeepSeek-V4.1-Flash-1017. For one-GPU work, pick gpt-oss-120b or Qwen3.8-27B. Every score here is the maker's own and none is independent, so shortlist two models and run them on your own repository.

The short answer by situation

Your situation

Pick

Licence

Best open agentic coder, you have a cluster or use an API

GLM-5.3

glm-5.3 (custom, revenue line at 10 billion dollars for Model-as-a-Service)

Cheapest strong API for agent loops

DeepSeek-V4.1-Flash (deepseek-flash)

MIT

Largest open model, long autonomous sessions

Kimi K3

kimi-k3 (custom)

One 80 GB GPU, agent-ready

gpt-oss-120b

Apache-2.0

A 24 to 48 GB workstation

Qwen3.8-27B or Gemma 4 31B

Apache-2.0

Already on Mistral tooling

Mistral Large 4

Mistral Ecosystem Open-Weight (custom)

What counts as a coding model here

We looked at open-weight models whose own cards claim coding or agentic strength: the Z.ai, DeepSeek, Moonshot, Alibaba, Mistral, Google and OpenAI releases. We excluded closed models, and we excluded old releases whose cards no longer reflect the current lineup. Meta's Llama 4 is still the newest Llama on Hugging Face, from 2025, and its gated card did not give us coding scores we could read.

Coding quality for agents is a different thing from writing a function. Agents run for many turns, call tools, read errors and recover. That is why the newer cards lead with terminal and repository benchmarks rather than single-function ones.

Published benchmark scores

All figures below are vendor-reported on the maker's Hugging Face card, and each card chooses its own harness and effort setting. Cells marked with a dash mean the card did not report a figure. We did not run any of these.

Terminal and repository tasks

Model

Terminal Bench 2.1

DeepSWE (v1.1)

NL2Repo

Source card

GLM-5.3

88.2

66.9

58.0

Z.ai, Claude Code 2.1.207 harness for Terminal Bench

Kimi K3

88.3

67.5

58.0

As cited on the GLM-5.3 card

DeepSeek-V4-Pro-0813

87.9

62.7

61.5

DeepSeek card, minimal DeepSeek Harness, max effort

Qwen3.8-Max (API model built on the 2.4T weights)

86.6

56.6

55.9

As cited on the GLM-5.3 card

GLM-5.2

81.0

46.2

48.9

Z.ai card

For reference, the GLM-5.3 card lists Claude Opus 4.8 at 85.0 on Terminal Bench 2.1 and 58.0 on DeepSWE, and GPT-5.6 Sol at 88.8 and 72.7. Those are also reported by Z.ai, not by the model makers.

One discrepancy shows how soft these numbers are. DeepSeek's card gives NL2Repo as 61.5 for its own model, while the GLM-5.3 card prints 61.1 for the same model. Different harness settings explain gaps like that. That is why we call them a shortlist.

Newer harder tests

DeepSeek's October card for the smaller V4.1 Flash switches to newer tests:

Benchmark

DS-V4.1-Flash-1017

Kimi K3

GLM-5.3

Opus 5 (as listed)

Terminal-Bench 4.0

42.3

12.6

37.9

51.8

DeepSWE v1.1

77.0

67.5

66.9

74.0

ProgramBench

29.1

17.5

19.0

37.0

NL2Repo-Bench

68.2

58.0

58.0

75.3

Source: DeepSeek-V4.1-Flash-1017 card, Claude Code harness for Terminal-Bench 4.0 and Mini-SWE-V2 for DeepSWE. A cheap Flash model beating larger ones on DeepSWE is DeepSeek's claim, made on its own card. The same card shows the closed model ahead on three of the four rows.

Single-model figures from other labs

Model

Score

Test

Source

Mistral Medium 3.5 (128B dense)

77.6%

SWE-Bench Verified

Mistral card, vendor-reported

Gemma 4 31B

80.0%

LiveCodeBench v6

Google card

Gemma 4 31B

2150

Codeforces ELO

Google card

Gemma 4 31B

76.9%

Tau2 (average over 3)

Google card

LiveCodeBench and Codeforces measure competition-style problems, not repository work. Do not read Gemma's 80.0 against the DeepSWE column. We found no SWE-bench or terminal score in the text of the gpt-oss-120b card. The Qwen3.8-27B card's text table lists SWE-bench Pro at 61.7 and Terminal Bench 2.1 (Terminus) at 73.0, both vendor-reported, and it also lists a different version, Terminalbench 4, at 5.6, so do not read one against the other.

Licences that affect coding use

A coding assistant inside your company is internal use, which every licence above allows. Trouble starts when you offer model access to others.

  • MIT or Apache-2.0 (DeepSeek V4, Qwen3.8-27B, gpt-oss, Gemma 4, GLM-5.3-Flash): no conditions that matter for products.
  • Kimi K3: a Model-as-a-Service business above 20 million dollars of revenue over twelve months needs a separate agreement. Internal use is exempt.
  • GLM-5.3: the equivalent line is group revenue above 10 billion dollars, which triggers a Z.ai security review.
  • Kimi K2.7-Code: a plain MIT text plus one display clause for products above 100 million monthly users or 20 million dollars monthly revenue.

See open source LLM for the full licence table.

API prices for the strongest picks

Prices are per million tokens, from each maker's pricing page, checked 31 October 2026. USD.

Model (API name)

Input

Output

Cached input

Context

DeepSeek V4.1 Flash (deepseek-flash), off-peak

$0.15

$0.60

$0.003

1M

DeepSeek V4 Pro (deepseek-v4-pro), off-peak

$0.66

$1.98

$0.022

1M

GLM-5.3-Flash

$0.15

$0.50

$0.03

1M per Mistral model page

GLM-5.3

$1.40

$4.40

$0.26

1,048,576 per config.json

Qwen3.8-27B (Alibaba Cloud Model Studio, international)

$0.50

$3.00

not captured

1M tier

DeepSeek peak rates (01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, excluding Chinese public holidays) are exactly double the off-peak figures. The Kimi K3 and K2.7-Code per-token price tables were empty in our fetch of Moonshot's pricing page, so we quote no rates. Moonshot does state that batch inference on K3 is billed at 60 percent of the standard price.

Compare these with the closed rates on LLM API prices: Claude Sonnet 5.5 is $2 and $10, Opus 5.5 is $4 and $20. A rough example: an agent session that reads 2 million input tokens and writes 200,000 output tokens costs $0.42 on deepseek-flash off-peak ($0.30 for input plus $0.12 for output, with no cache hits assumed) against $6.00 on Sonnet 5.5 ($4 plus $2). That arithmetic holds only if the cheaper model finishes the task as often, which is the thing you have to test.

Where to run them

  • Maker APIs. DeepSeek, Z.ai and Moonshot sell their own weights. Z.ai also sells a GLM Coding Plan, which its docs say includes GLM-5.3.
  • Third-party hosts. Mistral's model page lists GLM 5.3, GLM 5.3 Flash and DeepSeek V4.1 Flash as third-party models you can call through its platform. See also Hugging Face Inference, Cloudflare Workers AI and AWS Bedrock; check each catalogue for the models you want.
  • Your own GPUs. Runpod, Modal and Lambda rent the hardware. Weights alone for the frontier-size models run to terabytes, so only the small ones are single-node jobs.

Which coding agents can use them

Agent

Open model route

Evidence

Claude Code

Anthropic-format base URL

DeepSeek docs list Claude Code; GLM-5.3 and Kimi cards report runs in it

OpenCode

OpenAI-compatible endpoint

Listed in DeepSeek's agent integrations

OpenClaw

OpenAI-compatible endpoint

Listed in DeepSeek's agent integrations

Cline

Any OpenAI-compatible provider

Choose the "OpenAI Compatible" provider, then enter the provider's base URL, an API key and a model ID

Kimi Code CLI

Moonshot models

Named on the Kimi K2.7-Code card as its test harness

Mistral Vibe CLI

Mistral models or local vLLM

Mistral Medium 3.5 card

A caution that applies to every row: agent tools are tuned against particular models. A different backend can work and still behave differently on tool calls and long sessions. Our DeepSeek vs Claude page covers that tradeoff in more detail.

Local hardware for the open ones

Model

What the card documents

Our arithmetic for weights

gpt-oss-120b

One 80 GB GPU such as H100 or MI300X, MXFP4

About 58 GB at 4-bit

Qwen3.8-27B

vLLM, SGLang, TokenSpeed recipes

About 56 GB in BF16

Gemma 4 31B

QAT 4-bit variants published

About 61 GB in BF16

Mistral Medium 3.5

Tensor parallel 8 in vLLM example

About 255 GB in BF16

DeepSeek-V4-Pro-0813

4x GB300 node in the vLLM example

Terabyte class

GLM-5.3

SGLang, vLLM, KTransformers recipes

About 1.5 TB in BF16

KTransformers, linked from the GLM-5.3 card, is the route people use to run huge MoE models with part of the weights in system RAM. We did not test it.

What an agent needs from a model

A repository agent loops: read files, plan, edit, run tests, read the failure, try again. Four model features decide how well that goes, and the cards document them unevenly.

  • Effort control. DeepSeek V4 and GLM-5.3 both take a reasoning effort of low, high or max. GLM-5.3 defaults to max when you pass nothing, so an untuned call is the slow, expensive one. Mistral Large 4 offers low, medium and high, with high as the default. Qwen3.8 exposes reasoning_effort too.
  • Thinking that persists. Kimi K3 requires the full assistant message, reasoning included, to go back on the next turn. Qwen3.8 keeps earlier thinking blocks by default through preserve_thinking. An agent framework that drops those fields will underperform.
  • Output length. DeepSeek recommends up to 384K output tokens at high and max effort. Z.ai's benchmark notes use 128K. Many agent tools cap output lower unless you raise it. GLM's own notes mention bypassing a 64K cap in Claude Code through a proxy to reach 128K.
  • Context. Million-token windows are common now, but the cards run their long-horizon tests with managed context. Z.ai's HLE run, for example, used a 300,000-token maximum with a context management strategy. Do not assume a full 1M window behaves like the first 100K.

Model by model

GLM-5.3

Z.ai says it uses the same base as GLM-5.2, with every gain from post-training, and claims a 50 percent improvement over GLM-5.2 on its in-house Z.ai Code Bench. It is a text-only model with 256 routed experts, a 1,048,576-token position limit in its config and a custom licence. The same card reports the open-weights lead on CyberGym at 84.5, which matters if your agent touches security work. See GLM models.

DeepSeek V4 Pro and V4.1 Flash

Pro is an MIT-licensed model of about 1.65 trillion parameters, with a speculative decoding module attached in the 0813 release. Flash is smaller, about 763 billion, accepts images, and is the model behind the deepseek-flash API name. The API lists a 1M context and 384K maximum output for both. DeepSeek also supports a Responses API and an Anthropic-format endpoint, which is why so many agents work with it unmodified. See DeepSeek models.

Kimi K3 and K2.7-Code

K3 is a 2.8 trillion parameter model that activates 16 of 896 experts, accepts text, image and video, and has a one-million-token window. K2.7-Code is the older and smaller coding-tagged sibling: 1 trillion total, 32 billion active, 256K context, native int4 weights. Moonshot says the K2 API models stop accepting new users from 31 October 2026 and are planned to retire by the end of December 2026, so new work belongs on K3. See Kimi models.

Qwen3.8

Two very different releases share the name. The 27B dense model is Apache-2.0, reads images and video, and is the practical pick for a single GPU. The 2.4T-A95B model has a custom licence, no image input and no way to switch thinking off. Alibaba sells the larger one as Qwen3.8-Max. See Qwen models.

gpt-oss-120b and 20b

OpenAI's Apache-2.0 pair was released in August 2025 and remains the cleanest small-footprint choice, with 5.1B active parameters in the larger model. They must be driven in OpenAI's harmony response format, which serving engines handle for you. A 131,072-token context is the smallest in this group. See gpt-oss.

Mistral Medium 3.5 and Large 4

Medium 3.5 is a 128B dense model that Mistral says replaces Devstral 2 in its Vibe CLI. Mistral's docs mark it deprecated on the hosted API from 31 October 2026 in favour of Large 4, though the weights remain published. Large 4 is a 1T-parameter multimodal MoE with 1M context. Its API price is $0.70 input and $2.10 output per million tokens, with cached input at $0.07. See Mistral models.

Gotchas we would check before adopting any of them

  • Harness drift. Terminal Bench results move several points with the harness. GLM's GLM-5.2 card prints two different scores for the same model, 81.0 with Terminus-2 and 82.7 for the best reported harness.
  • New benchmark versions. Terminal Bench is at 2.1, 3.0 and 4.0 in different cards. The same model scores very differently across versions, so never compare a 2.1 figure to a 4.0 one.
  • Model churn. Names carry dates (0813, 1017) because makers update in place. Pin the exact version in your config.
  • Privacy of hosted APIs. Using a maker's API sends your code to that maker. Data retention and training terms were not on the pricing pages we read. DeepSeek's privacy policy lists user input among data it trains on, with an opt-out. Z.ai's data processing terms say it stores none of the content customers send, processes data generally in Singapore, and do not say whether API inputs train models. Moonshot's terms say Customer Content may be used to improve its services unless otherwise agreed in writing, and give no retention period.

How to choose, step by step

  1. Decide whether you can send code to a maker's API. If not, you are in self-host territory and the shortlist is gpt-oss-120b, Qwen3.8-27B, Gemma 4 31B and, with a cluster, DeepSeek V4 or GLM-5.3.
  2. Pull 20 real tasks from your own history: failing tests, small features, a refactor. Public benchmarks do not contain your build system.
  3. Run two open models and one closed baseline through the same agent harness at the same effort level.
  4. Count cost per solved task, not per token. A cheap model that needs three tries is not cheap.
  5. Re-run when the maker ships an update. DeepSeek moved from V4-Pro Preview to 0813 and Flash to 1017 within months.

Our take

From the documents alone, GLM-5.3 and DeepSeek V4 are where we would look first for a hosted open coder, and gpt-oss-120b or Qwen3.8-27B for a box you control. GLM-5.3 posts the highest open-weight cyber and Terminal Bench figures on its own card, DeepSeek has the plainer licence and a far lower price, and Kimi K3 is the largest model in the group. The honest limit of this page is that the scores are self-reported. See also the model comparison tool and our pages on GLM, DeepSeek, Kimi and Qwen.

Questions

Which open source LLM is best for coding?

On vendor-reported agentic coding scores, GLM-5.3, DeepSeek-V4-Pro-0813, Kimi K3 and DeepSeek-V4.1-Flash-1017 lead. None of those numbers are independent, so test two or three on your own repository.

What is the best open model I can run on one GPU?

gpt-oss-120b is documented to fit a single 80 GB GPU. Qwen3.8-27B and Gemma 4 31B fit one large GPU when quantised.

Can open models work inside Claude Code or OpenCode?

DeepSeek's docs list Claude Code, Codex, OpenCode and OpenClaw as supported front ends through its OpenAI-format and Anthropic-format endpoints. Other labs document similar compatible endpoints.

Are the benchmark scores trustworthy?

They are the makers' own numbers, run in different harnesses. Treat them as a shortlist, not a ranking.

Loading poll...

Sources

  1. huggingface.co/zai-org/GLM-5.3
  2. huggingface.co/deepseek-ai/DeepSeek-V4-Pro-0813
  3. huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017
  4. huggingface.co/moonshotai/Kimi-K3
  5. huggingface.co/moonshotai/Kimi-K2.7-Code
  6. huggingface.co/Qwen/Qwen3.8-27B
  7. huggingface.co/mistralai/Mistral-Medium-3.5-128B
  8. huggingface.co/google/gemma-4-31B-it
  9. huggingface.co/openai/gpt-oss-120b
  10. api-docs.deepseek.com/quick_start/pricing
  11. docs.z.ai/guides/overview/pricing
  12. docs.cline.bot/provider-config/openai-compatible
  13. platform.kimi.ai/docs/pricing/chat
  14. docs.z.ai/legal-agreement/privacy-policy
  15. platform.kimi.ai/docs/agreement/modeluse
  16. cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html

Part of the Wbcom Designs family

The all-in-one WordPress community stack

Also ours: wbcomdesigns.comvapvarun.combrndle.com