Skip to content

feat(integrations): trace openai and litellm decisions API - #927

Merged
Abhijeet Prasad (AbhiPrasad) merged 3 commits into
mainfrom
abhi/trace-decisions-api-18f4e522
Oct 14, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 3 commits into
mainfrom
abhi/trace-decisions-api-18f4e522

Conversation

@AbhiPrasad

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

OpenAI client.decisions.create() and LiteLLM decisions() / adecisions() previously emitted no spans. These calls now emit decision spans for sync and async requests, using TypeSafe's {state, questions} input and {answers} output structure.

Closes #921

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T19:58:47.679217Z 45b39c2 New commits
ℹ️ About Codex in GitHub

Your 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +2169 to +2170
"input": _decisions_input(
_process_attachments_in_input(params.get("input")), params.get("questions") or []

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) changed the title feat(integrations): trace openai and litellm decisions feat(integrations): trace openai and litellm decisions API Oct 13, 2026
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit def8293 into main Oct 14, 2026
98 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the abhi/trace-decisions-api-18f4e522 branch October 14, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI + LiteLLM: trace new decisions API

2 participants