Skip to content

fix: add display 'summarized' for Opus 4.7 on Bedrock to prevent reasoning errors #23166

Description

@Dulani

Claude Opus 4.7 on AWS Bedrock fails with "reasoning part 0 not found" error on first message when using extended thinking. Opus 4.7 defaults thinking.display to "omitted" instead of "summarized".

Steps to Reproduce

  1. Configure OpenCode to use us.anthropic.claude-opus-4-20250514 on AWS Bedrock
  2. Enable extended thinking (any variant)
  3. Send a message

Expected vs Actual

  • Expected: First message completes
  • Actual: "reasoning part 0 not found" error

Why This Happens

Commit #22873 fixed this for Anthropic Messages API but not for Bedrock. When display: "omitted", thinking blocks arrive empty, breaking Vercel AI SDK's streaming transform.

Environment

  • OpenCode 1.4.7+
  • Provider: AWS Bedrock
  • Model: us.anthropic.claude-opus-4-20250514 (Opus 4.7)

Authored by: Haiku 4.5 (90%), Human review & direction (10%)

Activity

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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions