Skip to content

Commit

Permalink
fix(bedrock): correct handling of messages beta (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie authored Oct 22, 2024
1 parent 3595127 commit 4cba32b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anthropic/lib/bedrock/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _prepare_options(input_options: FinalRequestOptions) -> FinalRequestOptions:
if betas:
options.json_data.setdefault("anthropic_beta", betas.split(","))

if options.url in {"/v1/complete", "/v1/messages"} and options.method == "post":
if options.url in {"/v1/complete", "/v1/messages", "/v1/messages?beta=true"} and options.method == "post":
if not is_dict(options.json_data):
raise RuntimeError("Expected dictionary json_data for post /completions endpoint")

Expand Down

0 comments on commit 4cba32b

Please sign in to comment.