Repository navigation
fix(integrations): log DSPy and LiteLLM images as attachments - #935
Conversation
Convert inline images before span serialization and preserve provider inputs. Consolidate VCR coverage across supported versions and remove redundant tests and unused cassettes. Fixes SDK-551.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4654e618b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
Materialize RootModel roots directly and use converted raw fields for list/scalar model serializers, respecting field exclusions. Extend the image VCR regression while reusing existing provider recordings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc711ab4b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
Materialize only the serialized representation of Pydantic models. Decode DSPy image prompt strings after serialization so redacted fields remain omitted and custom list, scalar, and mapping schemas are preserved. Extend the existing VCR regression to cover redactions and reshaping.
DSPy and LiteLLM currently send inline image bytes, which is bad!
Convert DSPy
Imagevalues (including nested Pydantic fields and RootModel roots) and image data URIs to SDK attachments before logging, while preserving provider requests, unrelated field serializers, and excluded fields. DSPy materializes images after Pydantic serialization, preserving model/field serializer redactions and list, scalar, or mapping output shapes. LiteLLM reuses the existing OpenAI input attachment conversion.Fixes https://linear.app/braintrustdata/issue/SDK-551/python-sdk-dspy-and-litellm-integrations-log-images-inline-not-as