diff --git a/src/anthropic/lib/bedrock/_beta_messages.py b/src/anthropic/lib/bedrock/_beta_messages.py index 332f6fba..14f6e425 100644 --- a/src/anthropic/lib/bedrock/_beta_messages.py +++ b/src/anthropic/lib/bedrock/_beta_messages.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import TYPE_CHECKING + from ... import _legacy_response from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -13,6 +15,14 @@ class Messages(SyncAPIResource): create = FirstPartyMessagesAPI.create + tool_runner = FirstPartyMessagesAPI.tool_runner + stream = FirstPartyMessagesAPI.stream + + if TYPE_CHECKING: + ... + else: + # parse is used by stream and tool_runner internally + parse = FirstPartyMessagesAPI.parse @cached_property def with_raw_response(self) -> MessagesWithRawResponse: @@ -36,6 +46,14 @@ def with_streaming_response(self) -> MessagesWithStreamingResponse: class AsyncMessages(AsyncAPIResource): create = FirstPartyAsyncMessagesAPI.create + tool_runner = FirstPartyAsyncMessagesAPI.tool_runner + stream = FirstPartyAsyncMessagesAPI.stream + + if TYPE_CHECKING: + ... + else: + # parse is used by stream and tool_runner internally + parse = FirstPartyAsyncMessagesAPI.parse @cached_property def with_raw_response(self) -> AsyncMessagesWithRawResponse: