diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 5e2e9a9c..4a49e38b 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -8,6 +8,7 @@ jobs: publish: name: publish runs-on: ubuntu-latest + environment: production-release steps: - uses: actions/checkout@v4 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 51acdaa4..69508b72 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.37.0" + ".": "0.37.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b468816..bc2156cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.37.1 (2024-10-22) + +Full Changelog: [v0.37.0...v0.37.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.37.0...v0.37.1) + +### Bug Fixes + +* **bedrock:** correct handling of messages beta ([#711](https://github.com/anthropics/anthropic-sdk-python/issues/711)) ([4cba32b](https://github.com/anthropics/anthropic-sdk-python/commit/4cba32b41e82377e155612e05c847baf2ca166d0)) +* **vertex:** use correct beta url ([b76db5c](https://github.com/anthropics/anthropic-sdk-python/commit/b76db5c90a9b22d4078a15ac6844a4f75dcbc857)) + ## 0.37.0 (2024-10-22) Full Changelog: [v0.36.2...v0.37.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.36.2...v0.37.0) diff --git a/pyproject.toml b/pyproject.toml index 364f8f26..1ccb9a45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "anthropic" -version = "0.37.0" +version = "0.37.1" description = "The official Python library for the anthropic API" dynamic = ["readme"] license = "MIT" diff --git a/src/anthropic/_version.py b/src/anthropic/_version.py index 84edab50..18947716 100644 --- a/src/anthropic/_version.py +++ b/src/anthropic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "anthropic" -__version__ = "0.37.0" # x-release-please-version +__version__ = "0.37.1" # x-release-please-version 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") diff --git a/src/anthropic/lib/vertex/_client.py b/src/anthropic/lib/vertex/_client.py index f6289aee..3df48d0c 100644 --- a/src/anthropic/lib/vertex/_client.py +++ b/src/anthropic/lib/vertex/_client.py @@ -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."