From f35e89777bda03656c0e63be422696ec79f951b6 Mon Sep 17 00:00:00 2001 From: jenkins Date: Sun, 16 Aug 2026 07:31:16 -0300 Subject: [PATCH] test: cover Switchyard image enum --- testing/tests/test_hermes_chat_quality.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/testing/tests/test_hermes_chat_quality.py b/testing/tests/test_hermes_chat_quality.py index 696926f9..01cd33ea 100644 --- a/testing/tests/test_hermes_chat_quality.py +++ b/testing/tests/test_hermes_chat_quality.py @@ -824,25 +824,28 @@ def test_codex_broker_auth_and_request_contract(tmp_path: Path, monkeypatch): "type": "input_image", "image_url": "data:image/png;base64,cHJpdmF0ZQ==", } - nested_switchyard_items = [ + switchyard_enum_items = [ { "role": "user", "content": [ { "type": "input_image", "image_url": { - "image": { - "original_url": "data:image/png;base64,cHJpdmF0ZQ==" - } + "type": "url", + "data": { + "url": "data:image/png;base64,cHJpdmF0ZQ==", + "detail": "high", + }, }, } ], } ] nested_image = module._validate_payload( - {"model": "gpt-5.6-terra", "input": nested_switchyard_items} + {"model": "gpt-5.6-terra", "input": switchyard_enum_items} )["input"][0]["content"][0] assert nested_image["image_url"] == "data:image/png;base64,cHJpdmF0ZQ==" + assert nested_image["detail"] == "high" with pytest.raises(ValueError, match=r"non-empty Responses image URL.*str\[4\]"): module._validate_payload( {