Skip to content

🐛 Bug Report: Bedrock profile IDs with a dot in the model name (us.openai.gpt-5.6-sol) are recorded as model 'gpt-5' #4501

Description

@kimnamu

Thanks for keeping _get_vendor_model in step with Bedrock's inference profile formats (#2785); this is one more ID shape it now sees.

Which component is this bug for?

Bedrock Instrumentation

📜 Description

_cross_region_check (__init__.py) splits geo-prefixed IDs with value.split(".") and keeps the piece after the vendor, so a dotted model name is cut. us.openai.gpt-5.6-sol (and its profile ARN) resolves to model gpt-5 in the span name and gen_ai.request.model. The prefix-less branch uses split(".", 1) and is correct.

Found while checking GPT-6 on Bedrock: Sol, Luna and Astra model names have no dot; GPT-5.6 and us.xai.grok-4.6 do.

👟 Reproduction steps

from opentelemetry.instrumentation.bedrock import _get_vendor_model
_get_vendor_model("us.openai.gpt-5.6-sol")
_get_vendor_model("arn:aws:bedrock:us-east-1:111122223333:inference-profile/us.openai.gpt-5.6-sol")

👍 Expected behavior

('aws.bedrock', 'openai', 'gpt-5.6-sol'), the same as for the prefix-less openai.gpt-5.6-sol.

👎 Actual Behavior with Screenshots

Main d13e721, with real converse calls in us-east-1:

_get_vendor_model('us.openai.gpt-5.6-sol') -> ('aws.bedrock', 'openai', 'gpt-5')
_get_vendor_model('openai.gpt-5.6-sol') -> ('aws.bedrock', 'openai', 'gpt-5.6-sol')
_get_vendor_model('us.openai.gpt-6-astra') -> ('aws.bedrock', 'openai', 'gpt-6-astra')
[converse us.openai.gpt-5.6-sol] span='chat gpt-5' gen_ai.request.model='gpt-5'
[converse us.openai.gpt-5.6-luna] span='chat gpt-5' gen_ai.request.model='gpt-5'
[converse us.xai.grok-4.6] span='chat grok-4' gen_ai.request.model='grok-4'
Model ID Model recorded today Expected
us.openai.gpt-5.6-sol ❌ gpt-5 gpt-5.6-sol
us.openai.gpt-5.6-luna ❌ gpt-5 gpt-5.6-luna
us.xai.grok-4.6 ❌ grok-4 grok-4.6
arn:...:inference-profile/us.openai.gpt-5.6-sol ❌ gpt-5 gpt-5.6-sol
openai.gpt-5.6-sol ✅ gpt-5.6-sol same
us.openai.gpt-6-sol / -luna / -astra, eu.anthropic.claude-... ✅ correct same

🤖 Python Version

3.12

📃 Provide any additional context for the Bug.

Proposed fix: value.split(".", 2) in the prefixed branch; PR with tests to follow. My open #4235 (adds global two lines above) needs it too: alone it turns global.openai.gpt-5.6-sol into gpt-5, merged with this fix (clean, 386 tests pass) it gives gpt-5.6-sol.

After the proposed change
_get_vendor_model('us.openai.gpt-5.6-sol') -> ('aws.bedrock', 'openai', 'gpt-5.6-sol')
[converse us.openai.gpt-5.6-sol] span='chat gpt-5.6-sol' gen_ai.request.model='gpt-5.6-sol'
[converse us.openai.gpt-5.6-luna] span='chat gpt-5.6-luna' gen_ai.request.model='gpt-5.6-luna'
[converse us.xai.grok-4.6] span='chat grok-4.6' gen_ai.request.model='grok-4.6'
[converse us.openai.gpt-6-sol] span='chat gpt-6-sol' gen_ai.request.model='gpt-6-sol'
[converse us.openai.gpt-6-luna] span='chat gpt-6-luna' gen_ai.request.model='gpt-6-luna'
[converse us.openai.gpt-6-astra] span='chat gpt-6-astra' gen_ai.request.model='gpt-6-astra'

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

Searching open and closed issues/PRs for gpt-5.6, grok, _cross_region_check and inference profile finds nothing on this; the closest are my #4234 / #4235 (global. prefix).

Are you willing to submit PR?

Yes I am willing to submit a PR!

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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