fix(insights): hide cache read/write and cost metrics from display#11477
Merged
Conversation
The cache-read, cache-write, and total estimated-cost values shown in /insights (and the per-model Cost column) were unreliable. Hide them from both terminal and gateway renderings. The underlying data pipeline is untouched — sessions still store cache_read_tokens, cache_write_tokens, and estimated_cost_usd; the web server, /usage command, and status bar are unaffected. Only the InsightsEngine display layer is trimmed. Changes: - format_terminal: drop 'Cache read / Cache write' line, drop 'Est. cost' from the Total tokens row, drop per-model 'Cost' column, drop the '* Cost N/A for custom/self-hosted' footnote. - format_gateway: drop cache breakdown from Tokens line, drop 'Est. cost' line, drop per-model cost suffix. - Tests updated to assert these strings are now absent.
francip
added a commit
to kortexa-ai/hermes-agent
that referenced
this pull request
Apr 20, 2026
- test_insights.TestGatewayFormatting.test_gateway_format_hides_cost: PR NousResearch#11477 hid cost/cache from format_gateway but only updated the terminal-formatting test. The gateway test was renamed (``hides_cost``) but its assertions still required ``$`` and ``Est. cost`` to be present. Flip them to match the new behavior. - test_config.TestCustomProviderCompatibility: PR NousResearch#9332 re-ordered the provider URL-field priority to ``base_url > url > api`` (was api first). Rename to ``_prefers_base_url_then_url_then_api`` and flip the expected URL. - test_browser_camofox_state.test_config_version_matches_current_schema: ``DEFAULT_CONFIG["_config_version"]`` was bumped 20 → 21 (as the test's own comment anticipates). Bump the expected value. - test_interrupt_propagation._make_bare_agent: bare agents constructed via ``__new__`` were missing attrs now read by ``_compute_stale_timeout`` → ``_interruptible_api_call``. Add ``provider``, ``model``, ``_base_url``, ``_base_url_lower``.
Scorpion1221
pushed a commit
to Scorpion1221/hermes-agent
that referenced
this pull request
Apr 24, 2026
* merge-upstream-2026-04-17: (243 commits) fix(feishu): reduce CardKit streaming frequency and add backoff on errors fix(feishu): refine CardKit streaming card polish fix(feishu): prevent double finalize and add loading spinner icon fix(feishu): fix /stop regression and streaming card finalization feat(feishu): add CardKit streaming card output feat(feishu): split inbound policy and comment flow fix(feishu): fetch merge-forward submessages eagerly feat(feishu): add drive comment routing feat(feishu): add sender cache and rollout sync fix(feishu): hide opaque sender ids in merge forwards fix(feishu): prefer embedded sender names feat(feishu): add inbound bridge and media index refactor(feishu): extract inbound parse module feat(feishu): preserve merge-forward media context feat(feishu): hydrate quoted merge forwards fix(gateway): persist canonical quoted context feat(feishu): add inbound quoted context pipeline fix(feishu): render outbound messages as Card 2.0 for full markdown support test: remove 169 change-detector tests across 21 files (NousResearch#11472) fix(insights): hide cache read/write and cost metrics from display (NousResearch#11477) ...
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…ousResearch#11477) The cache-read, cache-write, and total estimated-cost values shown in /insights (and the per-model Cost column) were unreliable. Hide them from both terminal and gateway renderings. The underlying data pipeline is untouched — sessions still store cache_read_tokens, cache_write_tokens, and estimated_cost_usd; the web server, /usage command, and status bar are unaffected. Only the InsightsEngine display layer is trimmed. Changes: - format_terminal: drop 'Cache read / Cache write' line, drop 'Est. cost' from the Total tokens row, drop per-model 'Cost' column, drop the '* Cost N/A for custom/self-hosted' footnote. - format_gateway: drop cache breakdown from Tokens line, drop 'Est. cost' line, drop per-model cost suffix. - Tests updated to assert these strings are now absent.
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…ousResearch#11477) The cache-read, cache-write, and total estimated-cost values shown in /insights (and the per-model Cost column) were unreliable. Hide them from both terminal and gateway renderings. The underlying data pipeline is untouched — sessions still store cache_read_tokens, cache_write_tokens, and estimated_cost_usd; the web server, /usage command, and status bar are unaffected. Only the InsightsEngine display layer is trimmed. Changes: - format_terminal: drop 'Cache read / Cache write' line, drop 'Est. cost' from the Total tokens row, drop per-model 'Cost' column, drop the '* Cost N/A for custom/self-hosted' footnote. - format_gateway: drop cache breakdown from Tokens line, drop 'Est. cost' line, drop per-model cost suffix. - Tests updated to assert these strings are now absent.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…ousResearch#11477) The cache-read, cache-write, and total estimated-cost values shown in /insights (and the per-model Cost column) were unreliable. Hide them from both terminal and gateway renderings. The underlying data pipeline is untouched — sessions still store cache_read_tokens, cache_write_tokens, and estimated_cost_usd; the web server, /usage command, and status bar are unaffected. Only the InsightsEngine display layer is trimmed. Changes: - format_terminal: drop 'Cache read / Cache write' line, drop 'Est. cost' from the Total tokens row, drop per-model 'Cost' column, drop the '* Cost N/A for custom/self-hosted' footnote. - format_gateway: drop cache breakdown from Tokens line, drop 'Est. cost' line, drop per-model cost suffix. - Tests updated to assert these strings are now absent.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…ousResearch#11477) The cache-read, cache-write, and total estimated-cost values shown in /insights (and the per-model Cost column) were unreliable. Hide them from both terminal and gateway renderings. The underlying data pipeline is untouched — sessions still store cache_read_tokens, cache_write_tokens, and estimated_cost_usd; the web server, /usage command, and status bar are unaffected. Only the InsightsEngine display layer is trimmed. Changes: - format_terminal: drop 'Cache read / Cache write' line, drop 'Est. cost' from the Total tokens row, drop per-model 'Cost' column, drop the '* Cost N/A for custom/self-hosted' footnote. - format_gateway: drop cache breakdown from Tokens line, drop 'Est. cost' line, drop per-model cost suffix. - Tests updated to assert these strings are now absent.
19 tasks
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…ousResearch#11477) The cache-read, cache-write, and total estimated-cost values shown in /insights (and the per-model Cost column) were unreliable. Hide them from both terminal and gateway renderings. The underlying data pipeline is untouched — sessions still store cache_read_tokens, cache_write_tokens, and estimated_cost_usd; the web server, /usage command, and status bar are unaffected. Only the InsightsEngine display layer is trimmed. Changes: - format_terminal: drop 'Cache read / Cache write' line, drop 'Est. cost' from the Total tokens row, drop per-model 'Cost' column, drop the '* Cost N/A for custom/self-hosted' footnote. - format_gateway: drop cache breakdown from Tokens line, drop 'Est. cost' line, drop per-model cost suffix. - Tests updated to assert these strings are now absent.
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.
Summary
The
/insightsoutput was showing three metrics that were unreliable:This PR hides all of them from the display layer only. The underlying data
is preserved —
cache_read_tokens,cache_write_tokens, andestimated_cost_usdcontinue to be stored per-session, and other surfacesthat read those fields (web server dashboard,
/usagecommand, status bar,state DB) are untouched.
Changes
agent/insights.py:format_terminal: drop theCache read / Cache writerow, dropEst. costfrom the
Total tokensline, drop the per-modelCostcolumn, drop the* Cost N/A for custom/self-hostedfootnote.format_gateway: drop the cache-token breakdown from the Tokens line, dropthe
Est. costline, drop the per-model cost suffix.tests/agent/test_insights.py:not in, renamed accordingly(
test_terminal_format_hides_cost_for_custom_models,test_gateway_format_hides_cost).Test plan
pytest tests/agent/test_insights.py— 54/54 passCache read, noCache write, no$, noEst. cost, noCostcolumnappear in either terminal or gateway output. Tokens / models / platforms /
activity sections all still render.