From 321ce94e25a7ed3ef266371c115ac100297c4c3b Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Thu, 28 May 2026 03:54:53 -0700 Subject: [PATCH] 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. --- tests/run_agent/test_run_agent.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/run_agent/test_run_agent.py b/tests/run_agent/test_run_agent.py index 9bc19190f51..927ae9f1cb0 100644 --- a/tests/run_agent/test_run_agent.py +++ b/tests/run_agent/test_run_agent.py @@ -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