fix(opencode): allow none reasoning effort in Bedrock SDK - #46671
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
What does this PR do?
Extend the existing
@ai-sdk/amazon-bedrock@4.0.166dependency patch to acceptnoneinreasoningConfig.maxReasoningEffort.The SDK's effort enum currently rejects
nonebefore making an AWS request, even though GPT-5.6 supports it. Its existing serializer already maps the effort toadditionalModelRequestFields.reasoning.effortfor 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.tsis 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
noneas 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?
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.invalid bedrock provider options; all passed afterward.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.us-east-1passed: all six efforts for global Luna,nonefor global Sol and Terra, andnonefor Mantle Luna. Each returnedOK, 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 typecheckinpackages/opencodeandpackages/core: passed.bun install --frozen-lockfile: passed with the updated patch, without lockfile changes.git diff --check: passed.Checklist