mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(agent): preserve MiniMax context length on delta-only overflow
This commit is contained in:
parent
a884f6d5d8
commit
e020f46bec
3 changed files with 109 additions and 1 deletions
|
|
@ -621,6 +621,10 @@ class TestParseContextLimitFromError:
|
|||
msg = "Error: context window of 4096 tokens exceeded"
|
||||
assert parse_context_limit_from_error(msg) == 4096
|
||||
|
||||
def test_minimax_delta_only_message_returns_none(self):
|
||||
msg = "invalid params, context window exceeds limit (2013)"
|
||||
assert parse_context_limit_from_error(msg) is None
|
||||
|
||||
def test_completely_unrelated_error(self):
|
||||
assert parse_context_limit_from_error("Invalid API key") is None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue