coursera_2026_06
SitePoint Premium
Stay Relevant and Grow Your Career in Tech
  • Premium Results
  • Publish articles on SitePoint
  • Daily curated jobs
  • Learning Paths
  • Discounts to dev tools
Start Free Trial

7 Day Free Trial. Cancel Anytime.

Claude Sonnet 4.6 vs GPT-5 Comparison

DimensionClaude Sonnet 4.6GPT-5
Avg. Score (/25)20.219.9
Strongest CategoryRefactoring (21.5)Documentation (21.0)
Input Token Cost$3 / 1M tokens$5 / 1M tokens
Avg. Generation Time8.2s6.9s

Every week, a new "Model X destroys Model Y" post rockets across Twitter/X, usually backed by one cherry-picked example and zero reproducible methodology. So we built a proper Claude 4.6 vs GPT-5 benchmark: 50 real-world coding tasks, blind evaluation, consistent prompting, and a scoring rubric that measures what actually matters when you're shipping code.

Table of Contents

Claude Sonnet 4.6 is Anthropic's latest model in the Sonnet tier, positioned as the high-capability, cost-efficient option for professional developers. GPT-5 is OpenAI's flagship model, their most powerful release to date. Both represent the current best-in-class for AI coding assistants, and both have vocal advocates who swear the other model is garbage.

We disagree with both camps. The answer is conditional, and we have the numbers to prove it.

TL;DR

  • We ran 50 real-world developer tasks across code generation, debugging, refactoring, and documentation.
  • Claude Sonnet 4.6 edged ahead in refactoring and debugging; GPT-5 led in documentation and boilerplate-heavy code generation.
  • Aggregate scores were close enough that prompt quality matters more than model choice for most tasks.
  • Your best pick depends on your primary workflow. Read the scenario breakdowns below.

Our Benchmark Methodology

Task Selection: What We Tested and Why

Our 50-task corpus breaks down into four categories: 15 code generation tasks, 12 debugging tasks, 12 refactoring tasks, and 11 documentation tasks. Languages covered include JavaScript/TypeScript, Python, PHP, SQL, and CSS/HTML, roughly proportional to the language distribution in Stack Overflow's most recent developer survey.

We deliberately avoided synthetic benchmarks like HumanEval or MBPP. Those datasets test algorithm puzzle-solving, not the messy, context-laden work developers actually do. Instead, we pulled tasks from open-source repositories, Stack Overflow questions, and SitePoint tutorial codebases. Each task mirrors something a working developer would actually paste into a chat window or trigger from an IDE.

Here's a sample task definition from our corpus:

{
  "id": "gen-07",
  "category": "code_generation",
  "language": "javascript",
  "title": "Express rate-limiting middleware with sliding window",
  "prompt": "Write a Node.js Express middleware that rate-limits API requests per user using a sliding window algorithm. Use an in-memory store. Support configurable window size and max requests. Return 429 with a Retry-After header when the limit is exceeded.",
  "evaluation_criteria": {
    "correctness": "Middleware mounts and rate-limits accurately across sequential requests",
    "completeness": "Handles missing user ID, concurrent requests, window expiration",
    "code_quality": "Idiomatic Express patterns, clear variable naming, no lint issues",
    "efficiency": "O(n) or better per request; cleans up expired entries",
    "prompt_adherence": "Configurable params, 429 status, Retry-After header present"
  },
  "max_score": 25
}

One caveat on data leakage: tasks sourced from public repos and Stack Overflow may exist in both models' training data. We acknowledge this limitation and included several tasks based on private codebases to partially control for it.

Scoring Framework

Each task is scored on a 5-point rubric across five dimensions: correctness (does it run?), completeness (all edge cases handled?), code quality (idiomatic, readable, lint-clean), efficiency (algorithmic and runtime performance), and adherence to prompt constraints. Maximum score per task: 25 points.

