Skip to content

fix(opencode): allow none reasoning effort in Bedrock SDK - #46671

Merged
rekram1-node merged 2 commits into
devfrom
bedrock-none-effort
Sep 1, 2026
Merged

fix(opencode): allow none reasoning effort in Bedrock SDK#46671
rekram1-node merged 2 commits into
devfrom
bedrock-none-effort

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Extend the existing @ai-sdk/amazon-bedrock@4.0.166 dependency patch to accept none in reasoningConfig.maxReasoningEffort.

The SDK's effort enum currently rejects none before making an AWS request, even though GPT-5.6 supports it. Its existing serializer already maps the effort to additionalModelRequestFields.reasoning.effort for GPT models. Add the missing enum value in both ESM and CommonJS runtime bundles and their TypeScript declarations; no serializer changes are needed.

The previous OpenCode transform workaround is removed. src/provider/transform.ts is identical to the PR base. Preserve the existing Anthropic block-binding patch; leave variant generation, defaults, summary settings, Mantle, and configuration merging unchanged. No package-version, lockfile, or catalog changes. As with the SDK's other effort values, adding a value to its shared schema does not assert that every Bedrock model supports it.

AWS documents none as a supported GPT-5.6 effort, so removing it from models.dev would incorrectly narrow the model's capabilities: https://aws.amazon.com/blogs/machine-learning/get-started-with-openai-gpt-5-6-sol-terra-and-luna-on-amazon-bedrock/

How did you verify your code works?

  • One parameterized regression in the existing transform test file checks the unchanged maxReasoningEffort: "none" variant against the SDK's public TypeScript type and exercises actual SDK request serialization for global Luna, Sol, and Terra. It also checks the other five variant mappings remain unchanged.
  • With the transform workaround removed, all three regression cases failed before the SDK patch with invalid bedrock provider options; all passed afterward.
  • Separate ESM and CommonJS probes confirmed the existing serializer emits additionalModelRequestFields.reasoning.effort: "none".
  • bun test test/provider --timeout 30000 --only-failures: 589 passed, 0 failed.
  • packages/core: bun test test/plugin --timeout 30000 --only-failures: 227 passed, 0 failed.
  • Nine live source-CLI checks in us-east-1 passed: all six efforts for global Luna, none for global Sol and Terra, and none for Mantle Luna. Each returned OK, completed normally, and emitted no error events. Checks used isolated configuration/data and disabled tools; the temporary live harness is not part of the PR.
  • bun typecheck in packages/opencode and packages/core: passed.
  • bun install --frozen-lockfile: passed with the updated patch, without lockfile changes.
  • Prettier and git diff --check: passed.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@rekram1-node rekram1-node changed the title fix(opencode): support none effort for Bedrock GPT-5.6 variants fix(opencode): allow none reasoning effort in Bedrock SDK Sep 1, 2026
@rekram1-node
rekram1-node merged commit 1542195 into dev Sep 1, 2026
6 checks passed
@rekram1-node
rekram1-node deleted the bedrock-none-effort branch September 1, 2026 19:57
filipeforattini added a commit to reddb-io/redcode that referenced this pull request Sep 5, 2026
filipeforattini added a commit to reddb-io/redcode that referenced this pull request Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant