From 957b7eb82c803d79fe9c914fba70e4af3530fc73 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 26 Mar 2025 16:54:45 -0700 Subject: [PATCH] define types for response form AnthropicMessagesResponse --- .../anthropic/experimental_pass_through/messages/handler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/messages/handler.py b/litellm/llms/anthropic/experimental_pass_through/messages/handler.py index a7dfff74d9f..9b890db2669 100644 --- a/litellm/llms/anthropic/experimental_pass_through/messages/handler.py +++ b/litellm/llms/anthropic/experimental_pass_through/messages/handler.py @@ -19,6 +19,9 @@ from litellm.llms.custom_httpx.http_handler import ( AsyncHTTPHandler, get_async_httpx_client, ) +from litellm.types.llms.anthropic_messages.anthropic_response import ( + AnthropicMessagesResponse, +) from litellm.types.router import GenericLiteLLMParams from litellm.types.utils import ProviderSpecificHeader from litellm.utils import ProviderConfigManager, client @@ -68,7 +71,7 @@ async def anthropic_messages( client: Optional[AsyncHTTPHandler] = None, custom_llm_provider: Optional[str] = None, **kwargs, -) -> Union[Dict[str, Any], AsyncIterator]: +) -> Union[AnthropicMessagesResponse, AsyncIterator]: """ Makes Anthropic `/v1/messages` API calls In the Anthropic API Spec """