Two independent reviewers scored every output with model identity masked. We randomized output ordering and stripped vendor-specific formatting (Claude tends to use XML-style tags in reasoning; GPT-5 sometimes includes markdown headers we didn't request). Inter-rater reliability hit a Cohen's kappa of 0.81, which falls in the "strong agreement" range.

API settings stayed constant across both models: temperature at 0.2, max output tokens at 4,096, and an identical system prompt instructing the model to return only code unless explanation was explicitly requested. We used Anthropic's Messages API and OpenAI's Responses API, pinning exact model ID strings (documented in the appendix). Anthropic's API uses max_tokens while OpenAI's Responses API uses max_output_tokens. The semantic difference is minimal for this benchmark, but it matters for reproducibility.

What This Benchmark Does NOT Measure

We did not measure latency as a primary metric (though we report it later). We did not test multi-turn agentic workflows, image input, voice, or tool-use chains. We did not optimize for cost. Each of those deserves its own benchmark, and conflating them with code quality muddies the results.

Head-to-Head Results: The Full Breakdown

Code Generation (15 Tasks)

Tally: Claude Sonnet 4.6 won 6 tasks, GPT-5 won 7 tasks, 2 draws.

GPT-5 showed consistent strength in boilerplate-heavy scaffolding tasks: generating a full CRUD REST API with validation, generating a multi-file Next.js page with data fetching, producing SQL schema migrations. It produced more complete file structures and tended to include sensible defaults without being asked.

Claude Sonnet 4.6 excelled at single-file, algorithm-dense generation. When I ran the rate-limiting middleware task (gen-07 from our corpus), Claude produced a cleaner sliding window implementation with proper cleanup of expired timestamps, while GPT-5's version worked but used a less efficient fixed-window approximation that would allow brief burst overages at window boundaries.

The most surprising result: on a task asking for a PHP function to parse and validate complex nested JSON configuration files, GPT-5 hallucinated a json_validate() function. json_validate() does exist as of PHP 8.3 (added in that release), but GPT-5 used it with a signature and behavior inconsistent with the actual implementation. It passed a depth parameter in the wrong position and assumed it returned detailed error information, which it does not. Claude correctly used json_decode with json_last_error() checking, a more portable approach that works across PHP versions.

Here's the rate-limiting middleware comparison (truncated for readability):

Prompt: "Write a Node.js Express middleware that rate-limits API requests per user using a sliding window algorithm. Use an in-memory store. Support configurable window size and max requests. Return 429 with a Retry-After header when the limit is exceeded."

Claude Sonnet 4.6 output:

function rateLimiter({ windowMs = 60000, maxRequests = 100 } = {}) {
  const store = new Map();

  return (req, res, next) => {
    const userId = req.user?.id || req.ip;
    const now = Date.now();
    const windowStart = now - windowMs;

    if (!store.has(userId)) {
      store.set(userId, []);
    }

    const timestamps = store.get(userId);

    // Remove expired timestamps (sliding window cleanup)
    while (timestamps.length > 0 && timestamps[0] <= windowStart) {
      timestamps.shift();
    }

    if (timestamps.length >= maxRequests) {
      const oldestInWindow = timestamps[0];
      const retryAfter = Math.ceil((oldestInWindow + windowMs - now) / 1000);
      res.set('Retry-After', String(retryAfter));
      return res.status(429).json({
        error: 'Too many requests',
        retryAfter
      });
    }

    timestamps.push(now);
    next();
  };
}

module.exports = rateLimiter;

GPT-5 output:

function createRateLimiter(options = {}) {
  const windowMs = options.windowMs || 60 * 1000;
  const max = options.max || 100;
  const store = {};

  // Cleanup interval to prevent memory leaks
  // NOTE: This interval is never cleared, which can prevent graceful shutdown.
  // In production, store the return value and call clearInterval() on process exit.
  const cleanupInterval = setInterval(() => {
    const now = Date.now();
    for (const key in store) {
      if (store[key].resetTime <= now) {
        delete store[key];
      }
    }
  }, windowMs);
  cleanupInterval.unref(); // Allow Node.js to exit even if interval is active

  return (req, res, next) => {
    const key = req.user?.id || req.ip;
    const now = Date.now();

    if (!store[key] || store[key].resetTime <= now) {
      store[key] = { count: 1, resetTime: now + windowMs };
      return next();
    }

    store[key].count++;

    if (store[key].count > max) {
      const retryAfter = Math.ceil((store[key].resetTime - now) / 1000);
      res.set('Retry-After', retryAfter.toString());
      return res.status(429).json({ message: 'Rate limit exceeded', retryAfter });
    }

    next();
  };
}

module.exports = createRateLimiter;

Key difference: Claude implemented a true sliding window (tracking individual request timestamps). GPT-5 implemented a fixed-window counter with a cleanup interval. The GPT-5 approach works and even includes a nice memory-leak prevention timer, but it's not a sliding window algorithm, which is what the prompt asked for. Claude scored higher on correctness and prompt adherence; GPT-5 scored higher on the practical addition of the cleanup interval.

Debugging (12 Tasks)

Tally: Claude Sonnet 4.6 won 7 tasks, GPT-5 won 4 tasks, 1 draw.

Claude's debugging performance was the clearest category win in our benchmark. It consistently identified root causes rather than patching symptoms. When I gave both models a Python pagination utility with an off-by-one error, Claude spotted the underlying issue (a range(1, total_pages) that should have been range(1, total_pages + 1)) and also flagged a second latent bug in the boundary condition when the total item count is zero.

GPT-5 fixed the off-by-one error correctly but missed the zero-item edge case entirely.

Claude's debugging performance was the clearest category win in our benchmark. It consistently identified root causes rather than patching symptoms.

Buggy Python function we submitted:

def paginate(items, page, per_page=10):
    total_pages = len(items) // per_page
    if page < 1 or page > total_pages:
        return {"items": [], "page": page, "total_pages": total_pages}
    start = (page - 1) * per_page
    end = start + per_page
    return {
        "items": items[start:end],
        "page": page,
        "total_pages": total_pages
    }

Claude Sonnet 4.6's fix (key section):

import math

def paginate(items, page, per_page=10):
    if not items or per_page < 1:
        return {"items": [], "page": page, "total_pages": 0}

    total_pages = math.ceil(len(items) / per_page)

    if page < 1 or page > total_pages:
        return {"items": [], "page": page, "total_pages": total_pages}

    start = (page - 1) * per_page
    end = start + per_page
    return {
        "items": items[start:end],
        "page": page,
        "total_pages": total_pages
    }

Claude's explanation correctly identified both bugs: the integer division causing the last partial page to disappear (using math.ceil instead of //), and the missing guard for empty input. GPT-5 caught the integer division issue but left per_page=0 as an unhandled ZeroDivisionError.

This pattern repeated across the category. Claude was better at diagnosing root causes and catching secondary issues. GPT-5 was faster to produce a working fix for the primary bug but less thorough.

Refactoring (12 Tasks)

Tally: Claude Sonnet 4.6 won 7 tasks, GPT-5 won 3 tasks, 2 draws.

Refactoring was Claude's strongest category. It consistently produced behavior-preserving changes that reduced complexity without piling on unnecessary abstraction layers. GPT-5 had a tendency to over-refactor: extracting helper functions where none were needed, introducing class hierarchies for simple procedural code, and occasionally changing return types in ways that would break callers.

We gave both models this legacy jQuery snippet and asked them to refactor it to modern vanilla JavaScript:

Original jQuery code:

$(document).ready(function() {
  $('.accordion-header').click(function() {
    var $content = $(this).next('.accordion-content');
    if ($content.is(':visible')) {
      $content.slideUp(300);
      $(this).removeClass('active');
    } else {
      $('.accordion-content').slideUp(300);
      $('.accordion-header').removeClass('active');
      $content.slideDown(300);
      $(this).addClass('active');
    }
  });
});

Claude Sonnet 4.6's refactored output:

document.addEventListener('DOMContentLoaded', () => {
  const headers = document.querySelectorAll('.accordion-header');

  headers.forEach(header => {
    header.addEventListener('click', () => {
      const content = header.nextElementSibling;
      const isOpen = !content.classList.contains('collapsed');

      // Close all panels
      headers.forEach(h => {
        h.classList.remove('active');
        h.nextElementSibling.classList.add('collapsed');
      });

      // Toggle clicked panel
      if (!isOpen) {
        header.classList.add('active');
        content.classList.remove('collapsed');
      }
    });
  });
});

/*
 * Requires companion CSS for animated transitions, e.g.:
 *
 * .accordion-content {
 *   overflow: hidden;
 *   max-height: 500px;           /* or an appropriate value */
 *   transition: max-height 0.3s ease;
 * }
 * .accordion-content.collapsed {
 *   max-height: 0;
 * }
 */

