Agentic Coding LabData as of 2026-10-16 00:24 UTC, 1,273 runs, commit 4af5566

Research Question: RQ-model-quality-oc

How do five models reachable via the OpenCode harness (Opus 4.7 via Portkey + four non-Anthropic models from the Portkey catalog) differ in code quality and TDD discipline on game-of-life-example-mapping with the exact-single-context-v2-testlist-fix-oc workflow?

Factor(s)
model: opus-4-7-portkey, kimi-k2-6, glm-5-1, gemini-3-5-flash, deepseek-v4-flash, deepseek-v4-pro
Control(s)
Runs
29 runs, 2026-05-25 โ†’ 2026-05-28; 5 of 6 cells at 5 replicates
Source
View on GitHub

game-of-life-example-mapping

โ†‘ higher is better ยท โ†“ lower is better ยท โ—‹ informative
n, run datesCode qualitySizeCorrectnessTDD disciplineCost
โ†“ โ†“ โ†“ โ†“ โ†“ โ†“ โ†“ โ†“ โ†“ โ—‹ โ—‹ โ†‘ โ†‘ โ—‹ โ—‹ โ†“ โ†“ โ†“
model: opus-4-7-portkeyn = 5, 2026-05-25160 ยฑ 15.1811.4 ยฑ 4.83 ๐Ÿ†8.03 ยฑ 3.07 ๐Ÿ†7.60 ยฑ 2.30 ๐Ÿ†2.91 ยฑ 1.00 ๐Ÿ†18.6 ยฑ 3.58 ๐Ÿ†7.59 ยฑ 1.76 ๐Ÿ†3.30 ยฑ 0.97 ๐Ÿ†3.60 ยฑ 1.14 ๐Ÿ†38.2 ยฑ 4.029.40 ยฑ 0.55100% ยฑ 0 ๐Ÿ†100%5/54.80 ยฑ 3.704.80 ยฑ 3.703.9 ยฑ 0.5 min1.8M ยฑ 732k ๐Ÿ†$1.84 ยฑ 0.57
model: kimi-k2-6n = 5, 2026-05-25111 ยฑ 95.229.40 ยฑ 8.238.40 ยฑ 6.807.60 ยฑ 4.284.85 ยฑ 3.0015.2 ยฑ 12.669.90 ยฑ 6.098.30 ยฑ 6.444.40 ยฑ 2.8822.4 ยฑ 19.817.00 ยฑ 2.7457% ยฑ 40100%5/52.00 ยฑ 4.472.00 ยฑ 4.4718.1 ยฑ 7.4 min2.3M ยฑ 1.3M$1.00 ยฑ 0.53
model: glm-5-1n = 5, 2026-05-25193 ยฑ 25.9511.6 ยฑ 4.72 ๐Ÿ†7.80 ยฑ 2.93 ๐Ÿ†7.00 ยฑ 1.41 ๐Ÿ†3.39 ยฑ 1.10 ๐Ÿ†19.8 ยฑ 9.09 ๐Ÿ†10.0 ยฑ 3.06 ๐Ÿ†8.50 ยฑ 1.732.80 ยฑ 2.68 ๐Ÿ†46.4 ยฑ 6.079.80 ยฑ 0.84100% ยฑ 0 ๐Ÿ†100%5/54.40 ยฑ 2.194.40 ยฑ 2.1913.9 ยฑ 2.9 min3.0M ยฑ 581k$4.13 ยฑ 0.82
model: gemini-3-5-flashn = 5, 2026-05-25200 ยฑ 36.0216.0 ยฑ 4.69 ๐Ÿ†14.1 ยฑ 4.9710.4 ยฑ 2.196.00 ยฑ 1.6618.6 ยฑ 12.88 ๐Ÿ†15.6 ยฑ 14.00 ๐Ÿ†14.9 ยฑ 14.32 ๐Ÿ†4.00 ยฑ 2.24 ๐Ÿ†52.2 ยฑ 10.458.40 ยฑ 0.55100% ยฑ 0 ๐Ÿ†100%5/50.40 ยฑ 0.890.40 ยฑ 0.892.6 ยฑ 0.5 min ๐Ÿ†2.8M ยฑ 616k$0.32 ยฑ 0.06 ๐Ÿ†
model: deepseek-v4-flashn = 5, 2026-05-27189 ยฑ 33.3813.2 ยฑ 3.70 ๐Ÿ†8.78 ยฑ 3.47 ๐Ÿ†9.40 ยฑ 0.893.99 ยฑ 0.3627.6 ยฑ 3.4413.1 ยฑ 2.249.80 ยฑ 3.954.00 ยฑ 1.58 ๐Ÿ†44.8 ยฑ 4.219.20 ยฑ 0.45100% ยฑ 0 ๐Ÿ†100%5/51.40 ยฑ 1.341.40 ยฑ 1.3410.2 ยฑ 1.0 min2.7M ยฑ 742kn/c
model: deepseek-v4-pron = 4 of 5, 2026-05-28138 ยฑ 8.12 ๐Ÿ†13.0 ยฑ 4.62 ๐Ÿ†12.0 ยฑ 6.00 ๐Ÿ†9.50 ยฑ 1.733.35 ยฑ 0.41 ๐Ÿ†16.5 ยฑ 9.88 ๐Ÿ†9.66 ยฑ 8.24 ๐Ÿ†6.50 ยฑ 9.68 ๐Ÿ†3.00 ยฑ 1.15 ๐Ÿ†28.3 ยฑ 0.508.75 ยฑ 2.22100% ยฑ 0 ๐Ÿ†100%4/46.00 ยฑ 4.246.75 ยฑ 4.3519.6 ยฑ 4.2 min3.0M ยฑ 656k$1.49 ยฑ 0.35
Runs behind this table
Findings

