test: update non-minimax overflow test to match new keep-context behavior
Some checks failed
Docker / shell lint / Lint docker/ shell scripts (shellcheck) (push) Failing after 1s
Docker Build and Publish / build-amd64 (push) Has been skipped
Lint (ruff + ty) / ruff + ty diff (push) Failing after 1s
Lint (ruff + ty) / ruff enforcement (blocking) (push) Failing after 1s
Lint (ruff + ty) / Windows footguns (blocking) (push) Failing after 6s
Nix Lockfile Fix / auto-fix-main (push) Failing after 1s
Nix Lockfile Fix / fix (push) Has been skipped
Nix / nix (ubuntu-latest) (push) Failing after 1s
Build Skills Index / build-index (push) Has been skipped
Tests / test (2) (push) Failing after 1s
Tests / test (3) (push) Failing after 1s
Tests / test (4) (push) Failing after 1s
Deploy Site / deploy-vercel (push) Has been skipped
Deploy Site / deploy-docs (push) Has been skipped
Docker / shell lint / Lint Dockerfile (hadolint) (push) Failing after 1s
Tests / test (1) (push) Failing after 7s
Tests / test (6) (push) Failing after 1s
Tests / test (5) (push) Failing after 1s
Tests / e2e (push) Failing after 1s
uv.lock check / uv lock --check (push) Failing after 1s
Build Skills Index / trigger-deploy (push) Has been skipped
Tests / save-durations (push) Failing after 4s
Docker Build and Publish / build-arm64 (push) Has been cancelled
Nix / nix (macos-latest) (push) Has been cancelled
OSV-Scanner / Scan lockfiles (push) Has been cancelled
Docker Build and Publish / merge (push) Has been cancelled

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