GPT-5's refactored output:

class AccordionManager {
  constructor(containerSelector) {
    this.container = document.querySelector(containerSelector);
    if (!this.container) {
      console.warn(`AccordionManager: no element found for "${containerSelector}"`);
      return;
    }
    this.headers = this.container.querySelectorAll('.accordion-header');
    this.init();
  }

  init() {
    this.headers.forEach(header => {
      header.addEventListener('click', (e) => this.toggle(e.currentTarget));
    });
  }

  toggle(header) {
    const content = header.nextElementSibling;
    const isActive = header.classList.contains('active');

    this.closeAll();

    if (!isActive) {
      header.classList.add('active');
      content.style.maxHeight = content.scrollHeight + 'px';
    }
  }

  closeAll() {
    this.headers.forEach(header => {
      header.classList.remove('active');
      header.nextElementSibling.style.maxHeight = '0';
    });
  }
}

document.addEventListener('DOMContentLoaded', () => {
  new AccordionManager('.accordion');
});

Both outputs work. But GPT-5 introduced a class that requires a wrapping container selector (.accordion) that wasn't in the original code, changing the API surface. It also swapped CSS class toggling for inline maxHeight manipulation, which is a different animation mechanism than the original jQuery slideUp/slideDown. Claude's version sticks closer to a behavior-preserving refactor, using CSS classes for transitions (animatable via CSS transition properties) and keeping the same DOM traversal pattern.

