From 8b56e956f6772bc2ce64417f23b4617517ac5ccf Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 20 Sep 2026 00:48:11 -0700 Subject: [PATCH] test: fast-lane suite asserts Ollama's native thinking-off shape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Routing a task-level ``reasoning_effort: none`` through the provider profile means the certified Ollama fast lane now sends the profile's own disable shape — top-level ``reasoning_effort="none"`` plus ``think=False`` — instead of forwarding a pass-through ``extra_body.reasoning`` that Ollama's /v1 does not read. The two fast-lane tests encoded the old pass-through; they keep their intent (thinking is off, and only on the certified route) against the native wire. --- tests/agent/test_fast_compression_lane.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/agent/test_fast_compression_lane.py b/tests/agent/test_fast_compression_lane.py index 919142dd5c..6bfc7a48e5 100644 --- a/tests/agent/test_fast_compression_lane.py +++ b/tests/agent/test_fast_compression_lane.py @@ -181,7 +181,11 @@ def test_certified_fast_lane_ignores_legacy_cap_and_preserves_reasoning(): request = client.chat.completions.create.call_args.kwargs assert "max_tokens" not in request - assert request["extra_body"]["reasoning"] == {"enabled": False} + # Task-level ``none`` reaches the wire in the Ollama profile's native disable shape + # (top-level reasoning_effort + think=False), not as a pass-through extra_body.reasoning. + assert request["reasoning_effort"] == "none" + assert request["extra_body"]["think"] is False + assert "reasoning" not in request["extra_body"] def test_uncertified_effective_primary_route_does_not_receive_fast_cap(): @@ -371,11 +375,13 @@ def test_fallback_reasoning_requires_independent_route_certification(): assert "max_tokens" not in uncertified assert "max_completion_tokens" not in uncertified assert "reasoning" not in uncertified.get("extra_body", {}) + assert "think" not in uncertified.get("extra_body", {}) assert "max_tokens" not in certified - assert certified["extra_body"]["reasoning"] == { - "enabled": False, - "effort": "none", - } + # Ollama's native disable shape (top-level reasoning_effort + think=False) replaces the + # pass-through ``extra_body.reasoning`` the certified route used to forward. + assert certified["reasoning_effort"] == "none" + assert certified["extra_body"]["think"] is False + assert "reasoning" not in certified["extra_body"] def test_reasoning_effort_aliases_certify_like_none():