From f75de6f510b4932dacd192841eb400f816311ba5 Mon Sep 17 00:00:00 2001 From: Niler Barcelos Date: Fri, 20 Mar 2026 11:19:29 -0300 Subject: [PATCH] test: remove redundant direct transformation test --- ...erimental_pass_through_messages_handler.py | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py b/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py index f14f20feab8..04501b93308 100644 --- a/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py +++ b/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py @@ -190,31 +190,6 @@ def test_openai_model_with_thinking_converts_to_reasoning(): assert "thinking" not in call_kwargs, "thinking should NOT be passed directly to litellm.responses" -def test_anthropic_messages_pass_through_includes_metadata(): - """ - Test that metadata is included in the transformed request body - when passed to the Anthropic messages pass-through. - """ - from litellm.llms.anthropic.experimental_pass_through.messages.transformation import ( - AnthropicMessagesConfig, - ) - from litellm.types.router import GenericLiteLLMParams - - config = AnthropicMessagesConfig() - result = config.transform_anthropic_messages_request( - model="claude-3-5-sonnet-20240620", - messages=[{"role": "user", "content": "Hello"}], - anthropic_messages_optional_request_params={ - "max_tokens": 100, - "metadata": {"user_id": "user-123"}, - }, - litellm_params=GenericLiteLLMParams(), - headers={}, - ) - - assert result.get("metadata") == {"user_id": "user-123"} - - def test_anthropic_messages_handler_forwards_metadata_through_full_flow(): """ Test that metadata flows through the full anthropic_messages_handler path