How to pick an open model for a coding agent

Choose an open model for agentic coding: what to check (tool calling, context, memory, license), which models fit one GPU or a server, and how to test them on your own repository.

  • Intermediate
  • 8 min read
  • Published
  • Updated

Short answer. A coding agent needs a long context, reliable tool calling and enough memory for the KV cache. On one 24 to 48 GB GPU or a high-memory Mac, start with Qwen3.6, gpt-oss or Ornith 1.5. On a multi-GPU server, look at DeepSeek V4, GLM-5.3 Flash or Kimi K2.7 Code. Test two or three in your own harness, on your own repository, because every published agent score comes from the developer.

What makes a coding agent different

A plain code assistant completes the line you are typing. Agentic coding is a loop: the model receives a task, explores the repository, edits files, runs commands and tests, reads the errors and tries again, often over dozens or hundreds of tool calls. Moonshot says Kimi K2.7 Code handles sequences of 4,000 or more calls, though that figure is self-reported.

That loop asks more of a model than chat does: a long context window, reliable tool calling and the stamina not to lose the thread. Our coding and agents list shows the models we track for this job.

Five things to check in a model

  1. Tool calling. Support is a property of both the model and the server. The model must be trained for the format, and an inference server such as vLLM or SGLang needs the matching parser turned on. Ornith, for example, works through an OpenAI-compatible server with the Qwen-style tool-call parsers.
  2. Context length. gpt-oss offers 128K tokens, Qwen3.6 256K, Kimi K2.7 Code 256K, and DeepSeek V4, GLM-5.3 Flash, Laguna S 2.1 and Ling 3.1 Flash 1M.
  3. Reasoning behavior. Some models think before they answer, which costs tokens and time. Ornith thinks by default and its cards recommend a temperature of 0.6 for coding, and Kimi K2.7 Code cannot turn thinking off.
  4. Memory. Weights plus the KV cache must fit. The next section gives numbers.
  5. License. Internal use is fine under almost every license, but products you sell can bring in extra conditions. AI licenses explained shows what to look for.

Models by hardware

Minimum memory by our estimate at 4-bit precision, before the KV cache for long sessions:

Hardware Models to try Our estimate
One 16 to 24 GB GPU, or a Mac with that much memory Ornith 1.5 9B, Mellum2.1, gpt-oss-20b, Raon-1 mini preview, Qwen3.6 27B, AREX-2, Muse Glimmer 30B, Nanbeige4.3-33B About 7, 8, 15, 18, 19, 19, 20 and 23 GB
One 24 to 48 GB GPU GLM-4.7 Flash, Laguna XS 2.1, Qwen3.6 35B-A3B, Ornith 1.5 35B-A3B, K2 Horizon 36B-A4B, Ripple-65B Preview About 22, 22, 25, 25, 25 and 45 GB
One 80 GB GPU gpt-oss-120b, Nemotron 3.5 Lightning About 72 GB; Lightning is built for one H100
A multi-GPU server Laguna S 2.1, Laguna M.1, Solar Open 2, DeepSeek V4 Flash, Hy3, Motif 3, GLM-5.3 Flash, Ling 3.1 Flash About 106, 153, 157, 184, 204, 206, 221 and 386 GB
A large cluster GLM-5.3, Kimi K2.7 Code, DeepSeek V4 Pro, LongCat-2.5 About 520, 655, 982 and 1,470 GB