RQ-model-quality-oc โ€” Findings

Setup: game-of-life-example-mapping ร— exact-single-context-v2-testlist-fix-oc ร— n=5 per cell (30 runs total, 29 without timeout). As of 2026-05-28.

Overview

Code quality as primary outcome (lower = better except where noted); correctness (verification_pct, higher = better) as gating precondition.

Metric Direction opus-4-7-portkey glm-5-1 gemini-3-5-flash kimi-k2-6 deepseek-v4-flash deepseek-v4-pro
verification_pct (mean) higher 1.00 ๐Ÿ† 1.00 ๐Ÿ† 1.00 ๐Ÿ† 0.57 1.00 ๐Ÿ† 0.85
verification_pct (std) lower 0.00 ๐Ÿ† 0.00 ๐Ÿ† 0.00 ๐Ÿ† 0.40 0.00 ๐Ÿ† 0.33
tests_passing (rate) higher 100% ๐Ÿ† 100% ๐Ÿ† 100% ๐Ÿ† 100% ๐Ÿ† 100% ๐Ÿ† 80%
completed_within_budget (rate) higher 100% ๐Ÿ† 100% ๐Ÿ† 100% ๐Ÿ† 100% ๐Ÿ† 100% ๐Ÿ† 80%
smell_total (mean) lower 3.6 2.8 ๐Ÿ† 4.0 4.4 4.0 4.2
cognitive_max (mean) lower 11.4 ๐Ÿ† 11.6 ๐Ÿ† 16.0 9.4 13.2 11.4
cognitive_avg (mean) lower 8.03 ๐Ÿ† 7.8 ๐Ÿ† 14.07 8.4 8.78 10.6
mccabe_max (mean) lower 7.6 7.0 ๐Ÿ† 10.4 7.6 9.4 8.6
mccabe_avg (mean) lower 2.91 ๐Ÿ† 3.39 6.0 4.85 3.99 3.28
longest_function (mean) lower 18.6 ๐Ÿ† 19.8 18.6 ๐Ÿ† 15.2 27.6 15.0
avg_loc_per_function (mean) lower 7.59 ๐Ÿ† 10.05 15.63 9.9 13.10 9.53
median_loc_per_function (mean) lower 3.3 ๐Ÿ† 8.5 14.9 8.3 9.8 7.0
lines_of_code (mean) lower (at equal correctness) 38.2 ๐Ÿ† 46.4 52.2 22.4 44.8 24.6
tests_total (mean) higher 9.4 ๐Ÿ† 9.8 ๐Ÿ† 8.4 7.0 9.2 ๐Ÿ† 8.6
cycle_count (mean) โ€” 3.0 2.2 7.0 5.0 5.4 7.6
refactorings_applied (mean) โ€” 1.6 2.4 3.6 3.4 4.8 4.6
predictions_total (mean) higher (skill compliance) 4.8 ๐Ÿ† 4.4 0.4 2.0 1.4 6.2 ๐Ÿ†
duration_seconds (mean) lower 231 835 153 ๐Ÿ† 1083 612 2381
total_tokens (mean) lower 1.82 M ๐Ÿ† 2.96 M 2.80 M 2.28 M 2.71 M 2.82 M
cost_usd (mean, $/run) lower (at equal correctness) $1.84 $0.74 $1.06 $1.06 $0.10 ๐Ÿ† $0.37
cost_usd (mean, $/perfect-run) lower $1.84 $0.74 $1.06 $2.65 $0.10 ๐Ÿ† $0.46

