Skip to content

fix(ai): guard unsupported Claude Opus 5.5 request options - #51302

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
opus55-compat-sep25
Open

opencode-agent[bot] wants to merge 1 commit into
v2from
opus55-compat-sep25

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • Reject explicit disabled/manual thinking and forced tool choices for Claude Opus 5.5 at the Anthropic Messages request boundary. Anthropic returns HTTP 400 for these shapes; a local InvalidRequest gives the caller a valid alternative without silently discarding a thinking budget or required tool behavior.
  • Preserve adaptive thinking, auto/none tool choice, and older Opus request behavior, including gateway-qualified model IDs.

Verification

  • bun test test/provider/anthropic-messages.test.ts test/provider/anthropic-thinking-binding.test.ts — 91 passed.
  • bun typecheck from packages/ai, bun run lint, Prettier check, and git diff --check passed.
  • Root bun run check could not complete on this host: Astro rejects its Node 18 installation; a Bun-as-node retry was terminated under host resource contention.

Anthropic sources: September 22 release notes and Opus 5.5 API changes.

Requested by: @nexxeln (nexxel via Slack)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant