• Best AI for Coding: 33 Models Ranked by Quality and Cost

    best ai for coding

    This ranking of the best AI for coding covers 33 language models compared on six benchmarks. They are scored on four kinds of work: real tasks from live repositories, changes to existing code, commands in the terminal and building web apps. Claude Fable 5.2 leads in every category.

    A high overall score does not always mean the best result on a specific task. On Vals AI’s Vibe Code Bench v1.1.1, building one web app costs $35.77 on average with Claude Opus 5.5 and $3.23 with GPT-6.2 Sol. The apps pass 78.5% and 79.5% of functional checks respectively. The quality gap is within the statistical uncertainty, while the costs differ elevenfold.

    Beyond the test results, the article compares costs and how well the models work in different harnesses.

    Ranking of the best AI models for coding

    Recalculated on December 2, 2026 from the available published results. Sources are updated on different dates.

    Rank Model Harness Overall User tasks Existing code Terminal Web apps App cost, $
    1 Claude Fable 5.2 Claude Code 100.0 100 100 100 100 22.13
    2 Claude Opus 5.5 Claude Code 90.9 77 90 100 97 35.77
    3 Gemini 4 Neon Antigravity 85.2 65 88 94 94 6.76
    4 Claude Sonnet 5.5 Claude Code 84.0 63 80 98 96 19.73
    5 GPT-6.2 Astra Codex 83.7 57 88 96 94 7.92
    6 Gemini 4 Carbon Antigravity 82.0 61 78 97 92 8.25
    7 GPT-6.2 Sol Codex 80.2 48 86 93 93 3.23
    8 GPT-6.1 Terra Codex 76.3 56 84 78 87 6.00
    9 Gemini 4 Hydrogen Antigravity 75.2 53 76 84 89 4.55
    10 Muse Wonder Full Muse Code 72.4 43 71 90 85 2.29
    11 Gemini 4 Argon Antigravity 67.2 45 51 86 87 8.11
    12 Qwen4-Max Qwen Code 66.0 36 — 72 90 41.40
    13 Kimi K3.1 Pro
    open weights
    Kimi Code CLI 64.7 35 45 94 84 7.49
    14 Hy4
    open weights
    CodeBuddy 60.2 40 — 59 81 2.39
    15 Muse Wonder Muse Code 57.0 25 50 74 79 1.80
    16 Grok 4.7 Grok Build 55.4 28 61 52 80 15.83
    17 Claude Haiku 5.5 Claude Code 54.9 32 47 58 82 6.07
    18 DeepSeek V4.1 Flash 1017
    open weights
    DeepSeek Harness 51.8 25 43 54 85 0.58
    19 GLM-5.3
    open weights
    ZCode 50.7 21 43 61 78 12.45
    20 MiMo-V2.6-Pro
    open weights
    MiMo Code 48.0 23 — 45 77 1.04
    21 Muse Ember Muse Code 47.4 20 42 53 74 0.05
    22 Muse Spark 1.3 Muse Code 45.0 26 45 30 79 2.54
    23 GPT-6 Luna Codex 42.7 25 49 22 74 1.35
    24 MiniMax-M3.1-Flash
    open weights
    MiniMax Code 42.0 17 — 39 70 1.15
    25 Inkling 2 Small
    open weights
    — 41.7 26 — 20 79 1.90
    26 Step 5 Preview Step Code 41.3 13 37 47 69 5.86
    27 Mistral Large 4
    open weights
    Mistral Vibe 40.9 9 41 41 73 11.72
    28 MiMo-V2.6-Flash
    open weights
    MiMo Code 40.7 18 — 31 73 0.56
    29 Gemini 3.8 Flash Antigravity 39.4 18 — 29 71 6.87
    30 GLM-5.3-Flash
    open weights
    ZCode 39.3 13 39 57 49 4.70
    31 Inkling 2 Mini
    open weights
    — 28.1 5 — 10 69 1.97
    32 Beam 1.0
    open weights
    Mirror 23.2 0 — 8 62 —
    33 Nemotron 3.5 Super VL
    open weights
    — 1.3 0 — 0 4 0.54

    The overall score is the average of the scores in the four areas. If one area has no data, the remaining three are used. A dash means no data. Area scores are rounded; 100 points means the best relative result, not error-free work.

    Harness is the model developer’s own harness. A dash in this column means the developer has no harness of its own, and the model is used in third-party ones.

    App cost is the average cost of building one web app in Vibe Code Bench v1.1.1. All models were tested in the same harness, OpenHands. It is a reference for comparing costs under test conditions, not the price of building an arbitrary app or a public API rate.

    How the models are scored

    The composite ranking groups six tests into four areas. All areas carry equal weight in the overall score.

    Area Source What it measures
    User tasks Agent Arena: Coding Index Completing real tasks from GitHub repositories, user feedback, following instructions and running commands reliably
    Existing code FrontierCode-AA 2.0 Changes to existing repositories and checks of their quality
    Terminal Terminal-Bench 4.1 and Vals AI’s Terminal-Bench 4.0 Tasks done on the command line
    Web apps Vibe Code Bench v1.1.1 and Code Arena Building apps from a text description: automated feature checks in Vibe Code Bench and head-to-head user ratings in Code Arena

    Terminal-Bench 4.0 and 4.1 use the same set of 66 tasks but check the results differently. Both count toward one area, so terminal work gets no extra weight.

    Results are converted to a scale from 0 to 100. For tests reported in percent, the score is the model’s result divided by the best result among the included models, times 100. For the Arena ratings, 1,000 is subtracted from both scores before dividing, and negative values are set to zero. In Agent Arena, 1,000 is the historical baseline, roughly the average model rating in July 2026. In Code Arena (WebDev), 1,000 is an editorial reference point, not an average set by Arena.

    The highest raw values were 1,487 points in Agent Arena, 49% in FrontierCode-AA 2.0, 65.8% in Terminal-Bench 4.1, 65.15% in Terminal-Bench 4.0, 83.52% in Vibe Code Bench and 1,819 points in Code Arena (WebDev). Areas with two tests use the average of the available scores; if only one result is published, that one is used. The overall score is the average of the available area scores. Models are ordered before rounding.

    Each model is scored on the best result found across the tested harnesses and reasoning effort levels, the settings that control how much computation goes into a task. If a Terminal-Bench 4.1 result is missing from the main leaderboard but published in Artificial Analysis comparisons, that result is used (for Step 5 Preview and Muse Wonder Full). Some Artificial Analysis results are published rounded to whole percent.

    Models are included if they have data in at least three areas. Code Arena scores could not be obtained for Beam 1.0 and Nemotron 3.5 Super VL, so their web score is based on Vibe Code Bench alone. Models with incomplete data should be compared with caution. The overall score does not account for costs and does not show the probability of completing an arbitrary task.

    The table lists selected model versions, not every model in existence. Systems that route tasks between several models are not included. The recently released GLM-5.4 and Amazon Ergo are not included yet: results in three areas are not available for them. The ranking is updated as new data appears.

    Which models do best at which tasks

    Claude Fable 5.2 leads in all four areas, sharing first place in the terminal with Claude Opus 5.5. The gap is widest in user tasks: Opus scores 77 out of 100, and no other model gets more than 65.

    On existing code, GPT-6.2 Astra, GPT-6.1 Terra and GPT-6.2 Sol score 84–88, close to Gemini 4 Neon and Claude Opus 5.5. Terra beats Claude Sonnet 5.5 in this area, although it ranks eighth overall.

    In the terminal, the top seven models score 93–100. The open-weight Kimi K3.1 Pro comes close: it solves 63.6% of tasks on Vals AI’s Terminal-Bench 4.0.

    In building web apps, Claude Fable 5.2 and Claude Opus 5.5 lead. Qwen4-Max scores 90 and beats GPT-6.1 Terra and Gemini 4 Hydrogen, although it ranks below them overall.

    Cost and speed of coding with AI

    Among the top seven, GPT-6.2 Sol has the lowest Vibe Code Bench cost: $3.23 per app. Gemini 4 Neon, in third place, costs $6.76, about a third of the cost of Claude Fable 5.2. In the top ten, Meta’s Muse Wonder Full, in 10th place, costs even less: $2.29 per app.

    Among budget models, DeepSeek V4.1 Flash 1017 stands out. On Vibe Code Bench its apps pass 74.6% of checks on average, against 76.2% for Gemini 4 Hydrogen. Yet the cost is almost eight times lower: $0.58 against $4.55. On existing code and in the terminal, DeepSeek trails the leaders.

    The models also differ in speed. On Vibe Code Bench, building a web app takes about 14 minutes on average with Gemini 4 Hydrogen, 16 minutes with DeepSeek V4.1 Flash 1017 and more than an hour and a half with Claude Opus 5.5. These figures apply to the conditions of this test.

    A low price per token, the small chunks of text or code a model processes, does not guarantee a low task cost. For example, Qwen4-Max rates are $1.50 per million input tokens and $4.50 per million output tokens. Yet on Vibe Code Bench an app cost $41.40 on average, more than with Claude Opus 5.5.

    How reasoning effort affects cost

    A more compute-heavy reasoning mode does not always improve the result. In the Artificial Analysis ranking of AI agents, Claude Fable 5.2 scores about 58 points at both high and xhigh. However, the average task cost rises from $7.51 to $15.47 at xhigh. At max, the cost reaches $44.22, and the score drops to about 56.

    GPT-6.2 Astra in Codex also shows similar results at xhigh and max, while the average task cost rises from $3.20 to $5.12.

    Plans and ways to cut costs are covered in the article on LLM API pricing.

    Best AI coding agents: which harness each model works best in

    A harness is a program that lets a language model work with project files, run commands and tests, and fix errors. Together, the model and the harness make up an AI agent: the model decides what to do, and the harness carries out its commands. Even the same model gets different results depending on the harness.

    Without a harness, a model cannot run a single command, so the baseline is the minimal harness mini-SWE-agent: it only passes the model’s commands to the terminal and returns the output. Artificial Analysis tested GLM-5.3-Flash in 13 harnesses, including the minimal one, which gave it 37.9 points. Claude Code improved the result by 2.8%, to 39 points, and OpenCode by 1.7%. The other harnesses made it worse: ZCode, from the model’s own developer, by 2.8%, Grok Build by 6.5% and Codex by 26.7%, to 27.8 points.

    On individual tests the gap is larger. On FrontierCode-AA 2.0, where the model works with existing code, OpenCode raises the share of tasks GLM-5.3-Flash solves from 16% to 19.3%, or by 20.6%, and Claude Code to 18.8%, or by 17.5%. On Terminal-Bench 4.1, in the Artificial Analysis run, Claude Code adds 3.7%: 42.4% against 40.9%. Codex nearly halves the model’s result on this test, to 21.7%.

    For GPT-6 Luna the best harness is a different one, Codex: 25.9 points against 25.1 with the minimal harness, or 3.4% more. In Claude Code the same model scores 11.3% lower than with the minimal harness, and in Qwen Code 31.5% lower.

    On Terminal-Bench 4.1, the Claude, GPT and Gemini 4 models were tested only in their native harnesses: Claude Code, Codex and Antigravity CLI. Vals AI runs them in the minimal mini-SWE-agent harness on Terminal-Bench 4.0, which has the same tasks but checks the results differently. Claude Fable 5.2, for example, solves 65.8% of tasks with Claude Code and 65.15% with mini-SWE-agent, so the developer’s harness gives a 1% higher result. GPT-6.2 Astra, on the other hand, solves 1.6% fewer tasks with Codex than with the minimal harness. For the top seven models, the two tests differ by no more than 1.4 percentage points, while the Terminal-Bench 4.1 margin of error for them is 2.3 to 3.2 points. So the developers’ own harnesses show no noticeable gain on terminal tasks. Open-weight models also work well in third-party harnesses such as OpenCode.

    In these studies, a suitable harness improved a model’s overall score by no more than 3.4%, and by up to 21% on individual tests. An unsuitable one cut it by almost a third.

    Claude Code: Fable 5.2, Opus 5.5 and Sonnet 5.5

    Claude Code works in the terminal, code editors, the Claude desktop app and the browser. It is included in the Pro ($20 a month), Max ($100) and Ultra ($200) plans. On Pro, Fable 5.2 requires separately paid credits, while on Max and Ultra it has a separate weekly limit. Setup is covered in the Claude Code guide.

    Codex: GPT-6.2 Astra and Sol

    In Codex, GPT-6.2 Astra and Sol solve 62.1% and 61.5% of Terminal-Bench 4.1 tasks respectively. Codex works in the terminal, code editors and the ChatGPT app. Tasks can also run in the cloud on OpenAI servers. Both models are available on ChatGPT Plus ($20 a month) with usage limits. Installation and setup are covered in the Codex guide.

    Antigravity: Gemini 4 Neon, Carbon and Hydrogen

    Antigravity is Google’s harness: a development environment with a built-in code editor and tools for managing AI agents. It supports Gemini 4 Neon, Carbon and Hydrogen. For the command line there is Antigravity CLI, which replaced Gemini CLI. In the Artificial Analysis ranking, Gemini 4 Neon with Antigravity CLI scores 58.6 points at an average task cost of $6.86.

    Gemini 4 Hydrogen is available on the free Antigravity plan with usage limits. Since November 30, 2026, Gemini 4 Argon and Gemini 3.8 Flash have been available in Antigravity only on the Enterprise plan. Gemini 4 Neon and Carbon come with the corresponding paid Google AI plans. At Google’s API rates, Gemini 4 Carbon costs $4 per million input tokens and $20 per million output tokens.

    Muse Code: Muse Wonder Full and Muse Wonder

    Muse Code is Meta’s harness for working with code from the command line. Muse Wonder Full has no API: it is available only in Muse Code, on the Power plan at $50 a month and the Maximum plan at $200 a month. Muse Wonder is also available on the cheaper plans, starting at $5 a month, and through Meta’s Model API, which charges $4 per million input tokens and $20 per million output tokens. In the Artificial Analysis ranking, Muse Code with Muse Wonder Full scored 54.5 points.

    Kimi Code CLI: Kimi K3.1 Pro

    Kimi Code CLI is Moonshot AI’s harness for working with code from the command line. In the Artificial Analysis ranking, Kimi Code CLI with Kimi K3.1 Pro scored 48.6 points.

    The model is available in Kimi Code starting with the Plus plan, and separately through the API, which costs extra. In Claude Code it solves 59.7% of Terminal-Bench 4.1 tasks.

    DeepSeek V4.1 Flash 1017: connecting to Claude Code

    The DeepSeek API supports the Anthropic request format, so the model can be connected to Claude Code. In this pairing, DeepSeek V4.1 Flash 1017 solves 38.5% of Terminal-Bench 4.1 tasks. In Artificial Analysis tests, the average task cost with DeepSeek’s own harness, DeepSeek Harness, is $0.32.

    At DeepSeek’s rates, a million input tokens that are not in the cache (not previously stored for reuse) costs $0.15 off-peak, and a million output tokens $0.60. At peak hours these prices double.

    GLM-5.3: access through the GLM Coding Plan

    Z.ai offers GLM-5.3 through the GLM Coding Plan subscription, which also includes the newer GLM-5.4 and GLM-5.3-Flash. The plan works with Claude Code, Codex, OpenCode and Cline. API use in custom apps and scripts is not included.

    In the Artificial Analysis ranking, GLM-5.3 in OpenCode scores 40.1 points.

    Qwen4-Max: connecting to harnesses

    Qwen4-Max is available through the API and the Alibaba Cloud Token Plan subscription, which works with coding harnesses. New Model Studio users get a free quota of 1 million tokens valid for 90 days under the service terms.

    Grok Build (formerly Cursor): Grok 4.7

    Grok 4.7 is available in Grok Build. Since November 30, 2026, the Cursor editor and SpaceXSI’s coding tools have been combined under this name. With Grok Build, the model solves 38.8% of Terminal-Bench 4.1 tasks.

    Grok Build also supports third-party models. More on the tool in the Cursor (Grok Build) guide.

    CodeBuddy: Hy4

    Tencent built Hy4 into CodeBuddy, its coding harness, and WorkBuddy, its office assistant. On Terminal-Bench 4.1, however, Hy4 was tested with Claude Code and solves 37.9% of tasks.

    GitHub Copilot: automatic model selection

    GitHub Copilot supports models from several developers. In Copilot Fusion mode, it automatically splits the work between models.

    On Terminal-Bench 4.1, Copilot Fusion takes first place at 71.2%. That is 5.4 percentage points, or 8.2%, more than the best single models, Claude Fable 5.2 and Opus 5.5 in Claude Code (65.8%). The mode is not included in the composite ranking because it combines several models.

    Best open-source LLMs for coding

    When a developer publishes the weights, the model can be downloaded and run on in-house hardware under the license terms, and fine-tuned for specific tasks. Among these models, Kimi K3.1 Pro leads the composite ranking with an overall score of 64.7. The table lists the eight open-weight models with the highest overall scores.

    Rank Model Overall License App cost, $
    13 Kimi K3.1 Pro
    Moonshot AI
    64.7 Kimi K3.1 Pro License 7.49
    14 Hy4
    Tencent
    60.2 Tencent Hy License 2.39
    18 DeepSeek V4.1 Flash 1017
    DeepSeek
    51.8 MIT 0.58
    19 GLM-5.3
    Z.ai
    50.7 GLM-5.3 License 12.45
    20 MiMo-V2.6-Pro
    Xiaomi
    48.0 MIT 1.04
    24 MiniMax-M3.1-Flash
    MiniMax
    42.0 MiniMax Community License 1.15
    25 Inkling 2 Small
    Thinking Machines
    41.7 Apache 2.0 1.90
    27 Mistral Large 4
    Mistral
    40.9 Mistral Ecosystem Open-Weight License 11.72

    Published weights do not mean that commercial use is unrestricted: some developers set additional terms.

    Self-hosting large models takes significant resources. Kimi K3.1 Pro, for example, has about 2.8 trillion parameters. Even at 4 bits per parameter, the weights alone take about 1.4 TB of memory in theory, before the overhead of running the model. The exact server setup depends on the weight format and the load. Lighter models are covered in the Local models section.

    Which AI to choose for coding

    The recommendations are based on the test results above. Subscription prices, access limits and costs on real tasks may differ from the test conditions.

    Task Recommended model Harness or service
    Hard development tasks where quality matters most Claude Fable 5.2 Claude Code
    A high overall score at lower cost than the leaders Gemini 4 Neon, GPT-6.2 Astra Antigravity, Codex
    Coding on a limited budget among the leaders GPT-6.2 Sol Codex
    Open-weight models Kimi K3.1 Pro Kimi Code CLI, Claude Code
    Web apps on a limited budget DeepSeek V4.1 Flash 1017 Claude Code with the DeepSeek API
    A free plan with limits Gemini 4 Hydrogen Antigravity

    bnr2mob
    Subscribe
    Notify of
    guest

    0 Comments
    Oldest
    Newest Most Voted