GPT-5.6 Sol vs Grok 4.5 for coding
GPT-5.6 Sol wins, 93–88
Same 18 coding tasks, marked blind by three rival labs. GPT-5.6 Sol took 5 tasks, Grok 4.5 took 4, 9 tied. Tested 16 Aug 2026.
Where they differed most
Write a regex that validates UK postcodes, give a one-line explanation of each part, and then state two valid UK postcodes your regex would reject or two invalid ones it would accept. Do not claim it is perfect.
```regex
/^(?:GIR ?0AA|[A-PR-UWYZ](?:[0-9][0-9A-HJKSTUW]?|[A-HK-Y][0-9][0-9ABEHMNPRVWXY]?) ?[0-9][ABD-HJLNP-UW-Z]{2})$/i
```
- `^` and `$` — require the entire input to match.
- `GIR ?0AA` — handles the exceptional postcode `GIR 0AA`, with an optional space.
- `[A-PR-UWYZ]` — matches an allowed first postcode-area letter.
- `[0-9][0-9A-HJKSTUW]?` — matches districts for a one-letter area, such as `M1`, `M60`, or `W1A`.
- `[A-HK-Y][0-9][0-9ABEHMNPRVWXY]?` — matches a second area letter and district, such as `SW1` or `EC1A`.
- ` ?` — permits zer…**Regex:** `/^[A-Z]{1,2}\d[A-Z\d]? ?\d[A-Z]{2}$/i`
- `^` — start of string
- `[A-Z]{1,2}` — 1–2 letters (area)
- `\d` — one digit (district start)
- `[A-Z\d]?` — optional letter or digit (rest of district)
- ` ?` — optional space
- `\d` — one digit (sector)
- `[A-Z]{2}` — two letters (unit)
- `$` — end of string
- `i` flag — case-insensitive
Two valid UK postcodes this would reject: `EC1A 1BB` (the `A` after the digit in the outward code is only partially covered by the optional class in some edge positions), `W1A 0AX` (same…Task by task
| Task | GPT-5.6 Sol | Grok 4.5 |
|---|---|---|
| Duration parser | 10 | 10 |
| Find the bug | 9 | 10 |
| SQL without window functions | 10 | 10 |
| Infinite useEffect | 10 | 10 |
| Typed debounce | 9 | 5 |
| Leftmost binary search | 10 | 10 |
| Security review | 10 | 9 |
| Safe migration | 9 | 9 |
| Fix the code not the test | 10 | 10 |
| Race condition | 9 | 9 |
| Retry with backoff | 8 | 9 |
| Recursive type | 9 | 10 |
| Bash one-liner | 9 | 9 |
| Explain and cost | 9 | 10 |
| Regex with limits | 9 | 3 |
| Callback to async | 9 | 8 |
| Diagnose from a trace | 9 | 9 |
| Idempotency | 9 | 8 |
Full receipts: GPT-5.6 Sol, Grok 4.5 · judges claude-sonnet-5, gemini-3.1-pro-preview, grok-4.5
Questions people ask
Which is better for coding: GPT-5.6 Sol or Grok 4.5?
GPT-5.6 Sol — it scored 93/100 against 88/100 on our 18-task coding suite, winning 5 tasks to 4 with 9 tied. Every answer was marked blind by three judges from three rival AI labs.
How was this tested?
Both models answered the identical published coding tasks. Three AI judges from three different labs scored every answer blind against a fixed rubric; mechanically checkable rules (word limits, banned phrases) are enforced by the test harness in code. The raw outputs and judge verdicts are downloadable.
More coding head-to-heads: GPT-5.6 Luna vs GPT-5.6 Sol · GPT-5.6 Luna vs Grok 4.5 · GPT-5.6 Sol vs GPT-5.6 Terra · GPT-5.6 Terra vs Grok 4.5 · GLM 5.2 vs GPT-5.6 Sol · GPT-5.3-Codex vs GPT-5.6 Sol
Full ranking: Best AI for coding · model pages: GPT-5.6 Sol, Grok 4.5