Conversation
….openai.gpt-5.6-sol)
_cross_region_check split geo-prefixed IDs on every dot and kept only
the piece after the vendor, so us.openai.gpt-5.6-sol (and its
inference-profile ARN) resolved to model "gpt-5" in the span name and
gen_ai.request.model. The prefix-less branch already uses split(".", 1);
limit the prefixed split to the prefix and vendor the same way.
Co-Authored-By: Claude <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe Bedrock cross-region model ID parser now preserves dots in model names. New tests cover regional IDs, inference-profile ARNs, prefix-less IDs, and undotted model names. ChangesBedrock model ID parsing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change addresses truncated dotted model names while preserving the inspected existing ID forms. No actionable merge risk is evident. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Thanks for maintaining the Bedrock instrumentation and for the ARN / cross-region parsing added in #2785, which this touches. The prefix-less branch of
_cross_region_checkalready splits withsplit(".", 1); this limits the geo-prefixed branch the same way, so a dot inside the model name survives.Fixes #4501
Change (
__init__.py, 1 line):parts = value.split(".")becomesvalue.split(".", 2), which yields exactly prefix, vendor and model.Before / After (real
conversecalls in us-east-1; the ARN, no-prefix andeu.rows come from the unit tests)d13e721)us.openai.gpt-5.6-solgpt-5, spanchat gpt-5gpt-5.6-sol, spanchat gpt-5.6-solus.openai.gpt-5.6-lunagpt-5, spanchat gpt-5gpt-5.6-luna, spanchat gpt-5.6-lunaus.xai.grok-4.6grok-4, spanchat grok-4grok-4.6, spanchat grok-4.6arn:...:inference-profile/us.openai.gpt-5.6-solgpt-5gpt-5.6-solopenai.gpt-5.6-sol(no prefix)gpt-5.6-solus.openai.gpt-6-sol/-luna/-astragpt-6-sol/gpt-6-luna/gpt-6-astraeu.anthropic.claude-3-7-sonnet-..., other IDsThis is two lines below the prefix list my open #4235 extends with
global. On its own #4235 would recordglobal.openai.gpt-5.6-solasgpt-5too. The branches merge without conflict; merged, the suite passes (386) andglobal.openai.gpt-5.6-solresolves togpt-5.6-sol.Tests: new
tests/test_model_id_parsing.py, 4 cases (profile ID, profile ARN, prefix-less ID, undotted IDs).RED / GREEN, full suite, lint
Source reverted, new tests kept:
Restored:
feat(instrumentation): ...orfix(instrumentation): ....Summary by CodeRabbit