Repository navigation
Add model and generation time to LLM gist reports - #433
Merged
Merged
Conversation
spalen0
marked this pull request as ready for review
October 21, 2026 16:37
P2: Preserve answering-provider usage, clear stale fallback metadata, and exclude empty stages from gist model labels. Retain the usage guard for failed direct API calls. P3: Remove stale attempt labels and duplicate INFO logs, escape model labels, record elapsed time for empty summaries, and simplify mocks and clock tests. Trim duplicate test coverage. Validation: 291 relevant tests and 21 subtests pass. Repository lint, format, types, hooks, and dependency audit pass; Codex review found no actionable regressions.
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.
Gist reports show the distinct models that produced a summary, revision, passing critique, or detail, plus total LLM generation time including retries and refinement. Empty or failed responses do not add models to the header. Model names are escaped as single-line Markdown text.
Claude CLI labels use the resolved model from response metadata, including aliases such as
opus. Codex labels useLLM_CODEX_MODELwhen set, otherwisecodex-cli, because its JSON event stream does not expose the model.The fallback chain forwards the answering provider's token usage and resets model and usage metadata before each request. One INFO usage line records each stage's model, outcome, token counts, and total generation time, including empty summaries. DEBUG attempt logs identify the provider class before the resolved model is available.
Example header:
Validation:
claude-cli:claude-opus-5-5without a model override.