feat(bedrock): allow opting out of the model version suffix#109
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBedrock model identifier transformation now conditionally appends model versions, while new unit tests cover defaults, explicit and empty versions, inference profiles, and passthrough identifiers. ChangesBedrock identifier formatting
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
🔒 Container Vulnerability Scan (hub-migrations - amd64)Click to expand results |
Contributor
🔒 Container Vulnerability Scan (hub-migrations - arm64)Click to expand results |
Contributor
🔒 Container Vulnerability Scan (hub - amd64)Click to expand results |
Contributor
🔒 Container Vulnerability Scan (hub - arm64)Click to expand results |
nina-kollman
marked this pull request as ready for review
July 14, 2026 11:08
al-gold
approved these changes
Jul 14, 2026
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.
What
BedrockProvider::transform_model_identifieralways appended a version suffix(defaulting to
-v1:0) when building a model identifier from a plain model ID.Some Bedrock inference profiles have no version suffix, so there was no way to
produce an identifier without one.
This change lets you opt out of the suffix by setting
model_versionto anempty string in the model config:
model_versionmodel_providerinference_profile_idanthropicanthropic.<model>-v1:0v2:0anthropicanthropic.<model>-v2:0""metameta.<model>""metausus.meta.<model>ARNs and existing inference-profile identifiers continue to be passed through
unchanged.
Why
Bedrock inference profiles that carry no version suffix could not be addressed
through the plain-model-ID path.
Tests
Adds
transform_model_identifier_testsinsrc/providers/bedrock/provider.rswith direct unit tests covering the defaultsuffix, an explicit version, the empty-string opt-out (with and without an
inference profile), the profile prefix, and ARN / inference-profile passthrough.
Summary by CodeRabbit
Bug Fixes
Tests