Repository navigation
feat(integrations): trace openai and litellm decisions API - #927
Conversation
Emit question spans for sync and async Decisions calls using the shared question and answer structure used by TypeSafe. Capture reported token usage, cache writes, confidence, and probability distributions. Materialize iterable inputs and question criteria without mutating caller objects or changing SDK argument validation. Add VCR-backed regression and auto-instrumentation coverage. Closes #921
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. |
Use the decision span type for OpenAI, LiteLLM, and TypeSafe according to the updated instrumentation spec. Keep the legacy question enum for compatibility and update VCR and type-test assertions.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97210fa72a
ℹ️ 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".
| "input": _decisions_input( | ||
| _process_attachments_in_input(params.get("input")), params.get("questions") or [] |
There was a problem hiding this comment.
Convert Decisions image data URLs to attachments
When input contains a multimodal Decisions message, this processor does not recognize the API's {type: "input_image", image_url: "data:..."} shape—the existing helper only handles chat-style image_url.url objects. Consequently, the trace embeds the full base64 string instead of an Attachment, which can create oversized span payloads or fail to upload large image inputs. Normalize Decisions image parts or extend the attachment processor to support the official Decisions image shape.
Useful? React with 👍 / 👎.
OpenAI
client.decisions.create()and LiteLLMdecisions()/adecisions()previously emitted no spans. These calls now emitdecisionspans for sync and async requests, using TypeSafe's{state, questions}input and{answers}output structure.Closes #921