Coding
Like-for-like- Gemma 4 31B
- 42.4
- Supported · #105/151
- Laguna XS.2
- 24.7
- Supported · #148/151
- Basis
- BenchAlign lane · 2 vs 6 public rows
- Reading
- Gemma 4 31B leads · intervals overlap
Keep up with the models you depend on. Follow price changes, retirements, and API updates.Follow the models you depend on.
Follow model changesUpdated September 10, 2026. Public scores include evidence status and uncertainty. They are not guarantees for a specific workload.
Decision reading
The public evidence has no benchmark result shared by both models, so it does not support a quality verdict. Use the documented cost, context, and runtime rows instead.
0 results are shared. Category rows resting on Estimated evidence or different benchmark sets are marked directional and do not name a winner.
Share or export
Recommendations appear only when a shared evidence basis or an explicit operating constraint supports the call. Secondary and unsupported use cases stay disclosed below the initial list.
Code generation, repair, and software-engineering tasks
Gemma 4 31B
Gemma 4 31B leads on the public coding lane, 42.4 to 24.7, with Supported evidence for both models, although the 90% intervals overlap.
Confidence: limited
Tool use, computer use, and multi-step task completion
Not enough matched evidence
Gemma 4 31B and Laguna XS.2 are scored on Estimated evidence for agentic, so the reading is directional rather than like-for-like.
Confidence: limited
Prompts that approach the documented context limit
No clear pick
The documented context windows are equal.
Confidence: documented
1K fresh input + 500 output tokens
Not enough matched evidence
A complete comparable API-rate estimate is not available for both models.
Confidence: listed-rates
200K cached + 20K fresh input + 10K output tokens
Not enough matched evidence
A complete comparable API-rate estimate is not available for both models.
Confidence: listed-rates
50K fresh input + 3K output tokens
Not enough matched evidence
A complete comparable API-rate estimate is not available for both models.
Confidence: listed-rates
Shared results can support a head-to-head reading. Results present for only one model describe coverage, not superiority.
2 categories rest on Estimated evidence or different evidence sets. Those rows remain visible for coverage context but do not name a winner.
Each row shows the public-lane category score for both models: the BenchAlign lane for agentic, coding, and knowledge, and the weighted public rows elsewhere, with the same rank each model page reports. A row is like-for-like only when both scores rest on Supported evidence or the same weighted set. Directional and not-comparable rows remain visible, but they never receive a winner.
| Category | Gemma 4 31B | Laguna XS.2 | Basis | Reading |
|---|---|---|---|---|
| Coding | 42.4Supported · #105/151 | 24.7Supported · #148/151 | Like-for-likeBenchAlign lane · 2 vs 6 public rows | Gemma 4 31B leads · intervals overlap |
| Agentic | 45.5Estimated · #81/152 | 22.4Estimated · #149/152 | Directional onlyBenchAlign lane · 1 vs 2 public rows | Directional only |
| Knowledge | 45.8Supported · #104/183 | 17.7Estimated · #183/183 | Directional onlyBenchAlign lane · 4 vs 2 public rows | Directional only |
| Reasoning | 68.9Unranked · 2 rankable rows | Not ranked | Not comparableProvisional lane · 0 vs 0 weighted rows | Not comparable |
| Math | Not ranked | Not ranked | Not comparableProvisional lane · 0 vs 0 weighted rows | Not comparable |
| Multilingual | Not ranked | Not ranked | Not comparableProvisional lane · 0 vs 0 weighted rows | Not comparable |
| Multimodal | 58.4#30/48 | Not ranked | Not comparableProvisional lane · 1 vs 0 weighted rows | Not comparable |
| Instruction following | 92.8#12/123 | Not ranked | Not comparableProvisional lane · 0 vs 0 weighted rows | Not comparable |
Ranks count the models scored in each category’s lane, so the agentic, coding, and knowledge denominators (BenchAlign) differ from the provisional-lane categories. Unranked scores sit on the lane’s scale but never name a winner. Like-for-like rows within 0.5 points read as a practical tie.
Only shared public evidence is shown. Sparse evidence stays a ruled list rather than being closed into a radar shape.
A shared-evidence shape is not available.
BenchLM does not draw a radar or infer missing axes when the matched evidence is too sparse.
Three fixed token mixes turn per-token rates into comparable decisions. Each scenario states context fit and whether cached input had to fall back to the published list-input rate.
1K fresh input + 500 output tokens
Gemma 4 31B has no comparable published API token rate. Laguna XS.2 has no comparable published API token rate.
50K fresh input + 3K output tokens
Gemma 4 31B has no comparable published API token rate. Laguna XS.2 has no comparable published API token rate.
200K cached + 20K fresh input + 10K output tokens
Gemma 4 31B has no comparable published API token rate. Laguna XS.2 has no comparable published API token rate.
Sourced differences are shown directly. Missing facts stay explicit instead of being inferred from a model name or family.
Maximum documented context; output-token limits may be lower.
Gemma 4 31B
Laguna XS.2
256K
Gemma 4 31B
gemma-4-31b-it
Google Gemma Gemini API guideLaguna XS.2
Not sourced
A missing cached-input rate falls back to the listed input rate only in the stated workload estimate.
Gemma 4 31B
No comparable hosted API rate
Laguna XS.2
No comparable hosted API rate
Gemma 4 31B
text, image
Google Gemma 4 model documentationLaguna XS.2
Not sourced
Gemma 4 31B
Laguna XS.2
Not sourced
Gemma 4 31B
Generally Available · Gemini API, Google AI Studio, open weights
Google Gemma Gemini API guideLaguna XS.2
Not sourced
Gemma 4 31B
Reasoning
Laguna XS.2
Reasoning
Gemma 4 31B
Open Weight
Laguna XS.2
Open Weight
Gemma 4 31B
Open Weight
Laguna XS.2
Open Weight
Gemma 4 31B
2026-04-02
Laguna XS.2
2026-04-28
Run the same representative tasks against both endpoints before changing production traffic.
Estimates at 50,000 req/day · 1000 tokens/req average.
The full public result ledger is available for audit without forcing a wide desktop table onto a phone.
SWE-Rebench
Not directly comparable
React Native Evals
Not directly comparable
SWE-bench Verified
Not directly comparable
SWE Multilingual
Not directly comparable
SWE-bench Pro
Not directly comparable
Terminal-Bench 2.0
Not directly comparable
LiveCodeBench (Vals)
Not directly comparable
SWE-bench (Vals)
Not directly comparable
GPQA
Not directly comparable
MMLU-Pro
Not directly comparable
HLE
Not directly comparable
HLE w/o tools
Not directly comparable
GPQA Diamond (Vals)
Not directly comparable
MMLU-Pro (Vals)
Not directly comparable
MMMU-Pro
Not directly comparable
The public evidence has no benchmark result shared by both models, so it does not support a quality verdict. The page therefore keeps the decision tied to the specific documented workload.
Gemma 4 31B leads the public coding lane, 42.4 to 24.7, with Supported evidence for both models, although the 90% intervals overlap.
Gemma 4 31B scores higher for agentic tasks on the public lane, 45.5 to 22.4. Gemma 4 31B and Laguna XS.2 are scored on Estimated evidence for agentic tasks, so the reading is directional rather than like-for-like. BenchLM does not name a winner for agentic tasks from a directional reading; read the shared benchmark rows directly and test the models on the same task set.
Both models do not have comparable published API token rates, so this page does not name a universal price winner.
Both models list the same context window, 256K.
Last updated September 10, 2026
One weekly email when material rank, price, or benchmark evidence changes make this matchup worth revisiting.
Read a sample issueJoin 2,000+ readers.