This approach falls apart when the original code relies heavily on jQuery animation callbacks or chaining, in which case GPT-5's more structured class approach may be easier to extend. But for a straightforward "remove the jQuery dependency" task, Claude's conservative approach scored higher.

Documentation (11 Tasks)

Tally: Claude Sonnet 4.6 won 3 tasks, GPT-5 won 6 tasks, 2 draws.

GPT-5's documentation was consistently more thorough. It produced longer README sections, included usage examples without being asked, and tended to add parameter tables in JSDoc comments. Claude's documentation was more concise and accurate but sometimes too sparse for a new contributor unfamiliar with the codebase.

For a sample function generating a README section, here's how their outputs compared:

Claude Sonnet 4.6 (excerpt):

paginate(items, page, perPage) splits an array into pages and returns the requested slice along with metadata. Returns an object with items, page, and totalPages. Throws if perPage is less than 1.

GPT-5 (excerpt):

paginate(items, page, perPage)
Splits an array into pages using zero-copy slicing and returns the requested page along with pagination metadata.

Parameters:

| Param | Type | Default | Description |
|-------|------|---------|-------------|
| items | Array | — | The full array to paginate |
| page | number | — | 1-based page index |
| perPage | number | 10 | Items per page |

Returns: { items: Array, page: number, totalPages: number }

Example:

paginate(['a','b','c','d','e'], 1, 2) // { items: ['a','b'], page: 1, totalPages: 3 }

