Anthropic Claude 3.5 Sonnet v2 vs OpenAI GPT-5.1 Codex

Detailed comparison for LLMs

AnthropicOpenAI

On Guardion's LLM vulnerability Benchmark, Anthropic Claude 3.5 Sonnet v2 is the more secure of the two: Claude 3.5 Sonnet v2 scores 4.4% 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

Claude 3.5 Sonnet v2 is the overall winner in this comparison!

Attack Success Rate (lower is safer)

ASR for Anthropic Claude 3.5 Sonnet v2 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)

Claude 3.5 Sonnet v2
4.4%
GPT-5.1 Codex
8.5%

TAP Attack Method (ASR)

Claude 3.5 Sonnet v2
8.8%
GPT-5.1 Codex
100.0%

Crescendo Attack Method (ASR)

Claude 3.5 Sonnet v2
3.8%
GPT-5.1 Codex
100.0%

Zero-Shot (ASR)

Claude 3.5 Sonnet v2
0.5%
GPT-5.1 Codex
100.0%

Key Highlights

  • Anthropic Claude 3.5 Sonnet v2 has a lower Overall (ASR).
  • Anthropic Claude 3.5 Sonnet v2 has a lower TAP Attack Method (ASR).
  • Anthropic Claude 3.5 Sonnet v2 has a lower Crescendo Attack Method (ASR).
  • Anthropic Claude 3.5 Sonnet v2 has a lower Zero-Shot (ASR).

Security Profile

Outward is better on every axis.

OverallTAPCrescendoZero-Shot
Claude 3.5 Sonnet v2
GPT-5.1 Codex
Full security profile
Anthropic Claude 3.5 Sonnet v2
Full security profile
OpenAI GPT-5.1 Codex

Frequently asked questions

Is Anthropic Claude 3.5 Sonnet v2 or OpenAI GPT-5.1 Codex more secure?

On Guardion's LLM vulnerability Benchmark, Anthropic Claude 3.5 Sonnet v2 is the more secure of the two: Claude 3.5 Sonnet v2 scores 4.4% 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 Claude 3.5 Sonnet v2 vs GPT-5.1 Codex?

Claude 3.5 Sonnet v2 has a 4.4% 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 Claude 3.5 Sonnet v2 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