Repository navigation
Conversation
Pull request dashboard statusWaiting on maintainers · refreshed 2026-10-24 03:45 UTC Merge when ready. Status above doesn't look right?
|
rads-1996
force-pushed
the
openai-base64-embedding-dimensions
branch
from
October 23, 2026 21:40
f35607a to
9615cd4
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The localized fix preserves SDK responses, includes sync and async regression assertions, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Corrects OpenAI embedding dimension telemetry for base64 responses by counting decoded float32 elements rather than encoded characters, while preserving the SDK response.
Changes:
- Decodes base64 embeddings locally to calculate their dimensions.
- Updates shared assertions and sync/async tests to verify dimensions and unchanged response types.
- Adds a changelog entry for the fix.
| File | Description |
|---|---|
| instrumentation/opentelemetry-instrumentation-genai-openai/tests/test_utils.py | Calculates expected dimensions from decoded base64 data. |
| instrumentation/opentelemetry-instrumentation-genai-openai/tests/test_embeddings.py | Checks dimension reporting and preserved string responses for sync calls. |
| instrumentation/opentelemetry-instrumentation-genai-openai/tests/test_async_embeddings.py | Adds equivalent checks for async calls. |
| instrumentation/opentelemetry-instrumentation-genai-openai/src/opentelemetry/instrumentation/genai/openai/patch.py | Counts decoded float32 elements without modifying returned embeddings. |
| instrumentation/opentelemetry-instrumentation-genai-openai/.changelog/981.fixed | Documents the corrected dimension counts. |
Review effort: Balanced
rads-1996
marked this pull request as ready for review
October 23, 2026 22:01
eternalcuriouslearner
approved these changes
Oct 24, 2026
This branch has not been deployed
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.
Description
Fix incorrect OpenAI embedding dimension counts for base64 responses by counting decoded float32 elements instead of encoded characters, without modifying the SDK response.
Updated existing sync and async tests to derive expected dimensions from the returned embeddings.
Type of change
Please delete options that are not relevant.
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. List any relevant details for your test
configuration.
Checklist
See CONTRIBUTING.md
for the style guide, changelog guidance, and more.