The Starknet Coding Index (SCI)

27 models ran the same 13 Starknet smart-contract tasks: the leading open-weight coders, large and small, alongside the current closed models from Anthropic, SpaceXAI, Google, Meta, OpenAI and Alibaba. Most ran their full effort ladder, all ran at least one setting they expose, and every one ran with and without the Cairo Coder documentation tool.

Each run is a bare agentic loop. The model gets the task, a fixed Scarb.toml, a stub lib.cairo, and exactly one tool: submit. Every submission is compiled with scarb build and run against hidden snforge tests. On failure the model sees the raw compiler errors and failing-test output (never the test code itself) and can resubmit, within a budget of 10 turns and 15 minutes of model time.

In the MCP condition the model gets one extra tool, assist_with_cairo, which searches the Cairo and Starknet documentation corpus.

models 27 labs 13 runs 8199 hidden tests 106 2026-07-22 to 08-13

How the score is built

Effectiveness
50%

Does it work without sending you back into the loop? A run scores 100 when the very first submission passes, then 40% of that per further attempt: 100 / 40 / 16 / 6 for 1 / 2 / 3 / 4 submissions, and 0 if it never works.

Correctness
25%

Average fraction of hidden tests passed per task. Partial credit on what was delivered: 90% passing is still broken, but it is closer than nothing.

Cost
15%

Median $ per task, scored on a fixed log scale ($0.003 to $0.6).

Time
10%

Median model latency per task, scored on a fixed log scale (10s to 1200s). Local compile/test time excluded.

An attempt is a submission, not a turn: thinking, extra turns and documentation lookups never reach you, so they are free, while code that arrives broken is not. Runs over the 15-minute model-time budget count as failures. Where we sent no effort parameter, the label is the level OpenRouter documents as that model's default: max for Kimi K3, high for Hy3 and Sonnet 5. The scales are fixed, not relative: adding a new model later never changes an existing score.

Starknet Coding Index (baseline, no assistance)

One number per model for "how good is this LLM at writing Starknet smart contracts today", weighted toward the thing you actually get: working code on the first submission. Each model runs the full task suite alone, at its best thinking variant (labeled in parentheses), within a budget of 10 turns and 15 minutes of model time per task.

Starknet Coding Index, top 15 of the 27 models tested

Starknet Coding Index02040608010092.0Opus 5 (low)90.3Grok 4.6 (xhigh)89.3Fable 5 (xhigh)87.9Gemini 3.7 Flash (low)83.4Sonnet 5 (high)83.2Kimi K3 (low)80.1Muse Spark 1.2 (high)78.9MiMo-V2.5-Pro (xhigh)69.5GPT-5.6 Sol (max)61.4MiniMax M3 (medium)57.7Qwen3.8 2.4T A95B (high)56.9GPT-5.6 Luna (xhigh)55.2GPT-5.6 Terra (max)55.2DeepSeek V4 Flash 0731 (off)53.5Muse Glimmer 30B (low)
open weightsclosed weights

Behind the score

The same top fifteen, winning variants unpacked, baseline condition. The first chart is the whole distribution behind the effectiveness score: every column covers 100% of that model's runs, split by whether the code worked on submission one, two, three, or later, and topped by a warm-tan band ("never solved" in the legend) for the runs that never worked. Solve rate is everything below that band. Cost and time are the median of a complete pass over the 13-task suite. Each chart ranks best first.

How many submissions until the Cairo code works

% of runs0%25%50%75%100%100%Opus 5 (low)100%Fable 5 (xhigh)87%Grok 4.6 (xhigh)71%Gemini 3.7 Flash (low)71%Kimi K3 (low)67%Sonnet 5 (high)63%Muse Spark 1.2 (high)40%GPT-5.6 Sol (max)40%MiMo-V2.5-Pro (xhigh)31%MiniMax M3 (medium)17%Qwen3.8 2.4T A95B (high)11%Muse Glimmer 30B (low)0%GPT-5.6 Luna (xhigh)0%GPT-5.6 Terra (max)0%DeepSeek V4 Flash 0731 (off)
1 submission234 or morenever solvedlabels: first-submission share

Median cost of a full 13-task pass

USD per pass$0.00$0.50$1.00$1.50$0.02DeepSeek V4 Flash 0731 (off)$0.04MiMo-V2.5-Pro (xhigh)$0.06GPT-5.6 Luna (xhigh)$0.14Gemini 3.7 Flash (low)$0.17Muse Glimmer 30B (low)$0.23Grok 4.6 (xhigh)$0.27Kimi K3 (low)$0.32Sonnet 5 (high)$0.38Muse Spark 1.2 (high)$0.56Opus 5 (low)$0.65GPT-5.6 Terra (max)$0.71MiniMax M3 (medium)$1.41Fable 5 (xhigh)$1.45GPT-5.6 Sol (max)$1.45Qwen3.8 2.4T A95B (high)

