# NousResearch/hermes-agent · MiniMax streaming token usage gaps and fixes

## Open now

- 2 issues, 0 PRs open on GitHub.
- #8337: Feature Request: Add Token Usage Tracking for MiniMax Provider
- #12023: \[Bug\]: Streaming token accounting silently records 0/0 when provider returns no usage data (MiniMax, others)

These issues and PRs center on missing or null usage data during Anthropic-compatible streaming with MiniMax and similar providers, along with proposed and attempted fallback estimation approaches. A secondary thread involves adding MiniMax-M3 model support and related logging improvements.

## TL;DR

- 11 member(s): 2 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 7 PR(s) closed without merging.
- A fix was merged to main in PR #121554. Verify it addresses your case.
- **Recommended:** read PR #121554 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `partially_resolved` · deciding PR(s): `pr-121554`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.16`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Open related issues

- #8337: Feature Request: Add Token Usage Tracking for MiniMax Provider
- #12023: \[Bug\]: Streaming token accounting silently records 0/0 when provider returns no usage data (MiniMax, others)

## Closed / duplicate issues

- #60683: \[Bug\]: MiniMax Anthropic stream crashes with 'NoneType' object has no attribute 'output_tokens' in get_final_message()

## Prior & competing PRs

- **#12057: fix: fall back to rough token estimates when streaming provider returns no usage (#12023)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#12067`
- **#121554: fix(anthropic): normalize usage:null streams, non-stream fallback on out-of-order SSE, Messages-shaped partial stubs**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/anthropic_adapter.py`, `agent/chat_completion_helpers.py`, `tests/agent/test_anthropic_stream_fallbacks.py`, `tests/agent/test_streaming.py`
- **#12028: fix: token accounting fallback + compression trigger for reasoning models**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#13006`, `#12023`
- **#12067: fix: estimate token usage when streaming providers omit usage data**. closed without merge
  - maintainer direction: category `volume_quota`; implication `active`
- **#12479: fix: add token estimation fallback when streaming usage is missing (#12023)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#12489`, `#12023`
- **#13316: fix(streaming): synthesize usage estimate when provider omits usage chunk (closes #12023)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#12740`, `#12023`
- **#60695: fix(agent): fall back to messages.create on Anthropic stream usage aggregation errors**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `44f6d3bbee`, `#121554`, `#60683`
- **#60700: fix(provider): catch AttributeError on output_tokens in Anthropic stream fallback**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `44f6d3bbee`, `#60683`, `#121554`

## Fix status

- Merged to main in PR #121554 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-24`.
- Subsystem: `agent`
