feat(gateway): display model name and context usage in response footer - #16800
Closed
RichardQidian wants to merge 1 commit into
Closed
feat(gateway): display model name and context usage in response footer#16800RichardQidian wants to merge 1 commit into
RichardQidian wants to merge 1 commit into
Conversation
12 tasks
4 tasks
Add automatic context usage footer to non-streaming responses showing: - Model name being used - Current context token count vs total context length - Percentage of context used - Warning when context usage >= 70% suggesting /new This helps users monitor context window usage and know when to start a fresh session. Closes: improves user experience for long-running conversations
RichardQidian
force-pushed
the
feat/context-usage-display
branch
from
May 4, 2026 02:42
ddb15d6 to
e2695dd
Compare
|
+1 — would love to see this merged. Switching models often via gateway (Discord/Telegram) makes it hard to know which model is replying; a per-response footer with the active model is exactly the visibility that is missing today. Context usage % is a great bonus. |
Contributor
|
Thanks for the contribution, @RichardQidian! This feature landed on This is an automated hermes-sweeper review.
Closing as implemented. If you'd like to contribute further (e.g. adjusting the default-on threshold or adding the warning text), feel free to open a new targeted PR against current |
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.
📊 Display Model Name & Context Usage
This PR adds an automatic context usage footer to non-streaming gateway responses, helping users monitor their context window usage in real-time.
What it shows
Every non-streaming response now includes a footer like:
When context usage reaches 70%+, it also shows a warning:
Changes
context_lengthin agent result (previously onlylast_prompt_tokenswas tracked)Why this matters