Notes on a few of them:

  • Qwen3.6 is tuned for agentic coding, and Alibaba’s newer Qwen3.8-27B has the same size as the 27B, so compare the two on your own tasks.
  • GLM-4.7 Flash is Z.ai’s 30B mixture of experts with 3B active parameters, from January 2026, under the MIT license and with a context of about 200K. Z.ai’s own table shows 59.2 on SWE-bench Verified against 34.0 for gpt-oss-20b, but the models it compares against are older than Qwen3.5 and Qwen3.6. The only official weights are 62.5 GB in BF16, so most people run a community 4-bit build.
  • Ornith 1.5 is post-trained from Qwen3.5 and offers 9B to 397B sizes under the MIT license, with GGUF and MLX builds. Every Ornith score comes from Ornith.
  • Muse Glimmer is a 30B dense model distilled for local agents, with a 128K context and quantized builds for a 24 GB GPU.
  • Nanbeige4.3-33B is a 33B dense model with a 512K context and an INT4 build of about 23 GB. Its model cards say Apache 2.0, but the repositories have no LICENSE file, and its own table reports 80.9 on Terminal-Bench 2.1 against 73.0 for Qwen3.8-27B.
  • Mellum2.1 is JetBrains’ 12B mixture of experts with 2.5B active parameters under Apache 2.0, a thinking model built to work as a fast sub-agent inside code repositories. In JetBrains’ own table it scores 47.0 on SWE-bench Verified against 50.0 for Qwen3.5-9B, so treat it as a quick helper rather than a replacement for a larger model. JetBrains ships GGUF files of 8.1 GB at Q4_K_M and 7.0 GB at MXFP4.
  • K2 Horizon is IFM’s fully open family with a 512K context. IFM’s table reports 72.4 on SWE-bench Verified for the 7B against 50.8 for Qwen3.5-9B, and 58.6 on Terminal-Bench 2.1 for the 36B-A4B, whose Q4_K_M GGUF is 22.4 GB. In the same table Qwen3.8-27B is well ahead of the dense 32B. GGUF files need a recent llama.cpp, and every score is IFM’s own.
  • Laguna is Poolside’s coding family. Laguna XS 2.1 (33B mixture of experts, 3B active, 256K context) is the small one, and in Poolside’s own table Qwen3.6-35B-A3B beats it on all four coding benchmarks. Laguna S 2.1 (118B, 8B active, 1M context) reports 70.2% on Terminal-Bench 2.1 and 59.4% on SWE-Bench Pro in that kind of table, with Kimi K3 and Claude Fable 5 far ahead on terminal tasks, and Laguna M.1 (225B, 23B active) is the Apache 2.0 flagship. XS 2.1 and S 2.1 use the OpenMDW-1.1 license, and their cards, last updated in August, warned about llama.cpp, vLLM and Ollama rough edges, so check the current state before you build on them.
  • Raon-1 mini preview is KRAFTON’s 28.8B mixture of experts with 4.3B active parameters, trained from scratch under Apache 2.0, with a 262K context and a 17.6 GB NVFP4 build. Its own table reports 70.8 on SWE-bench Verified against 63.2 for Qwen3.6 35B-A3B, but 47.0 against 63.3 on Terminal-Bench Lite, and the card calls it a preview.
  • AREX-2 is BAAI’s 27B agent built on Qwen3.8 and trained to improve its answer over many rounds, under Apache 2.0. BAAI’s table reports 81.8 on MLE-Bench Lite and 70.7 on Frontier-CS, and a plain chat call will not reproduce those results.
  • Ripple-65B Preview is a 65B dense text model under Apache 2.0 with a 1M-token context. Its own table reports 80.5 on Terminal-Bench 2.1, but Reflection Beam is ahead on SWE-bench Verified. The BF16 weights are about 130 GB, and an experimental NVFP4 build is 57 GB.
  • Solar Open 2 is Upstage’s 250B mixture of experts with 15B active parameters, built for office work, document-heavy tasks and coding agents in English, Korean and Japanese, with a 1M-token context. Its card lists 4 H200 GPUs as the minimum and it needs Upstage’s vLLM image or fork.
  • Motif 3 is a 314B mixture of experts with 13.2B active parameters under the MIT license, built for tool use and terminal work. Its commands assume eight H200 or B200 GPUs and Motif’s own vLLM fork, and every score comes from Motif.
  • LongCat-2.5 is Meituan’s 1.6T mixture of experts under the MIT license, aimed at long coding and terminal tasks. Meituan documents deployment only for NPU servers, through its fork of SGLang, so most teams cannot run it yet.
  • Ling 3.1 Flash uses linear attention, so it needs the specific SGLang or vLLM builds named on its model card.
  • Kimi K2.7 Code has native INT4 weights of about 595 GB, and Moonshot recommends its own Kimi Code CLI as the agent framework.
  • Mage-VL-Cowork is Microsoft’s 4B computer-use agent for driving a desktop, mixing screen actions with shell commands, and it reports 66.0% on OSWorld-Verified by Microsoft’s own measurement. It works on screens rather than repositories, so treat it as a complement to the models above, and run it in a sandbox.

The models by VRAM list sorts the whole catalog by the memory you have.

Serve it and connect the agent

The agent program talks to your model through an OpenAI-compatible API. On one machine, serve the model with llama.cpp or Ollama. On a server, use vLLM or SGLang, and turn on the tool-call parser that the model card names. How to choose a runner or inference engine helps you pick, and self-hosting vs API covers whether to run the model yourself at all.

Giants such as Kimi K2.7 Code are the exception: they need a server-class GPU node, since even the INT4 weights are about 595 GB.

Plan memory for long sessions

Agent sessions grow, because every file you read and every command output stays in the conversation, and the KV cache grows with them. Qwen3.6’s card warns that long contexts need much more memory than the weights alone. Models built with efficient attention, such as DeepSeek V4, GLM-5.3 and MiniMax M3, shrink that cache, but they can also need newer serving software. Test your longest realistic session, not a short prompt.

Test on your own repository

Pick ten real tasks from your backlog, preferably bug fixes that have a test, and run each candidate in the same harness with the same settings. Record whether the tests pass, how many tool calls the agent used, how long it took and how many tokens it consumed. Read the failures: a model that fails by giving up differs from one that fails by confidently editing the wrong file. How to evaluate AI models yourself covers the method, and the fine-tuning guide applies if you later want to adapt a model to your codebase.

Treat the published scores as hints

Developers describe coding models with benchmarks such as SWE-bench and Terminal-Bench, and the numbers depend on the agent harness around the model. Ornith’s tables include its own runs of competing models, and some of them put rivals ahead of Ornith. Moonshot reports results on its in-house Kimi Code Bench. The Benchmark entry explains why self-reported numbers need caution.

Keep it safe

