Repository navigation
Conversation
pschaub
force-pushed
the
serve-responses-timings
branch
from
October 19, 2026 23:46
ce43d3c to
bc9c42e
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.
Problem and result
/v1/chat/completions returns top-level
timings(#107), but /v1/responses (#451) does not, although server.py already computes them for every request. Now the finalresponse.completed/response.incompleteevent and the non-streaming reply include the sametimingsobject.Related discussion
Follow-up to #107 (based on #83) for /v1/responses.
Approach
_with_timingsin serve/responses.py copiesdone["timings"]onto the final event;collect()keeps it on the non-streaming reply. Nothing else changes.Validation
Passed:
python -m unittest discover -s serve -t . -p "test_*.py"on this branch (one commit on main e88ee39), Windows 11, Python 3.12: 882 tests OK, 20 skipped. The same command on main e88ee39 without the change: 881 tests OK, 20 skipped.UsageAndStatus.test_responsesfails without the change.Failed:
none observed
Not run:
Limits
response.failedcarries no timings.Created with Claude Opus 5.5. The result was verified by a human (me) in llama-swap: prompt and decode speeds now show for /v1/responses requests.