Skip to content

fix: GPT-5.6 Bedrock reasoning variants fail with SDK 4.0.158 #45405

Description

@mmurilo

Description

GPT-5.6 OpenAI models on Amazon Bedrock fail when a reasoning-effort variant is selected. OpenCode currently pins @ai-sdk/amazon-bedrock@4.0.158, which emits an invalid reasoning field for prefixed profiles such as global.openai.gpt-5.6-luna; Bedrock returns HTTP 400, for example Unknown parameter: reasoningConfig.

The upstream fix is published in @ai-sdk/amazon-bedrock@4.0.165. Update the dependency in both packages/core/package.json and packages/opencode/package.json, regenerate bun.lock, and verify the request.

Upstream history: AI SDK issue #19403, main fix #19420, v6 backport #19624, release merge #19752, and published v6 release #19775. The published 4.0.165 source sends nested reasoning.effort for GPT-5.x and retains flat reasoning_effort for gpt-oss.

Plugins

None

OpenCode version

v1.18.23

Steps to reproduce

  1. Configure Amazon Bedrock with valid credentials.
  2. Select global.openai.gpt-5.6-luna.
  3. Select a non-default reasoning-effort variant.
  4. Send a prompt.
  5. Observe the Bedrock Converse HTTP 400 response.

Expected: the request uses additionalModelRequestFields.reasoning.effort and succeeds.

Screenshot and/or share link

Not applicable; the failure is in the provider request payload.

Operating System

macOS

Terminal

Not applicable

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions