fix(model_metadata): parse OpenRouter/Nous 'in the output' format in output-cap errors #38652 - #38689
Closed
kyssta-exe wants to merge 1 commit into
Closed
fix(model_metadata): parse OpenRouter/Nous 'in the output' format in output-cap errors #38652#38689kyssta-exe wants to merge 1 commit into
kyssta-exe wants to merge 1 commit into
Conversation
…ilable_output_tokens_from_error The function previously only recognized Anthropic's 'available_tokens' format, causing OpenRouter/Nous 'output cap too large' errors to fall through to the input-too-large recovery path. This led to an infinite auto-reset loop when max_tokens exceeded context_length - input_tokens. Now also detects the 'N in the output' format used by OpenRouter and Nous Research providers, enabling proper output-cap recovery. Fixes NousResearch#38652
kyssta-exe
force-pushed
the
auto-fix/issue-38652
branch
from
June 4, 2026 05:50
de33e93 to
4ffef58
Compare
This was referenced Jun 4, 2026
Contributor
|
This has already been fixed on Automated hermes-sweeper review evidence:
The linked issue #38652 was also already closed by a maintainer as fixed on |
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
only recognized Anthropic's keyword, causing it to return for OpenRouter/Nous errors that use the breakdown format. This led to the input-too-large recovery path (compression) being triggered instead of the correct output-cap reduction, resulting in infinite auto-reset loops.
Fix
Add a second detection strategy that:
Example
For the error:
Previously: returned → fell through to compression path → infinite loop
Now: returns (256000 - 5683 - 13410) → retries with
Tests
Closes #38652