Repository navigation
fix(platform): keep tool time out of the message info model phases - #4923
Merged
Merged
Conversation
Refs #4493. Closes the findings of the post-merge review #4493 (review) The timing anchors are turn-wide: the first round that wrote text sets the first-token stamp, so a reply that called a tool first drew the whole span up to its answer, the tool's run included, as "Waiting for the model" (or "Thinking" after a reasoning round), and the output speed window held the tools too. - A reply whose parts hold a tool call or result now draws one "Model and tools" phase after preparing, then writing only when the answer's first text came after the last tool, and shows no output speed: its output count sums every round and no anchor bounds the answer round. - Docs (en/de/fr): the time to first token is the time to the answer's first words, and it includes tool time on a reply that used tools. - sameServing compares the endpoint's host and region, as sameServedBy does, and sameUsage the setup and first-reasoning anchors the phase bar draws.
Refs #4493. Repairs the independent review of #4498 at 938a6c4 (#4498 (comment)). Code unchanged. - docs/{en,de,fr}/platform/chat/basics.md: the time to first token includes the time of any tool that ran before the first words, and the bar shows writing only when the first words came after the last tool. A lead-in before a tool call puts no tool time in the first-token time and leaves no writing phase. - CHAT-F13: on a reply that ran a tool, Output speed is absent and the legend shows Model and tools with no waiting or thinking phase.
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
A reply that called a tool before it answered showed the tool's running time as model time in the message info dialog: the phase bar labelled everything up to the answer "Waiting for the model" (or "Thinking" after a reasoning round), and the output-speed window included the tools too. The dialog's memo equality also skipped fields it renders (the endpoint's host and region, and the two phase-bar inputs
setupMsandtimeToFirstReasoningMs), so it could stay stale.Change
replyPhases(usage, parts)andoutputTokensPerSecond(usage, parts)read the reply's parts. A reply that ran tools shows Preparing, then a new Model and tools phase (messageInfo.phases.tools, en/de/fr), then Writing only when the answer's first text came after the last tool. Such a reply shows no output speed: its token count spans every round.sameServingcompares host and region;sameUsagealso comparessetupMsandtimeToFirstReasoningMs.docs/{en,de,fr}/platform/chat/basics.mdand manual box CHAT-F13 state the new behaviour.Follow-up to #4493. Supersedes #4498: that PR was closed on 2026-10-07 after an independent review accepted it (findings 1 and 2 closed) while its CI was red on a hosted-runner apt timeout, and GitHub cannot reopen it now that its head is rebased. Same two commits, rebased onto current main, plus a comment-only cleanup of two test comments.
Verification
message-timing,message-equalityandmessage-info-dialogsources swapped in, 8 of the 37 tests in the three touched test files fail; with the change all 37 pass.app/features/chatunder the UI config: 49 files, 643 tests.lib/i18n(server project): 11 files, 618 tests.services/docs: 37 files, 708 tests.tsc --noEmit,oxlint --type-aware,oxfmt --check,lint:conflicts,lint:manual,lint:links: clean.Follow-ups (not in this PR)
FournisseurorFournisseur IAis a glossary decision, left to a glossary owner.