Summary
AnthropicBedrock().beta.messages exposes .create() but not .stream(). The first-party Anthropic().beta.messages has both.
Root cause
In src/anthropic/lib/bedrock/_beta_messages.py, the Bedrock Messages class only copies create:
class Messages(SyncAPIResource):
create = FirstPartyMessagesAPI.create
# stream is missing
The first-party class in resources/beta/messages/messages.py has both create and stream.
Impact
Any code using client.beta.messages.stream(...) breaks when switching from Anthropic() to AnthropicBedrock(). Streaming itself works fine on Bedrock — create(stream=True) returns events correctly. It's just the convenience .stream() method that's missing from the class definition.
Expected fix
class Messages(SyncAPIResource):
create = FirstPartyMessagesAPI.create
stream = FirstPartyMessagesAPI.stream
(Same for AsyncMessages.)
Since this file is Stainless-generated, the fix likely needs to happen in the generator config.
SDK version
anthropic==0.80.0
Summary
AnthropicBedrock().beta.messagesexposes.create()but not.stream(). The first-partyAnthropic().beta.messageshas both.Root cause
In
src/anthropic/lib/bedrock/_beta_messages.py, the BedrockMessagesclass only copiescreate:The first-party class in
resources/beta/messages/messages.pyhas bothcreateandstream.Impact
Any code using
client.beta.messages.stream(...)breaks when switching fromAnthropic()toAnthropicBedrock(). Streaming itself works fine on Bedrock —create(stream=True)returns events correctly. It's just the convenience.stream()method that's missing from the class definition.Expected fix
(Same for
AsyncMessages.)Since this file is Stainless-generated, the fix likely needs to happen in the generator config.
SDK version
anthropic==0.80.0