Repository navigation
Conversation
Map the Decisions input, questions and answers to gen_ai.input.messages, gen_ai.system_instructions and gen_ai.output.messages when message content capture is enabled. Signed-off-by: Shabab Qaisar <sqaisar@pypestream.com>
sqaisar
force-pushed
the
sqaisar/decisions-genai-content
branch
from
October 13, 2026 07:06
7955bf6 to
a015d31
Compare
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
With
AI_GATEWAY_TRACING_SEMCONV=gen_aiandOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true,/v1/decisionsspans record only operation, model and usage, so any GenAI-convention backend shows the span without input or output. The OpenInference recorder already records both.This maps the Decisions request and response to the standard content attributes, gated by the existing capture setting:
inputtogen_ai.input.messages: a string becomes one user message; user messages keepinput_textas text parts and recordinput_imageas an image part without the payload, matching chat completions.questionstogen_ai.system_instructions, one JSON text part per question. They are the instructions the model evaluates the input against, provided separately from it.answerstogen_ai.output.messages, one assistant message with a JSON text part per answer, since the conventions define no part type for typed decision answers.The tracing doc's list of endpoints with mapped content now includes decisions.
Related Issues/PRs (if applicable)
Related PR: theagentrouter#2819
Special notes for reviewers (if applicable)
Tests cover string, message, image and malformed input, questions, answers, and capture on and off; the endpoint coverage table is updated.
make format spellcheck editorconfig lintpass.