Repository navigation
test(integration): expect signed empty thinking blocks to survive /v1/messages replay after #41362 - #46686
Conversation
…/messages replay after #41362 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Automatic reviews are disabled for this repository. |
|
bugbot run |
|
@litereview code-review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 29dbe71. Configure here.
✅ code-review5/5 · Ready for human reviewScope: full · Full PR review. Completed · Some checks not run. No correctness findings. Checks and execution details
This matches the
View review · Reviewed |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@litellm-stampbot |
litellm-stampbot: risk lowApproved at Rules (
Judge (gpt-6-luna): low, probability of high 0.00 (high at or above 0.90)
Pushes do not re-run this check. Comment |
kerry-berri
left a comment
There was a problem hiding this comment.
Low risk by rule and by judgement at 29dbe71
TLDR
Problem this solves:
integration-providerson main is red on one stale reasoning wire expectationHow it solves it:
User Flow
Before: CircleCI on main fails
integration-providerson a test that still pins pre-#41362 behaviorintegrationworkflow runs on main, for example [job 2260319]([REDACTED SECRET]/gh/BerriAI/litellm/2260319) at 2026-10-15 08:09 UTCtest_thinking_history_keeps_only_blocks_anthropic_can_verify[empty-thinking-stripped-redacted-thinking-kept]fails because the proxy now forwards the signed empty thinking blockAfter: the same test asserts the behavior #41362 intended, and the unsigned strip stays covered
[signed-empty-thinking-and-redacted-thinking-kept]and[unsigned-empty-thinking-stripped-redacted-thinking-kept]both pass in [integration-providers job 2260527]([REDACTED SECRET]/gh/BerriAI/litellm/2260527), with the rest of that job's reds matching main. Failed jobs rerun in workflow fb9b7026 to clear an apk fetch error and one replica flakeDetails
Failing test id on main:
tests/integration/messages_endpoint/providers/anthropic/reasoning/test_anthropic_reasoning_request_translation_wire.py::test_thinking_history_keeps_only_blocks_anthropic_can_verify[empty-thinking-stripped-redacted-thinking-kept]It passed through [job 2260273]([REDACTED SECRET]/gh/BerriAI/litellm/2260273) at 1a9fa70 and has failed since [job 2260286]([REDACTED SECRET]/gh/BerriAI/litellm/2260286) at 4496fe0. The only anthropic change in that range is 897bfea (#41362), which makes
strip_empty_content_blocks_from_anthropic_messagesdrop a thinking block only when it is empty and unsigned. The test param sends{"type": "thinking", "thinking": "", "signature": "EqQB..."}, which is signed, so the expectation pinned the old behavior. Production code is unchangedMutation checks: making the sanitizer drop every empty thinking block fails the signed case, and making it never drop empty thinking blocks fails the unsigned case
Deferred, each red on main and left for its own fix or next run:
test_anthropic_tool_search_result_matrix_wire.pyandtest_modify_params_trailing_search_turn_stays_within_the_cache_mark_cap, covered by open fix(anthropic): count a replayed server tool call's cache mark the way modify_params sends it #46591integration-databaseandintegration-database-replicaP1001 and lock wait failures from fix(proxy-extras): run prisma migrate deploy under the pinned coordinator lock instead of Prisma's session advisory lock #46368, covered by open fix(proxy-extras): accept unencoded DB passwords in the v2 migration lock and redact its errors #46592 and fix(proxy-extras): hold only Prisma's lock key during migrate deploy so it never waits on the request log index build #46660test_bad_database_url, covered by fix(proxy-extras): accept unencoded DB passwords in the v2 migration lock and redact its errors #46592test_responses_bridge_tool_search_chaos.py::test_a_previous_response_id_turn_replays_the_function_call_without_the_search_calltest_responses_bridge_stream_errors.py::test_bridged_invalid_prompt_answers_a_bad_request_without_trying_the_fallback(added by fix(responses): keep the provider code and message on top-level stream error events #46438)test_prompt_cache_pin_ttl.py::test_provider_family_pin_lifetime_agrees_with_the_ttl_the_wire_carries[pin-bedrock-arn-base](added by fix(router): keep the prompt caching affinity pin alive as long as the prefix's cache_control ttl #46084)test_messages_basic_bedrock_mantle.pyandtest_auto_router_management.pycellsintegration-extensionsprometheus custom label and logging chaos cells, red or flaky on main toointegration-providersstays red on this branch until those land, so the claim here is the one test id above passing on the PR pipelinePre-Submission checklist
Type
✅ Test
Final Attestation
The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
29dbe71 passes /live-pr-risk
Link to Devin session: https://app.devin.ai/sessions/5b80f19bc3ca4f5793821b6353f3fef4
Open in Devin Desktop: https://app.devin.ai/desktop/session/5b80f19bc3ca4f5793821b6353f3fef4?variant=devin
Requested by: @mateo-berri
Note
Low Risk
Test-only change to integration expectations; no runtime or security impact.
Overview
Updates integration wire expectations for
test_thinking_history_keeps_only_blocks_anthropic_can_verifyso they match behavior from #41362: signed emptythinkingblocks are forwarded on/v1/messagesreplay, while unsigned emptythinkingblocks are still stripped.The former
empty-thinking-stripped-redacted-thinking-keptcase is split intosigned-empty-thinking-and-redacted-thinking-kept(expects the signed empty block plusredacted_thinkingto survive) andunsigned-empty-thinking-stripped-redacted-thinking-kept(expects onlyredacted_thinkingandtool_useupstream). No production code changes—this fixes a stale test that was failingintegration-providerson main.Reviewed by Cursor Bugbot for commit 29dbe71. Bugbot is set up for automated code reviews on this repo. Configure here.