From 8fb6fee8c503e9927869ef75bca3613add3c62dd Mon Sep 17 00:00:00 2001 From: Mateo Wang <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 15 Oct 2026 09:07:36 -0700 Subject: [PATCH] test(integration): expect signed empty thinking blocks to survive /v1/messages replay after #41362 (#46686) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- ...nthropic_reasoning_request_translation_wire.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/integration/messages_endpoint/providers/anthropic/reasoning/test_anthropic_reasoning_request_translation_wire.py b/tests/integration/messages_endpoint/providers/anthropic/reasoning/test_anthropic_reasoning_request_translation_wire.py index 4fc99e2dd67..99b03b0d820 100644 --- a/tests/integration/messages_endpoint/providers/anthropic/reasoning/test_anthropic_reasoning_request_translation_wire.py +++ b/tests/integration/messages_endpoint/providers/anthropic/reasoning/test_anthropic_reasoning_request_translation_wire.py @@ -443,10 +443,23 @@ def _tool_loop(assistant_content: list[JsonValue]) -> dict[str, JsonValue]: {"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}}, ], [ + {"type": "thinking", "thinking": "", "signature": "EqQBCkgIBRABGAIiQM"}, {"type": "redacted_thinking", "data": "EmwKAhgBEgy3va3pzix"}, {"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}}, ], - id="empty-thinking-stripped-redacted-thinking-kept", + id="signed-empty-thinking-and-redacted-thinking-kept", + ), + pytest.param( + [ + {"type": "thinking", "thinking": ""}, + {"type": "redacted_thinking", "data": "EmwKAhgBEgy3va3pzix"}, + {"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}}, + ], + [ + {"type": "redacted_thinking", "data": "EmwKAhgBEgy3va3pzix"}, + {"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}}, + ], + id="unsigned-empty-thinking-stripped-redacted-thinking-kept", ), ), )