Repository navigation
feat(coderd/x/chatd/chatloop): emit stream and time_to_first_token stages - #28970
Closed
jscottmiller wants to merge 1 commit into
Closed
jscottmiller wants to merge 1 commit into
jscottmiller wants to merge 1 commit into
Conversation
This was referenced Sep 4, 2026
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 9, 2026 23:19
77d9e3c to
54d3777
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 11, 2026 02:25
54d3777 to
3e6c03c
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 11, 2026 19:17
3e6c03c to
bf4b80a
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 14, 2026 20:16
bf4b80a to
4e8f3fe
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 14, 2026 22:06
4e8f3fe to
1dc7e9f
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 15, 2026 21:39
1dc7e9f to
8f27c5b
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 16, 2026 03:12
8f27c5b to
6d35660
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
2 times, most recently
from
September 17, 2026 20:31
264c6b9 to
063a17b
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 17, 2026 21:26
063a17b to
53ce37f
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 21, 2026 00:09
53ce37f to
af1f4de
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 21, 2026 22:52
af1f4de to
6b14918
Compare
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 23, 2026 01:37
6b14918 to
5553212
Compare
…ages GenerateAssistant takes a StageTracer and StageModel and opens a stream stage around the guarded model stream. guardedStream opens a time_to_first_token stage that finishTTFT closes exactly once, on the first streamed part or when the attempt is released without one; only windows a part closed feed the TTFT and stage histograms. The attempt is released before the stream stage ends so the TTFT window always falls inside the stream that contains it.
jscottmiller
force-pushed
the
scott/chatd-stages/3-stream-stages
branch
from
September 23, 2026 02:14
5553212 to
a03d6df
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.
Superseded by #29770. Closed in favor of the reduced stack #29773.
GenerateAssistantrecords astreamstage from stream open to close and a nestedtime_to_first_tokenstage.finishTTFTcloses the TTFT window exactly once: the first content part closes it as a success and observes both the stage histogram and the pre-existingcoderd_chatd_ttft_seconds; a failed stream open or an error part ends the span with that error and observes nothing, so both histograms stay success-only; a window released without any part ends witherrNoFirstToken. The attempt is released before the stream span ends, so the TTFT window always falls inside its stream.Callers pass a
Stagestracer and aStageModelthroughGenerateAssistantOptions; a nil tracer discards.🤖 This PR was generated by Coder Agents on behalf of @jscottmiller.