OpenRouter output-cap error parsing and loop guard

NousResearch/hermes-agent · cluster 38652 · agent

Data as of

Nothing open on GitHub. Fix merged in #40589. Check it covers your case.

The short answer

0open issues
0open PRs
8items grouped
Known?
Yes. 8 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #40589. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this unresolved. That is separate from the fix event.
Still open
Nothing open on GitHub.

Addresses a bug where parse_available_output_tokens_from_error() did not recognize the OpenRouter/Nous 'in the output' error format, causing agents to enter an infinite compression or auto-reset loop. Changes add detection of this format and a guard against the resulting infinite loop.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #40589 fix: guard empty streams + parse OpenRouter output-cap errors

    merged to main

    files: agent/chat_completion_helpers.py, agent/model_metadata.py, tests/test_output_cap_parsing.py

6 PRs closed without merging

From the close comments: done elsewhere 5 · superseded by another PR 1

  • #38659 fix: parse OpenRouter/Nous "in the output" error format in parse_available_output_tokens_from_error() · done elsewhere → 1fb99b1
  • #38667 fix(agent): parse OpenRouter/Nous output-cap errors to prevent infinite reset loop · superseded by another PR → #38659, #38667
  • #38689 fix(model_metadata): parse OpenRouter/Nous 'in the output' format in output-cap errors #38652 · done elsewhere → 1fb99b1, #40589, #38652
  • #38726 fix: #38652 - detect OpenRouter/Nous "in the output" format in parse_available_output_tokens_from_error() · done elsewhere → 1fb99b1, #40589
  • #39175 fix(agent): parse OpenRouter/Nous "X in the output" output-cap errors · done elsewhere → 1fb99b1, #40589, #38652
Show 1 more
  • #39957 fix(agent): parse OpenRouter output token errors · done elsewhere → 1fb99b1
Closed issues · 1
  • Closed#38652[Bug]: parse_available_output_tokens_from_error() misses OpenRouter/Nous "in the output" format — causes infinite auto-reset loop
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.25: the share of item 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.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Subsystem
agent
Merged PRs
#40589
Closed issues
1
Attempts
6 PRs closed without merging
Fix link checked
7 Jun 2026

For your agent

The same facts, typed.