Median model time for a full 13-task pass

minutes per pass0m20m40m60m1.6mGemini 3.7 Flash (low)2.9mOpus 5 (low)3.2mSonnet 5 (high)4.0mFable 5 (xhigh)5.1mMiMo-V2.5-Pro (xhigh)5.9mMuse Spark 1.2 (high)7.1mDeepSeek V4 Flash 0731 (off)7.1mKimi K3 (low)7.5mGrok 4.6 (xhigh)9.5mGPT-5.6 Sol (max)15mGPT-5.6 Luna (xhigh)17mMuse Glimmer 30B (low)18mGPT-5.6 Terra (max)24mQwen3.8 2.4T A95B (high)50mMiniMax M3 (medium)
open weightsclosed weights

The thinking dial

Same index, baseline runs only: the top eight models, each drawn across its own effort ladder. The ring marks the tier the leaderboard scores.

Things to look for: Muse Spark 1.2's dial splits in two, minimal through medium landing at 66 to 71 and high and xhigh at 80. All three Anthropic models pay for max: Opus 5 peaks at low and gives back 7 points, while Fable 5 and Sonnet 5 hold plateaus that max drops by 5.6 and 10. Kimi K3 is level at off, low and its max default, dipping only at high. Grok 4.6 is the only dial here that climbs the whole way, 84.4 at low to 90.3 at xhigh, and it buys first-try success rather than correctness: 62% to 87% one-shot with every tier already at 100% solved. Gemini 3.7 Flash is the same story with the opposite ending: its one-shot rate climbs just as honestly, 71% to 83%, but the ladder costs it 2.8× the money and 2.6× the wait, so the index hands back nothing and its three tiers finish within 2.9 points of each other.

Opus 5

8090100offlowhighxhighmax89.492.090.587.485.0

Grok 4.6

708090lowmedhighxhigh84.486.186.990.3

Fable 5

708090minlowmedhighxhighmax87.486.188.688.489.383.7

Gemini 3.7 Flash

708090lowmedhigh87.985.087.5

Sonnet 5

708090offminlowmedhighhighxhighmax80.576.979.882.681.283.483.073.2

Kimi K3

708090offlowhighmax82.783.279.183.1

Muse Spark 1.2

607080minlowmedhighxhigh68.071.366.380.180.1

MiMo-V2.5-Pro

607080offminlowmedhighxhighmax71.971.168.171.572.378.974.0
open weightsclosed weights

Fair questions

Why does Opus 5 win?

100% one-shot. Every task in every rep solved on the first submission. Nothing else in the field is perfect on that measure, which is why a flagship price tag still leaves it 2.7 points clear. It is no longer the quickest, though: Gemini 3.7 Flash serves a median pass 1.8× faster, and solves everything too.

Kimi K3 over MiMo? MiMo is far cheaper

71% vs 40% one-shot. This is the index working as intended. MiMo serves a pass 1.4× faster and 6× cheaper, and still loses 4.3 points, because it delivers broken code first about three runs in five. First-submission success carries twice the weight of the bill.

Kimi K3 and Qwen3.8 Max are the same size. Why 31 points apart?

71% vs 9% first-try compiles. Same class of MoE flagship, released a week apart, and both solve essentially every task. Twenty-five of the 31 points come from effectiveness: whether the first submission builds, 71% against 9%, with cheaper and faster serving covering the rest. Mostly a knowledge gap about Cairo's API surface, not a reasoning gap.

Sonnet 5 solves everything. Why 5th?

67% vs 100% one-shot. That first-try gap against Opus 5 is most of the 8.6 points between them. The dial does nothing until max, and that is a cliff, not a step: 88% one-shot, the best of any Sonnet setting, for 61k output tokens, $0.68 and nine minutes a task.

Which of these could I run myself?

7 of 27. They fit one 128 GB machine at Q4_K_M, from Qwen3.6-27B at 17 GB of weights to gpt-oss-120b at 63 GB, and they compare on their own footing in the section below. The rest need a rack or are closed.

Sol mid-pack? It rivals Fable elsewhere

40% one-shot. Cairo knowledge is not the problem (100% of hidden tests pass on delivered code); the habit is: a median of two submissions per task at $0.0895, 7x Grok 4.6's bill for half of Grok 4.6's first-try rate. The docs change the habit: 72% first-try and a median of one, the largest such shift in the study.

Head to head: best closed vs best open weights

The ranking's two champions, Opus 5 (low) from Anthropic and Kimi K3 (low) from Moonshot, both solve every task; the gap is in how. The second chart shows it is not about difficulty: Opus 5 first-tries every tier while Kimi sits near 70% across all three. Baseline condition, 26 and 52 runs.

Opus 5 (low) vs Kimi K3 (low): five measures, best baseline configs

solve rate100%100%first-submission rate100%71%med. model time12s32smed. cost / task$0.0436$0.0200med. output tokens1,3141,007

First-submission rate by task difficulty, Opus 5 vs Kimi K3

% solved first try0%25%50%75%100%100%69%easy100%75%medium100%69%hard
Opus 5 (low), closedKimi K3 (low), open

What does the Cairo Coder MCP add? (best config without vs with)

Same index, second question: each model's best configuration without the tool (solid bar) versus its best configuration with it. Each condition picks its own best thinking level, and the labels show it: thirteen of the 27 models win at a different effort with the tool than without, and seven of those thirteen move down the ladder, not up. Documentation substitutes for thinking budget. Four of the thirteen switchers (DeepSeek V4 Flash 0731, Hy3, GLM 5.3 and GLM 5.2) rank below the cut and change effort where no chart on this page shows it.

Cairo Coder documentation lift, top 15 of the 27 models tested, by best score in either condition

Starknet Coding Index02040608010092.0-0.1Opus 5 (low)90.3-2.7Grok 4.6 (xhigh / high)89.3-2.5Fable 5 (xhigh / high)88.4+0.5Gemini 3.7 Flash (low / medium)83.4-5.4Sonnet 5 (high)83.2-0.4Kimi K3 (low / max)80.1-4.6Muse Spark 1.2 (high / medium)78.9-2.6MiMo-V2.5-Pro (xhigh)77.4+7.9GPT-5.6 Sol (max)68.4+16.3Qwen3.8 Max (medium / minimal)466.6+5.2MiniMax M3 (medium / low)64.3+9.1GPT-5.6 Terra (max)163.8+12.8DeepSeek V4 Pro 0813 (off / high)259.6+1.9Qwen3.8 2.4T A95B (high)58.4+1.5GPT-5.6 Luna (xhigh / max)
best without MCP (open weights)best without MCP (closed weights)added by MCPeffort in parentheses; two values are baseline then with-MCP

Local-inference class

The models you could run yourself. The test is memory rather than parameter count: the published Q4_K_M weight file has to fit the 128 GB of unified memory that today's biggest buyable machines top out at (a DGX Spark, a Strix Halo box, an M5 Max MacBook Pro), minus 16 GB reserved for the OS and a KV cache. Total parameters count, not active ones, because every weight has to be resident even when a sparse model fires only a few experts per token.

Q4_K_M draws the line because it is the default 4-bit quant, the file most people actually download and run, and the sweet spot where memory halves against 8-bit while quality holds. Below 4-bit, degradation stops being minor, and coding feels it first. These scores were measured on the full-precision models, so the class stops at the quant level where the local copy still resembles the model that was scored.

Documentation lift for the models that fit one 128 GB machine

Starknet Coding Index02040608010053.5-2.7Muse Glimmer 30B (low)39.9+21.8Qwen3.8 27B (low)35.3+22.0Qwen3.6-27B (off)431.8+15.6Qwen3.6-35B-A3B (off)20.6+6.3Qwen3 Coder Next (no dial)117.7-1.7gpt-oss-120b (low)15.8-1.8Gemma 4 31B (off)
best without MCP (open weights)added by MCPeffort in parentheses

The models

Every model tested, including the twelve below the chart cut. Use it to shortlist by the constraint you actually have: the index with and without the documentation tool, price (per million tokens, as listed on OpenRouter, 2026-08-01, or at first listing for models published since), speed, and whether the weights are open. * weights promised but not yet released. Click a header to sort.

