Skip to content

Commit

Permalink
fix(vertex): remove anthropic_version deletion for token counting
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie authored and stainless-app[bot] committed Dec 17, 2024
1 parent dc651fd commit 82e03de
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/anthropic/lib/vertex/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 82e03de

Please sign in to comment.