feat(litellm): align embedding instrumentation with pending spec #2238
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.
This PR aligns litellm with the specification changes around embeddings in #2162
Spec changes from 2162
"CreateEmbeddings"
embedding.embeddings.N.embedding.{text|vector}
embedding.invocation_parameters
llm.system
attribute for provider identificationCode improvements:
This is the same as #2210, except litellm.
Note
Aligns LiteLLM embedding spans to the new spec with "CreateEmbeddings" name, structured per-embedding text/vector, invocation parameter capture, provider tagging, and full batch handling.
CreateEmbeddings
; setllm.system
to"litellm"
.embedding.invocation_parameters
(excludeinput
).embedding.embeddings.N.embedding.text
for strings/lists of strings; skip for token IDs.embedding.embeddings.N.embedding.vector
.EmbeddingResponse.data
to set per-index vectors instead of a single JSON string.tests/test_batch_embedding.py
).setup_litellm_instrumentation
fixture.Written by Cursor Bugbot for commit c0c6750. This will update automatically on new commits. Configure here.