fix: include final reasoning in run events - #60664
Closed
itsflownium wants to merge 1 commit into
Closed
Conversation
Contributor
|
Thanks — the premise checks out (provider-native final reasoning from Closing this iteration on payload-shape grounds rather than direction:
A follow-up that caps/deduplicates (e.g. full reasoning in ONE place — probably |
This was referenced Aug 3, 2026
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.
Summary
reasoning.availableevent sourced from the completed result when richer reasoning exists.run.completedand pollable run status.Problem
The live
/v1/runs/{run_id}/eventsstream only forwarded reasoning progress callback previews. Those previews could be empty or answer-like, while the final session messages preserved richerreasoning,reasoning_content, andreasoning_details, so clients rendered different reasoning before and after refresh.Validation
pytest -q tests/gateway/test_api_server_runs.py::TestRunEvents::test_events_stream_returns_completed tests/gateway/test_api_server_runs.py::TestRunEvents::test_events_stream_exposes_final_reasoning_payloadpytest -q tests/gateway/test_api_server_runs.pypython -m py_compile gateway/platforms/api_server.py tests/gateway/test_api_server_runs.pypython -m ruff check gateway/platforms/api_server.py tests/gateway/test_api_server_runs.pyFixes #60634