Trophy rule on correctness gating: Trophies for quality/efficiency metrics go only to models with verification_pct = 1.0. Kimi-K2 drops out of the pool at 0.57 mean (3 of 5 runs below 0.5) โ€” its low cognitive_max (9.4), low lines_of_code (22.4) and short functions are partly stub artifacts (too few tests). DeepSeek-V4-Pro narrowly drops out of the pool at 0.85 โ€” 4/5 runs are perfect, but 1 run timed out at 0.27 verification, so its low code_mass (124) and lines_of_code (24.6) do not count as clean winners. cycle_count and refactorings_applied are ambivalent (more cycles โ‰  better, depending on skill compliance) โ€” no trophy. predictions_total is exceptionally noted with a direction here: it measures compliance with the single-context-v2 skill format.

cognitive_max, cognitive_avg and longest_function: Opus and GLM are separated by less than 1 ฯƒ โ€” spread rule โ†’ both ๐Ÿ†. At longest_function Flash is exactly level with Opus (18.6) โ†’ third ๐Ÿ†.

Cost calculation: per run from transcript-metrics.json.total_tokens ร— pricing per 1M tokens. Sources 2026-05-28: Anthropic pricing page (Opus), OpenRouter API (GLM/Kimi/DeepSeek), Vertex Standard (Gemini Flash). reasoning tokens are billed at the output rate. DeepSeek cache read is not explicitly stated on OpenRouter; conservative estimate 25 % of the input price.

Model input output cache_read
opus-4-7 (via Vertex EU) $5.00 $25.00 $0.50 (10%)
glm-5-1 (OpenRouter) $0.98 $3.08 $0.18
kimi-k2-6 (OpenRouter) $0.73 $3.49 $0.37
gemini-3-5-flash (Vertex Standard) $1.50 $9.00 $0.15
deepseek-v4-flash (OpenRouter) $0.10 $0.20 $0.025 (25%)
deepseek-v4-pro (OpenRouter) $0.44 $0.87 $0.11 (25%)

Portkey gateway markup not included.

Cost breakdown per mean run (tokens as mean over n=5):

Model input โ†’ cost output (+reasoning) โ†’ cost cache_read โ†’ cost total
opus-4-7-portkey 116 k ร— $5.00 = $0.58 16.9 k ร— $25.00 = $0.42 1.68 M ร— $0.50 = $0.84 $1.84
glm-5-1 144 k ร— $0.98 = $0.14 30.9 k ร— $3.08 = $0.10 2.79 M ร— $0.18 = $0.50 $0.74
kimi-k2-6 371 k ร— $0.73 = $0.27 27.7 k ร— $3.49 = $0.10 1.88 M ร— $0.37 = $0.70 $1.06
gemini-3-5-flash 400 k ร— $1.50 = $0.60 11.2 k ร— $9.00 = $0.10 2.39 M ร— $0.15 = $0.36 $1.06
deepseek-v4-flash 299 k ร— $0.10 = $0.03 30.5 k ร— $0.20 = $0.01 2.38 M ร— $0.025 = $0.06 $0.10
deepseek-v4-pro 110 k ร— $0.44 = $0.05 32.9 k ร— $0.87 = $0.03 2.68 M ร— $0.11 = $0.29 $0.37

