mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-11 13:41:53 +00:00
The status-bar cost segment must show cost ONLY when running against the Nous portal — per-model cache/input/output pricing is unreliable across the model long tail, so a guessed figure is worse than none. - New nous_header_cost_usd(agent): the chrome cost source, derived ONLY from the x-nous-credits-* header delta (deliberately ignores the OpenRouter usage.cost accumulator). _get_usage now uses it for cost_usd, so a non-Nous session reports no cost and the TUI hides the segment. - The /usage accounting page is unchanged in spirit: it now reads real_session_cost_usd(agent) directly (both provider-reported sources) instead of the chrome-narrowed _get_usage cost_usd, so OpenRouter cost still shows there. Tests: new TestNousHeaderCost (header-only, OR-accumulator ignored, clamp, no-method); updated gateway _get_usage tests for the chrome narrowing; /usage page test still asserts the full provider-reported figure. 316 gateway + 25 cost tests green. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| entry.py | ||
| event_publisher.py | ||
| render.py | ||
| server.py | ||
| slash_worker.py | ||
| transport.py | ||
| ws.py | ||