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:
teknium1 2026-05-28 03:54:53 -07:00 committed by Teknium
parent c5e496e1c0
commit 321ce94e25

View file

@ -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