From 82e03ded2026ad23f3454d01422f9f2e6f645435 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Tue, 17 Dec 2024 20:35:26 +0000 Subject: [PATCH] fix(vertex): remove `anthropic_version` deletion for token counting --- src/anthropic/lib/vertex/_client.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/anthropic/lib/vertex/_client.py b/src/anthropic/lib/vertex/_client.py index d2f49029..e6ead1a4 100644 --- a/src/anthropic/lib/vertex/_client.py +++ b/src/anthropic/lib/vertex/_client.py @@ -447,9 +447,6 @@ def _prepare_options(input_options: FinalRequestOptions, *, project_id: str | No "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." ) - if is_dict(options.json_data): - options.json_data.pop("anthropic_version", None) - options.url = f"/projects/{project_id}/locations/{region}/publishers/anthropic/models/count-tokens:rawPredict" if options.url.startswith('/v1/messages/batches'):