From 2507af2194285cde24751be0001b5826fc2e43f9 Mon Sep 17 00:00:00 2001 From: cucurigoo <241698038+cucurigoo@users.noreply.github.com> Date: Wed, 22 Jul 2026 00:42:04 +0000 Subject: [PATCH] test(providers): cover query path slash identity --- tests/run_agent/test_switch_model_context.py | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/run_agent/test_switch_model_context.py b/tests/run_agent/test_switch_model_context.py index c2021161281..9f9a435b5e6 100644 --- a/tests/run_agent/test_switch_model_context.py +++ b/tests/run_agent/test_switch_model_context.py @@ -452,6 +452,27 @@ def test_direct_start_drops_context_when_empty_query_delimiter_changes(): assert agent.context_compressor.config_context_length is None +def test_direct_start_drops_context_when_query_path_slash_changes(): + """A path slash before a query remains part of the effective SDK route.""" + cfg = { + "model": { + "default": "shared-model", + "provider": "custom", + "base_url": "https://example.com/v1/?tenant=large", + "context_length": 1_048_576, + } + } + + agent = _make_direct_start_agent( + cfg, + model="shared-model", + provider="custom", + base_url="https://example.com/v1?tenant=large", + ) + + assert agent.context_compressor.config_context_length is None + + def test_direct_start_drops_context_when_active_query_changes(): """Query parameters remain part of the effective route identity.""" cfg = {