Repository navigation
fix(openai): keep the complete chat input and cached and reasoning token counts - #662
Merged
Merged
Conversation
…ken counts - Chat Completions spans record the complete conversation (every message with its role, tool calls and content parts) as the input messages, unless input hiding is on. - input.value joins the text of every message, a conversation with only non-text parts is exported as "[non-text content]" instead of being dropped, and the MIME type describes the exported value. - Cached input tokens and reasoning tokens are recorded, including zero values, for regular and streamed, sync and async chat completions.
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.
What was broken
What changed
input.valuejoins the text of every message. A conversation with only non-text parts is exported as[non-text content], andinput.mime_typedescribes the value actually exported.Verification
Paired run against dev on a clean, offline sandbox:
Compatibility
No dependency, version or Python range change. Only
python/frameworks/openaichanges.