fix(gateway): correct /compact to /compress in context overflow tips - #20163
Closed
zhanggttry wants to merge 3 commits into
Closed
fix(gateway): correct /compact to /compress in context overflow tips#20163zhanggttry wants to merge 3 commits into
zhanggttry wants to merge 3 commits into
Conversation
The gateway error messages for context window overflow incorrectly reference /compact instead of the correct /compress slash command. This affects all platforms since the message is generated in the shared gateway runner. Fixes NousResearch#20020
Collaborator
Contributor
Author
|
Closing as duplicate of #20027 which also adds a regression test and centralizes the guidance string. Thanks @alt-glitch for the pointer. |
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
The gateway error messages for context window overflow incorrectly reference
/compactinstead of the correct/compressslash command.This affects all platforms (not just QQBot) since the error message is generated in the shared
GatewayRunneringateway/run.py.Changes
gateway/run.pyline ~6742:"/compact"→"/compress"in_is_ctx_failerror responsegateway/run.pyline ~7070:"/compact"→"/compress"in status 400/500 error response for large sessionsContext
The registered slash command is
/compress(defined inhermes_cli/commands.py), but the context overflow tips ingateway/run.pyerroneously showed/compact. This confused users on all platforms, as reported in #20020 for QQBot.Note: Slack does have
/compactas a platform-specific alias for/compress, but the gateway error messages should reference the canonical command name.Fixes #20020
Testing
"Use /compact"remain in Python files