Skip to content

The agent that grows with you

test(vision): assert vision aux calls carry no max_tokens cap

adikpbec470d9db212
diff --git a/tests/tools/test_vision_tools.py b/tests/tools/test_vision_tools.py
index 55b653d6fac..806382f649d 100644
--- a/tests/tools/test_vision_tools.py
+++ b/tests/tools/test_vision_tools.py
@@ -276,11 +276,22 @@ class TestVisionConfig:
)
assert kwargs["temperature"] == 1.0
assert kwargs["timeout"] == 77.0
+ # No hardcoded output cap — the aux client omits max_tokens so the
+ # provider uses its full output budget (max-tokens-knob policy).
+ assert "max_tokens" not in kwargs
# Omitted values fall back to the built-in defaults.
kwargs = await call_with({"auxiliary": {"vision": {}}})
assert kwargs["temperature"] == 0.1
assert kwargs["timeout"] == 120.0
+ assert "max_tokens" not in kwargs
+
+ # Even an explicit auxiliary.vision.max_tokens config entry must NOT
+ # be forwarded: user-facing max_tokens knobs are policy-prohibited.
+ kwargs = await call_with({"auxiliary": {"vision": {"max_tokens": 8000}}})
+ assert "max_tokens" not in kwargs
+ assert kwargs["temperature"] == 0.1
+ assert kwargs["timeout"] == 120.0
class TestVisionSafetyGuards: