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>
✅ Deploy Preview for theagentrouter ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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:NewDecisionsRecordersetsrequestModelandresponseAttrsbut none of the content hooks, so GenAI-convention backends show the span without input or output. The OpenInference recorder already records both for this endpoint.This wires
inputMessages,systemInstructionsandoutputMessagesfor decisions, 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, the same as 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, which is what the attribute describes.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: #2819
Special notes for reviewers (if applicable)
The endpoint coverage table in
coverage_test.gois updated for decisions. Tests cover string, message, image and malformed input, questions, answers, and capture on and off.I used AI assistance while writing this change and have reviewed and tested it.