From 0c5c7aa3dae8abb5a3a25359fdf2c6dfcc982e44 Mon Sep 17 00:00:00 2001 From: mikemikimike <13286568797@163.com> Date: Wed, 9 Sep 2026 15:02:05 +0800 Subject: [PATCH] style: format messages handler --- .../messages/handler.py | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/messages/handler.py b/litellm/llms/anthropic/experimental_pass_through/messages/handler.py index fe34c38c2b5..1f94e6edeb6 100644 --- a/litellm/llms/anthropic/experimental_pass_through/messages/handler.py +++ b/litellm/llms/anthropic/experimental_pass_through/messages/handler.py @@ -580,27 +580,29 @@ def anthropic_messages_handler( ) if anthropic_messages_provider_config is None: # Route to Responses API for OpenAI / Azure, chat/completions for everything else. - _shared_kwargs: Final = MappingProxyType({ - "max_tokens": max_tokens, - "messages": messages, - "model": original_model, - "metadata": metadata, - "stop_sequences": stop_sequences, - "stream": stream, - "system": system, - "temperature": temperature, - "thinking": thinking, - "tool_choice": tool_choice, - "tools": tools, - "top_k": top_k, - "top_p": top_p, - "_is_async": is_async, - "api_key": api_key, - "api_base": api_base, - "client": client, - "custom_llm_provider": custom_llm_provider, - **kwargs, - }) + _shared_kwargs: Final = MappingProxyType( + { + "max_tokens": max_tokens, + "messages": messages, + "model": original_model, + "metadata": metadata, + "stop_sequences": stop_sequences, + "stream": stream, + "system": system, + "temperature": temperature, + "thinking": thinking, + "tool_choice": tool_choice, + "tools": tools, + "top_k": top_k, + "top_p": top_p, + "_is_async": is_async, + "api_key": api_key, + "api_base": api_base, + "client": client, + "custom_llm_provider": custom_llm_provider, + **kwargs, + } + ) if _should_route_to_responses_api( custom_llm_provider=custom_llm_provider, requested_model=original_model,