diff --git a/tests/tools/test_vision_tools.py b/tests/tools/test_vision_tools.py index 55b653d6fa..806382f649 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: