Skip to content

feat(bedrock/vertex): add parity for beta messages (stream, count_tokens, parse, tool_runner)#1137

Open
Ashutosh0x wants to merge 1 commit intoanthropics:mainfrom
Ashutosh0x:fix/cloud-beta-parity
Open

feat(bedrock/vertex): add parity for beta messages (stream, count_tokens, parse, tool_runner)#1137
Ashutosh0x wants to merge 1 commit intoanthropics:mainfrom
Ashutosh0x:fix/cloud-beta-parity

Conversation

@Ashutosh0x
Copy link

feat(bedrock/vertex): add parity for beta messages (stream, count_tokens, parse, tool_runner)

This PR adds missing beta method delegations to the AnthropicBedrock and AnthropicVertex clients, resolving #1120.

Changes

  • Added stream(), count_tokens(), parse(), and tool_runner() to AnthropicBedrock.beta.messages (sync and async).
  • Added parse() and tool_runner()toAnthropicVertex.beta.messages` (sync and async).
  • Added corresponding method delegations to WithRawResponse and WithStreamingResponse wrappers for both cloud clients.

Verification

Verified with a reproduction script that checks for the existence and proper delegation of these methods across all cloud client variants (Bedrock/Vertex, Sync/Async).

# Now possible with Bedrock/Vertex:
with client.beta.messages.stream(...) as stream:
    for event in stream:
        ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant