mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-30 06:41:51 +00:00
test: update non-minimax overflow test to match new keep-context behavior
The old test asserted that a non-MiniMax provider returning a generic overflow (no provider-reported max) would step down to the 128K probe tier. The salvaged fix from #33673 deliberately removes that step-down because guessed tiers cause configured 1M sessions to silently shrink. Update the test to assert the new contract: keep the configured 200K window and rely on compression instead.
This commit is contained in:
parent
c5e496e1c0
commit
321ce94e25
1 changed files with 9 additions and 3 deletions
|
|
@ -3295,8 +3295,13 @@ class TestRunConversation:
|
|||
assert result["final_response"] == "Recovered after compression"
|
||||
assert result["completed"] is True
|
||||
|
||||
def test_non_minimax_delta_overflow_still_probes_down(self, agent):
|
||||
"""Non-MiniMax providers should keep the generic probe-down behavior."""
|
||||
def test_non_minimax_overflow_without_provider_limit_keeps_context(self, agent):
|
||||
"""Generic overflow without a provider-reported max must NOT probe-step down.
|
||||
|
||||
Previously a 200K configured window would silently drop to the 128K probe
|
||||
tier on a generic overflow error. Now we keep the configured window and
|
||||
rely on compression — see #33669 / PR #33826.
|
||||
"""
|
||||
self._setup_agent(agent)
|
||||
agent.provider = "openrouter"
|
||||
agent.model = "some/unknown-model"
|
||||
|
|
@ -3330,7 +3335,8 @@ class TestRunConversation:
|
|||
result = agent.run_conversation("hello", conversation_history=prefill)
|
||||
|
||||
mock_compress.assert_called_once()
|
||||
assert agent.context_compressor.context_length == 128_000
|
||||
# Context length preserved — no guessed probe-tier step-down.
|
||||
assert agent.context_compressor.context_length == 200_000
|
||||
assert result["final_response"] == "Recovered after compression"
|
||||
assert result["completed"] is True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue