Skip to content

[Fix] Anthropic Opus 4.7 fails when reasoning is enabled#111

Merged
edelauna merged 5 commits into
mainfrom
fix/anthropic-opus-47-reasoning-2t1dxtysd9m1w
May 15, 2026
Merged

[Fix] Anthropic Opus 4.7 fails when reasoning is enabled#111
edelauna merged 5 commits into
mainfrom
fix/anthropic-opus-47-reasoning-2t1dxtysd9m1w

Conversation

@roomote

@roomote roomote Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Elliott de Launay. View the task or mention @roomote for follow-up asks.

What problem this solves

Fixes an issue where users hitting the direct Anthropic provider with claude-opus-4-7 would get a 400 error once reasoning was enabled, because Zoo Code still sent the legacy budget-based thinking payload that Opus 4.7 rejects.

Why this change was made

This switches the direct Anthropic Opus 4.7 path to an adaptive reasoning payload and updates the model metadata so the UI treats reasoning as a binary toggle for that provider/model combination. It also strengthens regression coverage at both the provider layer and the VS Code e2e boundary so the outbound request shape is checked directly.

User impact

Anthropic Opus 4.7 reasoning requests now use the payload the provider expects, so enabling reasoning no longer trips the "thinking.type.enabled" request error on that path. The updated e2e also guards the extension-host wiring so future changes are less likely to regress this again.

@roomote roomote Bot added the roomote:auto-resolve-conflicts Allow Roomote to auto-resolve merge conflicts for this PR label May 14, 2026
@roomote

roomote Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

1 issue outstanding. Action required. See task

  • The Opus 4.7 max-token regression from the initial capability change was addressed on the latest head.
  • The Anthropic proxy helper now constrains the upstream target and returns a generic failure response, so the earlier CodeQL alerts are addressed on the latest head.
  • After the 10-minute wait cap, 1 CI check is still pending on ed45057: platform-unit-test (ubuntu-latest). — dismissed: superseded by the newer head 8a1884c, which reran CI.
  • After the wait window, platform-unit-test (ubuntu-latest) is still pending on 8a1884c. — dismissed: rerun on the newer head f7bf252 passed after the current 10-minute wait window.
  • After the wait window, platform-unit-test (windows-latest) is still pending on 8a1884c. — dismissed: superseded by the newer head f7bf252, which reran CI.
  • After the 10-minute wait cap, platform-unit-test (windows-latest) is still pending on f7bf252.

Comment thread apps/vscode-e2e/src/suite/anthropic-opus-4-7.test.ts Fixed
Comment thread apps/vscode-e2e/src/suite/anthropic-opus-4-7.test.ts Fixed
Comment thread apps/vscode-e2e/src/suite/anthropic-opus-4-7.test.ts Fixed
Comment thread packages/types/src/providers/anthropic.ts
@codecov

codecov Bot commented May 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.92857% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/api/providers/anthropic.ts 78.04% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread apps/vscode-e2e/src/suite/anthropic-opus-4-7.test.ts Fixed
Comment thread src/api/transform/reasoning.ts Outdated
Comment thread apps/vscode-e2e/src/suite/anthropic-opus-4-7.test.ts Outdated
@edelauna edelauna marked this pull request as ready for review May 15, 2026 00:26
@edelauna edelauna force-pushed the fix/anthropic-opus-47-reasoning-2t1dxtysd9m1w branch from 8a1884c to f7bf252 Compare May 15, 2026 11:22
@edelauna edelauna merged commit d2fb21e into main May 15, 2026
9 checks passed
@edelauna edelauna deleted the fix/anthropic-opus-47-reasoning-2t1dxtysd9m1w branch May 27, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roomote:auto-resolve-conflicts Allow Roomote to auto-resolve merge conflicts for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants