Fix Groq TPM limits misidentified as context overflow - #16176
Merged
vincentkoc merged 2 commits intoFeb 23, 2026
Merged
Conversation
thewilloftheshadow
force-pushed
the
main
branch
from
February 15, 2026 18:46
bfc1ccb to
f92900f
Compare
This was referenced Feb 23, 2026
vincentkoc
added a commit
that referenced
this pull request
Feb 23, 2026
carlosrivera
pushed a commit
to myascendai/meshiclaw
that referenced
this pull request
Feb 23, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
carlosrivera
pushed a commit
to myascendai/meshiclaw
that referenced
this pull request
Feb 23, 2026
mreedr
pushed a commit
to mreedr/openclaw-custom
that referenced
this pull request
Feb 24, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
mreedr
pushed a commit
to mreedr/openclaw-custom
that referenced
this pull request
Feb 24, 2026
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
2 tasks
mylukin
pushed a commit
to mylukin/openclaw
that referenced
this pull request
Feb 26, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
mylukin
pushed a commit
to mylukin/openclaw
that referenced
this pull request
Feb 26, 2026
desertstackdev
pushed a commit
to desertstackdev/openclaw
that referenced
this pull request
Feb 28, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
desertstackdev
pushed a commit
to desertstackdev/openclaw
that referenced
this pull request
Feb 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…text overflow (openclaw#16176) Co-authored-by: Howard <dddabtc@users.noreply.github.com>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
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.
Groq uses HTTP 413 for TPM (tokens per minute) limit errors. These were being incorrectly identified as context window overflows, causing OpenClaw to try resetting the session in an infinite loop. This fix excludes errors containing 'tpm' or 'tokens per minute' from being identified as context overflows and correctly classifies them as rate limits.
Greptile Summary
Fixed Groq TPM (tokens per minute) rate limit errors being misidentified as context overflow errors. Groq returns HTTP 413 with "too large" messages for rate limits, which was matching the context overflow pattern
(lower.includes("413") && lower.includes("too large"))inisContextOverflowError(). This caused infinite retry loops as OpenClaw attempted to reset sessions for what it thought were context overflows. The fix adds early exclusion checks for "tpm" and "tokens per minute" strings in bothisContextOverflowError()andisLikelyContextOverflowError(), and adds these patterns to the rate limit classifier.ERROR_PATTERNS.rateLimitConfidence Score: 5/5
Last reviewed commit: fd20686
(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!