xAI Grok-4.1 Thinking vs OpenAI GPT-5.1 Codex

Detailed comparison for LLMs

xAIOpenAI

On Guardion's LLM vulnerability Benchmark, OpenAI GPT-5.1 Codex is the more secure of the two: Grok-4.1 Thinking scores 10.0% and GPT-5.1 Codex scores 8.5% on attack success rate (ASR) (lower is better). One or both scores are estimated from public safety evaluations pending a Guardion benchmark run.

Head-to-Head Overview

GPT-5.1 Codex is the overall winner in this comparison!

Attack Success Rate (lower is safer)

ASR for xAI Grok-4.1 Thinking vs OpenAI GPT-5.1 Codex. Green marks the safer model on each metric. Only the overall score is available for estimated models.

Overall (ASR)

Grok-4.1 Thinking
10.0%
GPT-5.1 Codex
8.5%

TAP Attack Method (ASR)

Grok-4.1 Thinking
100.0%
GPT-5.1 Codex
100.0%

Crescendo Attack Method (ASR)

Grok-4.1 Thinking
100.0%
GPT-5.1 Codex
100.0%

Zero-Shot (ASR)

Grok-4.1 Thinking
100.0%
GPT-5.1 Codex
100.0%

Key Highlights

  • OpenAI GPT-5.1 Codex has a lower Overall (ASR).

Security Profile

Outward is better on every axis.

OverallTAPCrescendoZero-Shot
Grok-4.1 Thinking
GPT-5.1 Codex
Full security profile
xAI Grok-4.1 Thinking
Full security profile
OpenAI GPT-5.1 Codex

Frequently asked questions

Is xAI Grok-4.1 Thinking or OpenAI GPT-5.1 Codex more secure?

On Guardion's LLM vulnerability Benchmark, OpenAI GPT-5.1 Codex is the more secure of the two: Grok-4.1 Thinking scores 10.0% and GPT-5.1 Codex scores 8.5% on attack success rate (ASR) (lower is better). One or both scores are estimated from public safety evaluations pending a Guardion benchmark run.

What is the attack success rate (ASR) of Grok-4.1 Thinking vs GPT-5.1 Codex?

Grok-4.1 Thinking has a 10.0% ASR and GPT-5.1 Codex has a 8.5% ASR — the share of adversarial prompts that succeed across zero-shot, TAP, and Crescendo attacks. Lower is safer.

How were Grok-4.1 Thinking and GPT-5.1 Codex tested?

Both were red-teamed with the HarmBench framework across zero-shot, TAP (Tree of Attacks with Pruning), and Crescendo multi-turn attacks, scored by Attack Success Rate.

Related Comparisons