Add reasoning effort to turn tracing spans#20060
Merged
Merged
Conversation
3b4b4e3 to
5add64f
Compare
646293f to
99b39b6
Compare
jif-oai
reviewed
Apr 29, 2026
99b39b6 to
b7ae9f4
Compare
b7ae9f4 to
8ed4c78
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
#19432 added token usage to the turn and response spans. This follow-up adds the configured reasoning effort so performance traces can be filtered by model effort.
example trace

What Changed
codex.turn.reasoning_effortto the turn span.codex.request.reasoning_efforttohandle_responses.higheffort with token usage.Testing
cargo test -p codex-core turn_and_completed_response_spans_record_token_usagecargo test -p codex-oteljust fmtjust fix -p codex-corejust fix -p codex-otel