ModelSCISCI (MCP)ΔLabWeightsContext$/M in$/M outTok/s
Opus 592.0 ±0.791.9−0.1Anthropicclosed1M$5.00$25.00103
Grok 4.690.3 ±3.287.6−2.7SpaceXAIclosed500k$2.00$6.0075
Fable 589.3 ±1.286.8−2.5Anthropicclosed1M$10.00$50.0093
Gemini 3.7 Flash87.9 ±3.788.4+0.5Googleclosed1M$0.75$3.75378
Sonnet 583.4 ±4.378.0−5.4Anthropicclosed1M$2.00$10.00132
Kimi K383.2 ±4.282.8−0.4Moonshotopen1M$3.00$15.0034
Muse Spark 1.280.1 ±4.375.5−4.6Metaclosed1M$1.25$4.25197
MiMo-V2.5-Pro78.9 ±4.576.3−2.6Xiaomiopen1M$0.43$0.8774
GPT-5.6 Sol69.5 ±4.977.4+7.9OpenAIclosed1M$5.00$30.0080
MiniMax M361.4 ±4.966.6+5.2MiniMaxopen1M$0.30$1.20131
Qwen3.8 2.4T A95B57.7 ±4.759.6+1.9Alibabaopen262k$2.00$6.00144
GPT-5.6 Luna56.9 ±3.758.4+1.5OpenAIclosed1M$0.10$0.6091
GPT-5.6 Terra55.2 ±3.064.3+9.1OpenAIclosed1M$1.00$6.0078
DeepSeek V4 Flash 073155.2 ±2.953.4−1.8DeepSeekopen1M$0.14$0.28124
Muse Glimmer 30B53.5 ±4.450.8−2.7Metaopen131k$0.35$1.5070
Qwen3.8 Max52.0 ±4.168.4+16.3Alibabaclosed1M$2.00$6.0062
DeepSeek V4 Pro 081351.0 ±3.663.8+12.8DeepSeekopen1M$0.43$0.8780
Hy349.8 ±4.552.1+2.3Tencentopen262k$0.13$0.5375
Inkling49.1 ±4.448.3−0.7Thinking Machinesopen1M$1.00$4.05107
GLM 5.343.5 ±4.846.4+3.0Z.aiopen*1M$1.40$4.40100
GLM 5.241.0 ±4.147.3+6.4Z.aiopen1M$0.72$2.25136
Qwen3.8 27B18.1 ±4.639.9+21.8Alibabaopen262k$0.45$3.2034
gpt-oss-120b17.7 ±0.816.1−1.7OpenAIopen131k$0.04$0.17819
Qwen3.6-35B-A3B16.2 ±2.231.8+15.6Alibabaopen262k$0.14$1.00168
Gemma 4 31B15.8 ±2.214.0−1.8Googleopen262k$0.10$0.3455
Qwen3 Coder Next14.3 ±0.820.6+6.3Alibabaopen262k$0.12$0.8086
Qwen3.6-27B13.3 ±3.335.3+22.0Alibabaopen262k$0.30$2.0061

Which quantization for my machine

Pick your memory, read across. Each cell is the best quantization that fits, named as the file you would download from the bartowski and unsloth GGUF repos, and what it weighs in GB. Every figure is a real published file, not arithmetic.

The weights do not get the whole machine, so each column reserves room for the OS, the KV cache and activations: 16 GB at 128, 8 GB at 64, 4 GB at 32, 4 GB at 24. A quant in full black is Q6 or better, where quantization is not the thing holding the model back; a greyed one is a 4-to-5-bit compromise.

A blank means nothing 4-bit or better fits, which is a real answer rather than a missing one: below 4-bit degradation stops being minor and coding feels it first, so no cell recommends going lower. The ten open models not listed need more than 128 GB even at 4-bit: Kimi K3, MiMo-V2.5-Pro, MiniMax M3, Qwen3.8 2.4T A95B, DeepSeek V4 Flash 0731, DeepSeek V4 Pro 0813, Hy3, Inkling, GLM 5.3 and GLM 5.2.

ModelSCIContext128 GB64 GB32 GB24 GB
Muse Glimmer 30B53.5131kQ8_0 30 GBQ8_0 30 GBQ6_K_L 24 GBQ5_K_S 19 GB
Qwen3.8 27B18.1262kQ8_0 29 GBQ8_0 29 GBUD-Q6_K_XL 26 GBQ5_K_M 20 GB
gpt-oss-120b17.7131kQ4_K_M 63 GB
Qwen3.6-35B-A3B16.2262kQ8_0 37 GBQ8_0 37 GBUD-Q5_K_XL 27 GBUD-IQ4_NL_XL 20 GB
Gemma 4 31B15.8262kQ8_0 33 GBQ8_0 33 GBUD-Q6_K_XL 28 GBQ4_K_M 18 GB
Qwen3 Coder Next14.3262kQ8_0 85 GBUD-Q5_K_S 56 GB
Qwen3.6-27B13.3262kQ8_0 29 GBQ8_0 29 GBUD-Q6_K_XL 26 GBUD-Q5_K_XL 20 GB

Findings

Give the docs tool to a model that needs it

