Skip to content

Commit

Permalink
fix(vertex): use correct beta url
Browse files Browse the repository at this point in the history
  • Loading branch information
x5a authored and stainless-app[bot] committed Oct 22, 2024
1 parent 8363a8d commit 4c32977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anthropic/lib/vertex/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def _prepare_options(input_options: FinalRequestOptions, *, project_id: str | No
if is_dict(options.json_data):
options.json_data.setdefault("anthropic_version", DEFAULT_VERSION)

if options.url == "/v1/messages" and options.method == "post":
if options.url in {"/v1/messages", "/v1/messages?beta=true"} and options.method == "post":
if project_id is None:
raise RuntimeError(
"No project_id was given and it could not be resolved from credentials. The client should be instantiated with the `project_id` argument or the `ANTHROPIC_VERTEX_PROJECT_ID` environment variable should be set."
Expand Down

0 comments on commit 4c32977

Please sign in to comment.