Skip to content

fix: apply Opus 4.7 API contract to Claude Opus 4.8#3418

Merged
amitksingh1490 merged 1 commit into
mainfrom
fix/opus-4-8-reasoning-transform
May 29, 2026
Merged

fix: apply Opus 4.7 API contract to Claude Opus 4.8#3418
amitksingh1490 merged 1 commit into
mainfrom
fix/opus-4-8-reasoning-transform

Conversation

@amitksingh1490
Copy link
Copy Markdown
Contributor

Bug

Claude Opus 4.8 is registered as a model but isn't recognized by the model-specific request transforms. Because its model ID doesn't match any known family, it falls through to the legacy (pre-4.5) code path.

Opus 4.8 follows the same API contract as Opus 4.7, where the API returns 400 errors for:

  • non-default temperature / top_p / top_k sampling parameters, and
  • manual extended thinking (thinking.enabled with budget_tokens).

Today, requests to Opus 4.8 send exactly these rejected parameters (and a backfilled legacy thinking budget), so every Opus 4.8 request fails. It also drops the effort parameter that the model actually supports, and sends a redundant interleaved-thinking beta header.

Fix

Recognize Opus 4.8 as sharing Opus 4.7's contract so the correct, backward-compatible transforms are applied. No behavior changes for any other model.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
@github-actions github-actions Bot added the type: fix Iterations on existing features or infrastructure. label May 29, 2026
@amitksingh1490 amitksingh1490 merged commit b3454cb into main May 29, 2026
10 checks passed
@amitksingh1490 amitksingh1490 deleted the fix/opus-4-8-reasoning-transform branch May 29, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants