From 4cba32b41e82377e155612e05c847baf2ca166d0 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Tue, 22 Oct 2024 19:53:39 +0100 Subject: [PATCH] fix(bedrock): correct handling of messages beta (#711) --- src/anthropic/lib/bedrock/_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anthropic/lib/bedrock/_client.py b/src/anthropic/lib/bedrock/_client.py index d585a1bb..70d1561a 100644 --- a/src/anthropic/lib/bedrock/_client.py +++ b/src/anthropic/lib/bedrock/_client.py @@ -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")