$/perfect-run scales with the share of runs with verification_pct = 1.0: Kimi $1.06/run ร— (5/2 verified) = $2.65 per correct solution. DeepSeek-V4-Pro $0.37/run ร— (5/4 verified) = $0.46. Other models 5/5 verified โ†’ unchanged.


F-1.1 โ€” Opus 4.7 writes the most compact implementation

Opus delivers the shortest solution across all code-volume and function-size metrics (LoC, code_mass, avg/median_loc_per_function) at full external correctness and at the same time has the lowest token consumption (1.82 M vs 2.28โ€“2.96 M for the other models with verification_pct = 1.0).

Model lines_of_code avg_loc_per_function median_loc_per_function total_tokens
opus-4-7-portkey 38.2 ๐Ÿ† 7.59 ๐Ÿ† 3.3 ๐Ÿ† 1.82 M ๐Ÿ†
glm-5-1 46.4 10.05 8.5 2.96 M
gemini-3-5-flash 52.2 15.63 14.9 2.80 M
deepseek-v4-flash 44.8 13.10 9.8 2.71 M
kimi-k2-6* 22.4 9.9 8.3 2.28 M
deepseek-v4-pro* 24.6 9.53 7.0 2.82 M

* not trophy-eligible (verification_pct < 1.0).

The median LoC/function of 3.3 (vs 7.0โ€“14.9 for the others) means: Opus consistently extracts small helpers. At avg_loc_per_function Opus, at 7.59, is about half the size of Gemini Flash (15.63) and 40 % more compact than DeepSeek-V4-Flash (13.10).


F-1.2 โ€” GLM 5.1 holds the Opus level in complexity

GLM 5.1 reaches values equal to or better than Opus 4.7 across smell_total, cognitive_* and mccabe_max. Both clearly beat Gemini Flash and DeepSeek-V4-Flash (cognitive-max spread 1.6โ€“4.4 points).

Metric opus-4-7-portkey glm-5-1 gemini-3-5-flash deepseek-v4-flash
smell_total 3.6 2.8 ๐Ÿ† 4.0 4.0
cognitive_max 11.4 ๐Ÿ† 11.6 ๐Ÿ† 16.0 13.2
cognitive_avg 8.03 ๐Ÿ† 7.8 ๐Ÿ† 14.07 8.78
mccabe_max 7.6 7.0 ๐Ÿ† 10.4 9.4
mccabe_avg 2.91 ๐Ÿ† 3.39 6.0 3.99

GLM 5.1 thereby confirms here too (game-of-life) the impression from RQ-model-novel-oc (claim-office): near-Opus quality at OpenRouter prices. In code volume, however, Opus is clearly more compact (F-1.1).


F-1.3 โ€” Kimi-K2 writes too few tests, fails external verification

5/5 Kimi runs report tests_passing=true, but only 2/5 reach verification_pct = 1.0 (the rest: 0.20, 0.27, 0.40). Mean tests_total is the lowest at 7.0 (vs Opus 9.4, GLM 9.8, Flash 8.4, deepseek-flash 9.2) with the highest spread (std 2.74, range 4โ€“9).

Pattern: Kimi minimizes the test list and then implements only what its own reduced suite demands โ€” the internal vitest runs green, but the external game-of-life-verification suite uncovers cases Kimi never tested in the first place. This is exactly the pattern claim-office-verification was originally built against: internally green tests are no proof of correctness.

Run verification_pct tests_total
1 1.00 9
2 1.00 9
3 0.40 7
4 0.27 6
5 0.20 4

F-1.4 โ€” Gemini 3.5 Flash: fast, but the most complex code

At 153 s/run Flash is by far the fastest (Opus 231 s, deepseek-flash 612 s, GLM 835 s, Kimi 1083 s, deepseek-pro 2381 s) and reaches full correctness, but writes the most complex code: highest cognitive_max (16), cognitive_avg (14.07), mccabe_max (10.4), mccabe_avg (6.0) and the longest functions on average (avg_loc_per_function 15.63 vs Opus 7.59). Trade-off: speed against maintainability.


F-1.5 โ€” Skill-tool compliance is model-dependent

v5.1-oc requires prediction markers per red phase. Across the six models four different compliance profiles emerge:

Model predictions_total (mean) predictions_correct (mean) Compliance profile
deepseek-v4-pro 6.2 ๐Ÿ† 5.6 (90%) Consistent, format-faithful
opus-4-7-portkey 4.8 ๐Ÿ† 4.8 (100%) Consistent, format-faithful
glm-5-1 4.4 4.4 (100%) Consistent, format-faithful
kimi-k2-6 2.0 2.0 (100%) Partial, drifts into inline mode
deepseek-v4-flash 1.4 1.4 (100%) Partial, drifts into inline mode
gemini-3-5-flash 0.4 0.4 (100%) Ignores the format almost entirely

Where predictions are written, they are nearly 100 % correct โ€” i.e. the marker drop is not an accuracy problem, but a question of format compliance. Confirms H3 from the RQ README: a low cycle_count (Flash 7.0) with a low predictions_total (0.4) is not "weak TDD discipline", but a failure to recognize the skill format. At the same time deepseek-v4-pro shows the highest skill compliance with 6.2 predictions_total โ€” and also the highest cycle_count (7.6).


F-1.6 โ€” DeepSeek-V4-Flash: cheapest path to the correct solution

DeepSeek-V4-Flash reaches full external correctness (5/5 perfect, std 0.00) at a per-run cost of ~$0.10 โ€” an order of magnitude below the next-cheapest models (GLM-5.1 $0.74, deepseek-v4-pro $0.37, gemini-flash and kimi $1.06). At tests_total (9.2) and mccabe_avg (3.99) it sits mid-field, in code size (LoC 44.8, code_mass 189) at the upper end โ€” the trade-off is clear: cheap + correct vs compact.

Model $/perfect-run duration LoC cognitive_max
deepseek-v4-flash $0.10 ๐Ÿ† 612 s 44.8 13.2
glm-5-1 $0.74 835 s 46.4 11.6 ๐Ÿ†
gemini-3-5-flash $1.06 153 s ๐Ÿ† 52.2 16.0
opus-4-7-portkey $1.84 231 s 38.2 ๐Ÿ† 11.4 ๐Ÿ†

For pure correctness without a complexity requirement, Flash is 18ร— cheaper than Opus here. The code-volume premium (44.8 vs 38.2 LoC) is small.


F-1.7 โ€” DeepSeek-V4-Pro: skill-compliance champion, but tail risk in duration

With predictions_total = 6.2 and cycle_count = 7.6, DeepSeek-V4-Pro produces the most structured TDD chain of all models โ€” beyond Opus (4.8) and GLM (4.4). Prediction accuracy stays high at 90 % (5.6/6.2).

BUT: 1 of 5 runs hit the 7202 s container timeout (verification_pct = 0.27, tests_passing = false); the mean duration is the highest of all models at 2381 s and extremely variable at std=2704 s (range 854โ€“7202 s). The other 4 runs are stable at ~1100 s with perfect verification.

Run duration_s verification_pct predictions_total cycle_count
1 (timeout) 7202 0.27 3 6
2 1326 1.00 6 7
3 854 1.00 5 8
4 1417 1.00 7 8
5 1107 1.00 11 9

The finding parallels the skill-loop issue documented for Gemini 2.5 Pro in the RQ README, but in milder form (4/5 instead of 0/3 successes). For production use Pro needs auto-recovery mechanics or a shorter timeout โ€” in the lab setting the completed_within_budget = 80 % signal is sufficient.