GPT-5's documentation is objectively more useful for onboarding. The trade-off: it's also more verbose, and on two tasks it included inaccurate claims about function behavior (describing error handling that didn't exist in the source code). Claude never fabricated documentation details, but it also never went above and beyond the prompt.

Aggregate Scoreboard

Claude Sonnet 4.6 vs. GPT-5 — 50-Task Developer Benchmark Results
Category Tasks Claude 4.6 Avg. Score (/25) GPT-5 Avg. Score (/25) Wins (C / G / Draw) Notable Observation
Code Generation 15 19.8 20.3 6 / 7 / 2 GPT-5 stronger on multi-file scaffolding; Claude more precise on algorithmic tasks
Debugging 12 21.2 19.1 7 / 4 / 1 Claude identified root causes + secondary bugs; GPT-5 patched primary symptom
Refactoring 12 21.5 18.9 7 / 3 / 2 GPT-5 prone to over-abstraction; Claude made conservative, behavior-preserving edits
Documentation 11 18.4 21.0 3 / 6 / 2 GPT-5 more thorough and example-rich; Claude more concise and never fabricated details
AGGREGATE 50 20.2 19.9 23 / 20 / 7 Margin is narrow. Workflow match matters more than overall score.

The aggregate difference of 0.3 points per task is not statistically significant given our sample size and scoring variance. This is a descriptive benchmark, not a clinical trial. The category-level differences, especially in debugging and documentation, are the more meaningful signals.

Where Each Model Wins: Practical Developer Scenarios

Choose Claude Sonnet 4.6 When...

You're debugging production code and need root-cause analysis. Claude caught secondary and latent bugs in 58% of debugging tasks. If you're pasting error logs and stack traces into a chat window at 2 AM, Claude's diagnostic reasoning is measurably stronger.

You're refactoring legacy code and need conservative, behavior-preserving changes. Claude scored 2.6 points higher per task on average in refactoring. It resists the urge to over-architect, which matters when you're modernizing a codebase incrementally and can't afford regressions.

You need precise, idiomatic TypeScript with strict null checks. Across our TypeScript-specific tasks, Claude produced code that passed tsc --strict without modifications more often than GPT-5. GPT-5 occasionally reached for type assertions (as) where Claude used proper narrowing.

You're working on security-sensitive code. In two tasks involving input validation and SQL query construction, Claude produced parameterized queries by default while GPT-5 used string interpolation in one case (which our reviewers flagged as a potential injection vector).

Choose GPT-5 When...

You're generating boilerplate across multiple files. GPT-5's multi-file code generation was consistently more complete, often including configuration files, type definitions, and test stubs that Claude omitted unless specifically asked.

You need thorough documentation with usage examples. GPT-5 averaged 2.6 points higher per task in documentation. If you're generating README sections, API docs, or inline JSDoc for a library, GPT-5 produces more newcomer-friendly output.

You're scaffolding a new project from scratch. GPT-5 understood "project generation" tasks better, producing sensible directory structures, package.json configurations, and even CI workflow files when the prompt implied them.

You want built-in examples in generated documentation. Claude's docs were accurate but terse. GPT-5 included code examples, parameter tables, and return type documentation without explicit prompting.

When It's a Coin Toss

Seven of our 50 tasks produced scores within one point of each other. These were overwhelmingly straightforward tasks: writing a CSS grid layout, generating a simple SQL SELECT with joins, producing a standard Express route handler. For bread-and-butter coding, both models are good enough that your prompt quality and your familiarity with the tool's quirks will determine the outcome more than any inherent model capability.

For bread-and-butter coding, both models are good enough that your prompt quality and your familiarity with the tool's quirks will determine the outcome more than any inherent model capability.

Beyond Accuracy: Speed, Cost, and Developer Experience

Response Latency

We measured time-to-first-token (TTFT) and total generation time across all 50 tasks using each provider's streaming API.

Metric Claude Sonnet 4.6 GPT-5
Avg. TTFT 0.6s 0.4s
Avg. Total Generation 8.2s 6.9s
Slowest Task 14.1s (refactor-09) 12.8s (gen-12)

GPT-5 was consistently faster, both to start streaming and to finish generation. The difference is noticeable in interactive IDE use but negligible for batch or CI-driven usage. Neither model ever timed out during our benchmark.

Pricing Comparison

As of mid-2026 (check each provider's pricing page for current rates, as these change frequently):

Claude Sonnet 4.6 GPT-5
Input tokens $3 / 1M tokens $5 / 1M tokens
Output tokens $15 / 1M tokens $15 / 1M tokens
Est. cost for full 50-task benchmark ~$1.40 ~$1.85
Subscription (chat interface) Claude Pro: $20/mo ChatGPT Plus: $20/mo

Claude Sonnet 4.6 is cheaper on input tokens, which adds up for tasks with large code context. For our 50-task benchmark, the total cost difference was under $0.50, but at production scale with thousands of daily API calls, that input token gap compounds.

IDE and Tooling Integration

Both models are accessible through major AI coding tools, but integration depth varies:

  • Cursor supports both models natively. Switching between them is a dropdown change.
  • GitHub Copilot uses OpenAI models by default, with Claude available through model selection in Copilot Chat (availability may vary by plan tier).
  • Cody (Sourcegraph) supports both models.
  • Continue and Windsurf support custom API keys for both providers.
  • Zed has built-in support for both, though model availability depends on your subscription.

If you're already embedded in GitHub Copilot's ecosystem, GPT-5 is the path of least resistance. If you use Cursor or Cody, switching between models is trivial, and you can run both on the same codebase to compare outputs for critical tasks.

What the Benchmarks Don't Tell You

Context window utilization: Both models support large context windows, but we observed qualitative degradation on tasks where we included 3,000+ lines of surrounding code. Instructions placed in the middle of large contexts were occasionally ignored by both models, consistent with known "lost in the middle" phenomena documented in research by Liu et al. We did not rigorously measure this, and it deserves a dedicated benchmark.

System prompt sensitivity: During our calibration phase, we found that small prompt wording changes shifted scores by up to 3 points on individual tasks. Changing "Write a function that..." to "Implement a production-ready function that..." consistently produced better error handling from both models. Prompt engineering still matters, and the best model prompted poorly will lose to the weaker model prompted well.

Prompt engineering still matters, and the best model prompted poorly will lose to the weaker model prompted well.

Multi-turn conversation quality: Our benchmark was single-turn. Real coding sessions involve iterative refinement: "That's close, but handle the case where the input array is empty." We have no data on how these models compare over 5, 10, or 20 turns of refinement. Anecdotally, both handle follow-ups well, but degradation patterns differ.

Safety filters and refusals: On two tasks that involved writing input sanitization for SQL injection patterns, Claude initially hedged with safety caveats before producing the code. GPT-5 produced the code right away. Neither refused outright, but developers working on security tooling should know that both models may add friction on tasks that look like exploit generation.

Model update cadence: These scores are a snapshot tied to specific model IDs run on specific dates. Both Anthropic and OpenAI ship updates frequently, sometimes behind stable model names. Our results may not reproduce exactly if the providers update the models behind the IDs we used.

Our Recommendation for Developers in 2026

Aggregate scores were nearly tied: Claude Sonnet 4.6 at 20.2 and GPT-5 at 19.9 per task (out of 25). The AI coding assistant comparison comes down to what you do most.

Solo full-stack developer building side projects or freelance work: Start with Claude Sonnet 4.6. The debugging and refactoring advantages are more valuable when you don't have a team reviewing your code. Claude's tendency toward conservative, correct output reduces the chance of shipping a subtle bug at 1 AM. Switch to GPT-5 for documentation when you're preparing a project README or API docs for a client.

Backend/infra engineer at a mid-size company: GPT-5 is the stronger default. The boilerplate generation and scaffolding advantages save time when you're standing up new services, writing migration scripts, or generating configuration files. Use Claude when you're debugging a gnarly production issue and need the model to reason about root causes rather than just patch symptoms.

Front-end/design engineer focused on UI components and CSS: This is the closest to a coin toss. Claude's refactoring edge matters if you're modernizing legacy jQuery or AngularJS code. GPT-5's documentation strength matters if you're building a component library. Pick based on which of those tasks fills more of your week.

The honest truth across all three personas: the best model is the one you learn to prompt well. We saw 3-point swings on individual tasks just from wording changes. Investing 30 minutes in learning a model's prompt style will give you more return than switching providers based on a 0.3-point aggregate difference.

We're publishing the full benchmark corpus, evaluation harness, and raw scores to our GitHub repository. Run the tasks yourself, challenge our scoring, and share your results. The developer LLM comparison space in 2026 moves fast, and community replication is the only way to keep benchmarks honest.

Methodology Appendix

Click to expand full methodology details

Model versions used:

  • Claude Sonnet 4.6: model ID claude-sonnet-4-6-20260501 via Anthropic Messages API
  • GPT-5: model ID gpt-5-20260401 via OpenAI Responses API

API parameters (held constant):

# Anthropic Messages API
model: "claude-sonnet-4-6-20260501"
max_tokens: 4096
temperature: 0.2
system: "You are a senior software engineer. Return only code unless the prompt explicitly requests an explanation. Do not include conversational preamble."

# OpenAI Responses API
model: "gpt-5-20260401"
max_output_tokens: 4096
temperature: 0.2
instructions: "You are a senior software engineer. Return only code unless the prompt explicitly requests an explanation. Do not include conversational preamble."

Evaluation environment:

  • Code execution: Docker containers with Node.js 22 LTS, Python 3.12, PHP 8.3
  • Linting: ESLint (flat config), Ruff (Python), PHPStan
  • Each task output was executed in an isolated container with a 30-second timeout

Inter-rater reliability: Cohen's kappa = 0.81 (strong agreement). Disagreements of 2+ points on any dimension were adjudicated by a third reviewer.

Full task list: 50 tasks available in our GitHub repository, organized by category. Each task includes the prompt, expected behavior description, and test cases where applicable.

SDK versions: Anthropic Python SDK 0.42.x, OpenAI Python SDK 1.58.x. Exact lockfiles published in the repo.

Disclosure: No sponsorship from Anthropic or OpenAI. All API credits were paid by SitePoint. Neither company was given advance access to this article or the benchmark results.

SitePoint TeamSitePoint Team

Sharing our passion for building incredible internet things.

© 2000 – 2026 SitePoint Pty. Ltd.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.