An agent can run commands, so run it in a container or a disposable workspace. Keep secrets out of the repository it can read, review its commands before it runs anything that cannot be undone, and keep a human check on pushes and deletions.

Frequently asked questions

Which open model is best for a coding agent?
There is no single best model. Developers publish agent scores such as Terminal-Bench and SWE-bench, but they are self-reported and depend on the harness each developer used. Ornith's tables include its own runs of competing models, and Moonshot's include an in-house benchmark. Test two or three models in your own harness.
Can a coding agent run fully offline?
Yes, if both the model server and the agent program run on your own machine. Models such as Qwen3.6, gpt-oss and Muse Glimmer are small enough for one workstation GPU, but check that the agent program does not call a cloud service.
How much context does a coding agent need?
Agents keep file contents, command output and earlier reasoning in the conversation, so long contexts help: gpt-oss offers 128K tokens, Qwen3.6 256K and several server models 1M. Long contexts need much more memory than the weights alone, so plan for the KV cache.
Is a 9B model good enough for coding?
For bounded tasks it may be. Ornith reports 46.2 on Terminal-Bench 2.1 and 70.6 on SWE-bench Verified for its 9B model, against 67.8 and 79.0 for its 35B-A3B model, and all of these are Ornith's own measurements. Test on your own tasks before you decide.
Do licenses matter for internal coding use?
Internal use is allowed by almost every license, so the main risk is a missing license file or conditions on products you sell. Xiaomi's MiMo-V2.6 repositories are tagged MIT but contain no LICENSE file, so confirm the terms before you ship a product built on it.

Key terms in this guide

  • Agentic coding Agentic coding means a model works on software like a developer: it reads the codebase, edits files, runs commands and tests, and keeps going until the task is done.
  • Benchmark A benchmark is a standardized test used to compare models, such as a set of maths, coding or knowledge questions; scores are useful but easy to over-read.
  • Computer-use agent A computer-use agent looks at screenshots and operates a computer like a person, by clicking, typing and scrolling, and sometimes by running shell commands or code.
  • Context window The context window is the maximum amount of text, measured in tokens, that a model can take into account at one time, including your prompt and its own answer.
  • KV cache The KV cache is the memory a model uses to remember the earlier tokens of a conversation, and it grows with the length of the context.
  • Tool calling (function calling) Tool calling lets a model ask your program to run a function, such as a search or a calculator, and then use the result in its answer.

Models mentioned in this guide

Model Released Parameters Context License Smallest variant needs
Qwen3.6 Alibaba Qwen 27.8B – 36B 3B active 256K Apache 2.0 (Permissive) 19 GB Gaming GPU
Ornith 1.5 DeepReinforce 9.65B – 403B 17B active 256K MIT (Permissive) 6.66 GB Laptop or phone
gpt-oss OpenAI 21B – 117B 5.1B active 128K Apache 2.0 (Permissive) 15 GB Laptop or phone
DeepSeek V4 DeepSeek 284B – 1.6T 49B active 1M MIT (Permissive) 176 GB Big-memory desktop
Kimi K2.7 Code Moonshot AI 1.03T 32B active 256K Modified MIT (Conditional) 655 GB GPU server
GLM-5.3-Flash Z.ai (Zhipu AI) 320B 18B active 1M MIT (Permissive) 221 GB Big-memory desktop
Solar Open 2 Upstage 250B 15B active 1M Upstage Solar (Conditional) 157 GB Big-memory desktop
Motif 3 Motif Technologies 314B 13.2B active 256K MIT (Permissive) 206 GB Big-memory desktop
LongCat-2.5 Meituan 1.6T 48B active 1M MIT (Permissive) 1.1 TB GPU server
Nanbeige4.3-33B Nanbeige LLM Lab 33.1B 512K Apache 2.0 (Permissive) 23 GB Gaming GPU
Ripple-65B Preview Ricursive Intelligence 64.8B 1M Apache 2.0 (Permissive) 45 GB Workstation
AREX-2 BAAI 27.4B 256K Apache 2.0 (Permissive) 19 GB Gaming GPU
Mage-VL-Cowork Microsoft 4.74B 32K Apache 2.0 (Permissive) 3.27 GB Laptop or phone
Raon-1 mini preview KRAFTON 28.8B 4.3B active 256K Apache 2.0 (Permissive) 18 GB Gaming GPU
Mellum2.1 JetBrains 12.2B 2.5B active 128K Apache 2.0 (Permissive) 7.7 GB Laptop or phone
K2 Horizon Institute of Foundation Models (MBZUAI) 1.08B – 379B 23B active 512K Apache 2.0 (Permissive) 0.745 GB Laptop or phone
Laguna XS 2.1 Poolside 33.4B 3B active 256K OpenMDW-1.1 (Permissive) 22 GB Gaming GPU
Laguna S 2.1 Poolside 118B 8B active 1M OpenMDW-1.1 (Permissive) 81 GB Workstation
Laguna M.1 Poolside 226B 23.4B active 256K Apache 2.0 (Permissive) 153 GB Big-memory desktop
GLM-4.7-Flash Z.ai (Zhipu AI) 31.2B 3B active 198K MIT (Permissive) 22 GB Gaming GPU