+22.0 at the bottom. The weaker the Cairo, the bigger the lift: Qwen3.6-27B goes from 15% of runs solved to 69%; frontier-sized Qwen3.8 Max gains +16.3; at the top it fades to zero and below (Sonnet 5 −5.4).

The thinking dial rarely buys correctness

3 to 34x the tokens. Most models are equally correct at every effort. Paying for max buys first-try polish at a lower score (Opus 5: 92.0 at low against 85.0 at max), and Kimi K3's low tier matches its default at a third of the price.

Pro-style serving modes are strictly dominated

2 to 3x for less. Both pro modes we funded scored below their model's max tier (terra-pro 53.8 against terra@max 55.2). Neither ever produced its model's best configuration, so sol-pro was not funded on that record.

Why the tool works: the models write an older Cairo

one lookup. Failing models write the pre-2024 Map.read(key) instead of Map.entry(key).read(), then burn their turns arguing with the compiler. One lookup fixes it, which is why the tool can make a model cheaper.

Cairo Coder confabulates outside its index

no signal off-index. Asked about a token standard we invented ("STRK77"), it returned a complete, confident, fabricated Cairo interface. Within its index it is accurate; agents get no signal when a query falls outside coverage. Worth fixing upstream.

Methodology

  • Harness: agentic repair loop, max 10 assistant turns. The model submits src/lib.cairo via a submit tool; the harness runs scarb build + snforge test against hidden tests and returns the output. Conditions are identical except the MCP condition also exposes assist_with_cairo, replicated exactly from @kasarlabs/cairo-coder-mcp v0.2.5.
  • Tasks: 13 hand-written Starknet contracts (4 easy / 5 medium / 4 hard incl. a SNIP-6 account and a custom component); every reference solution passes 100% of its tests, every stub fails.
  • Models: all served via OpenRouter, throughput-sorted routing, provider-default temperature; efforts via the unified reasoning parameter (disabled = enabled:false). Costs are OpenRouter-reported.
  • Prices move after the runs do: the runs were billed at the prices listed on 2026-07-24, and models added since at their listing on the day they were run. Three models have been cut since and are re-scored at today's listing (GPT-5.6 Terra 0.40×, GPT-5.6 Luna 0.10×, GLM 5.2 0.90×); three more moved input and output by different amounts, which a single billed total cannot be re-based from, so they stand as billed. GPT-5.6 Sol is unchanged. All prices are the standard endpoint, not the cheaper deferred-latency flex tiers.
  • Solved = every hidden test passes within the budget: 10 turns and 15 minutes of model time (LLM + doc-tool wait; wall time is not used because it depends on harness concurrency). An attempt is a submission, not a turn, so lookups and extra thinking turns are free and only delivered-and-broken code costs.
  • Not every requested effort is a distinct setting: providers quietly map some levels onto others, so two neighbouring efforts can be the same configuration. GLM 5.2 is the clearest case: minimal, low, medium and high all spend about 10k output tokens a run and are one effective level, while xhigh (29.6k), max (53.6k) and thinking off (5.0k) are genuinely different. DeepSeek, Hy3 and Gemini flatten the same way. Effort labels in this report are what we requested.

Caveats

  • Unequal depth by design: GLM 5.2 carries the deepest dataset, 993 runs across seven efforts and both conditions, and it anchors the substitution finding. Everything else carries 13 to 120 runs per setting, deepest where the score was noisiest and shallowest where a tier was measured only to rule it out.
  • Eight cells abandoned: host-sleep and network stalls killed six, one was cut when its batch was stopped by hand, and one Hy3 run was killed at 22m43s after grinding far past the time budget. All count as failures, which matches how their completed sibling runs scored. Time and cost medians exclude them.
  • MCP backend, tested: the first 3 reps used the hosted api.cairo-coder.com and everything else a self-hosted replica with the same corpus and models. A direct A/B of 39 runs each found identical effectiveness, 38/39 solved on both, so the two are pooled. Only lookup speed differs, about 5× faster locally.
  • How precise any of this is: each model's best setting was run until its score settled to within ±5 points, which took 2 to 10 passes of the 13 tasks. The widest interval in the table is ±4.9 and it is printed beside every score. Most adjacent pairs sit under 2 points apart, so read them as ties rather than as an order. GLM's apparent "low beats high" ordering at 3 reps did not survive the extra runs, which is the kind of thing 3 reps will do. The documentation runs are shallower at 2 to 3 passes, so those deltas are the least precise numbers here.
  • Hosted sunset: api.cairo-coder.com shuts down 2026-07-31; the replica replaces it for reruns.