Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7d72364
chore(examples): update messages_stream.py shebang from rye to uv (#1…
lucky-verma Aug 7, 2026
43e8669
fix(tools): reject symlink loops in tool paths and skip special skill…
luiz-anthropic Aug 7, 2026
852c4bb
feat(api): add output_behavior to dream creation (create a new memory…
stainless-app[bot] Aug 10, 2026
52e9d94
fix(client): add models
stainless-app[bot] Aug 10, 2026
e4f200b
codegen metadata
stainless-app[bot] Aug 11, 2026
96723a0
fix(vertex): expose beta.messages.parse and tool_runner (#367)
dtmeadows-ant Aug 11, 2026
6eca7bb
fix(bedrock): expose beta.messages.parse, stream and tool_runner (#366)
dtmeadows-ant Aug 11, 2026
76a2e68
fix(client): treat empty ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN as …
dtmeadows-ant Aug 11, 2026
ccfc8e1
fix(streaming): emit input_json events for server tool use blocks (#336)
dtmeadows-ant Aug 11, 2026
41f9cdc
fix(streaming): silence pydantic serializer warnings on message_stop …
dtmeadows-ant Aug 11, 2026
a343e17
fix(streaming): add context to malformed tool input JSON errors in th…
dtmeadows-ant Aug 11, 2026
2bae6c8
fix(bedrock,aws): run SigV4 signing off the event loop in async clien…
dtmeadows-ant Aug 11, 2026
81a92da
fix(streaming): run the request transform once in messages.stream() (…
dtmeadows-ant Aug 11, 2026
fc1599b
fix(streaming): apply all message_delta fields when accumulating stre…
claude[bot] Aug 11, 2026
070f953
fix(client): read PathLike contents passed inside a file tuple
stainless-app[bot] Aug 11, 2026
d6ee99e
chore(internal): remove misc things
stainless-app[bot] Aug 11, 2026
cd40aab
fix(streaming): keep omitted content block fields unset in accumulate…
dtmeadows-ant Aug 12, 2026
21a0e3d
chore(internal): codegen related update
stainless-app[bot] Aug 13, 2026
c13e6e3
fix(client): keep token exchange bound per client across copy() (#388)
meorphis-anthropic Aug 13, 2026
6dfd16e
chore(ci): run breaking-change detection as a ci.yml job on every push
stainless-app[bot] Aug 13, 2026
55d246f
chore(tests): use pytest monkeypatch and fakes instead of unittest.mock
craigie-ant Aug 13, 2026
eeb4d74
refactor: use the not_given singleton instead of the legacy NOT_GIVEN…
craigie-ant Aug 13, 2026
b8f9f61
docs(api): clarify that user profile name is optional for resold prof…
stainless-app[bot] Aug 13, 2026
13df390
chore(internal): drop remaining references to black
stainless-app[bot] Aug 13, 2026
e0c6488
chore(tests): use pytest monkeypatch instead of unittest.mock
stainless-app[bot] Aug 13, 2026
b66781c
release: 0.122.0
stainless-app[bot] Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
detect_breaking_changes_vs_main:
timeout-minutes: 10
name: detect-breaking-changes-vs-main
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
if: |-
(github.event_name == 'push' &&
!startsWith(github.ref, 'refs/heads/release-please--')) ||
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.121.0"
".": "0.122.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 131
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-891ba7f96c3771e1e3ba6cb37fe8cb6d8615b8a06b6c435d9df66f4aad144bb4.yml
openapi_spec_hash: ee61c0ee103fce12d7b9a73ec21762c0
config_hash: c07d90e7ac3e3b26d1d4b41323cd0428
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-086fd8de69e181b730041d853827045c2df13e50b16ea2e1d4cb97b793d90caf.yml
openapi_spec_hash: 05ee4e941a73b5900f570ec1a289489f
config_hash: 3e403f0b9f4dde5482146cfe5385a7a1
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# Changelog

## 0.122.0 (2026-08-13)

Full Changelog: [v0.121.0...v0.122.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.121.0...v0.122.0)

### Features

* **api:** add output_behavior to dream creation (create a new memory store or update the input store in place) ([852c4bb](https://github.com/anthropics/anthropic-sdk-python/commit/852c4bbe4a3a425a8780e89ea6c3cae54836e8bb))


### Bug Fixes

* **bedrock,aws:** run SigV4 signing off the event loop in async clients ([#334](https://github.com/anthropics/anthropic-sdk-python/issues/334)) ([2bae6c8](https://github.com/anthropics/anthropic-sdk-python/commit/2bae6c8cb86f693f4e1e3dd13bb64e03b01fe720))
* **bedrock:** expose beta.messages.parse, stream and tool_runner ([#366](https://github.com/anthropics/anthropic-sdk-python/issues/366)) ([6eca7bb](https://github.com/anthropics/anthropic-sdk-python/commit/6eca7bb19f968856b5652d5471e3ca9fc3fe8641))
* **client:** add models ([52e9d94](https://github.com/anthropics/anthropic-sdk-python/commit/52e9d9453a46a281846f9860e742bfc938bafebc))
* **client:** keep token exchange bound per client across copy() ([#388](https://github.com/anthropics/anthropic-sdk-python/issues/388)) ([c13e6e3](https://github.com/anthropics/anthropic-sdk-python/commit/c13e6e30b75d73b9af51468ae0deae6e6aca1ba0))
* **client:** read PathLike contents passed inside a file tuple ([070f953](https://github.com/anthropics/anthropic-sdk-python/commit/070f95332daea9dc3ed19fe91251d6e5285e5560))
* **client:** treat empty ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN as unset ([#341](https://github.com/anthropics/anthropic-sdk-python/issues/341)) ([76a2e68](https://github.com/anthropics/anthropic-sdk-python/commit/76a2e68531d50c9043a5ac58919527287e56a842))
* **streaming:** add context to malformed tool input JSON errors in the non-beta accumulator ([#339](https://github.com/anthropics/anthropic-sdk-python/issues/339)) ([a343e17](https://github.com/anthropics/anthropic-sdk-python/commit/a343e17b7bc970f656fa02a980b0baa2bf8c3b80))
* **streaming:** apply all message_delta fields when accumulating streamed messages ([#380](https://github.com/anthropics/anthropic-sdk-python/issues/380)) ([fc1599b](https://github.com/anthropics/anthropic-sdk-python/commit/fc1599bd4c25ad5550d55f8f1c8f5c5664e19ed1))
* **streaming:** emit input_json events for server tool use blocks ([#336](https://github.com/anthropics/anthropic-sdk-python/issues/336)) ([ccfc8e1](https://github.com/anthropics/anthropic-sdk-python/commit/ccfc8e140e8e6b824e74c8fd9bed2587e60c5b6f))
* **streaming:** keep omitted content block fields unset in accumulated messages ([#346](https://github.com/anthropics/anthropic-sdk-python/issues/346)) ([cd40aab](https://github.com/anthropics/anthropic-sdk-python/commit/cd40aab995181aa44e9fbdb7b6ce1fa82357c18b))
* **streaming:** run the request transform once in messages.stream() ([#347](https://github.com/anthropics/anthropic-sdk-python/issues/347)) ([81a92da](https://github.com/anthropics/anthropic-sdk-python/commit/81a92dafa2efd87c850950d7d84af727d01c2e47))
* **streaming:** silence pydantic serializer warnings on message_stop events ([#338](https://github.com/anthropics/anthropic-sdk-python/issues/338)) ([41f9cdc](https://github.com/anthropics/anthropic-sdk-python/commit/41f9cdcac36d4c6a3d9d2c8becaa632c75a44054))
* **tools:** reject symlink loops in tool paths and skip special skill-archive members ([#322](https://github.com/anthropics/anthropic-sdk-python/issues/322)) ([43e8669](https://github.com/anthropics/anthropic-sdk-python/commit/43e8669d066a1d18ffdbff505fc99ac45aa7492e))
* **vertex:** expose beta.messages.parse and tool_runner ([#367](https://github.com/anthropics/anthropic-sdk-python/issues/367)) ([96723a0](https://github.com/anthropics/anthropic-sdk-python/commit/96723a000b6179f0bee51a0b5aa0129e360dc323))


### Chores

* **ci:** run breaking-change detection as a ci.yml job on every push ([6dfd16e](https://github.com/anthropics/anthropic-sdk-python/commit/6dfd16ea7a650dc65253c72264cbcb14db696c91))
* **examples:** update messages_stream.py shebang from rye to uv ([#1519](https://github.com/anthropics/anthropic-sdk-python/issues/1519)) ([7d72364](https://github.com/anthropics/anthropic-sdk-python/commit/7d7236432934073a5c83f4eca021d35ea5bbd7c8))
* **internal:** codegen related update ([21a0e3d](https://github.com/anthropics/anthropic-sdk-python/commit/21a0e3d46ea0c3842cbcb92de32876727595b1f4))
* **internal:** drop remaining references to black ([13df390](https://github.com/anthropics/anthropic-sdk-python/commit/13df3907629ac68627a13944e49ba1d12c2fdc2b))
* **internal:** remove misc things ([d6ee99e](https://github.com/anthropics/anthropic-sdk-python/commit/d6ee99e8b90f3921f74a2768748f0eea912c1dfd))
* **tests:** use pytest monkeypatch and fakes instead of unittest.mock ([55d246f](https://github.com/anthropics/anthropic-sdk-python/commit/55d246f0e55e3f51de17d53d7974ea0ea01c5a9b))
* **tests:** use pytest monkeypatch instead of unittest.mock ([e0c6488](https://github.com/anthropics/anthropic-sdk-python/commit/e0c64881c24291b77e2b0653994ac9e3c696ab00))


### Documentation

* **api:** clarify that user profile name is optional for resold profiles ([b8f9f61](https://github.com/anthropics/anthropic-sdk-python/commit/b8f9f6177cf7b49e75e2c0395eed4d21c5efb416))
* fix fulfillment typos in session runner ([#1795](https://github.com/anthropics/anthropic-sdk-python/issues/1795)) ([009b035](https://github.com/anthropics/anthropic-sdk-python/commit/009b035305e0724ce108ebd796935f91711fc6e1))
* fix incorrect docstring in AsyncAnthropicFoundry.models ([#1592](https://github.com/anthropics/anthropic-sdk-python/issues/1592)) ([f1f5e9b](https://github.com/anthropics/anthropic-sdk-python/commit/f1f5e9b9170ed04833d7c4ec0ae003978ecc19a1))


### Refactors

* use the not_given singleton instead of the legacy NOT_GIVEN alias ([eeb4d74](https://github.com/anthropics/anthropic-sdk-python/commit/eeb4d74f442678233e34af9490bae1fabaccee64))

## 0.121.0 (2026-08-07)

Full Changelog: [v0.120.2...v0.121.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.120.2...v0.121.0)
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ To refresh these snapshots, run the tests with the `--http-record` flag:

## Linting and formatting

This repository uses [ruff](https://github.com/astral-sh/ruff) and
[black](https://github.com/psf/black) to format the code in the repository.
This repository uses [ruff](https://github.com/astral-sh/ruff) to lint and format the code in the repository.

To lint:

Expand Down
3 changes: 3 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,9 @@ from anthropic.types.beta import (
BetaDreamSessionsInput,
BetaDreamStatus,
BetaDreamUsage,
BetaOutputBehavior,
BetaOutputBehaviorCreateNew,
BetaOutputBehaviorUpdateExisting,
)
```

Expand Down
2 changes: 1 addition & 1 deletion examples/messages_stream.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S rye run python
#!/usr/bin/env -S uv run python

import asyncio

Expand Down
10 changes: 1 addition & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "anthropic"
version = "0.121.0"
version = "0.122.0"
description = "The official Python library for the anthropic API"
dynamic = ["readme"]
license = "MIT"
Expand Down Expand Up @@ -118,7 +118,6 @@ include = [
"/*.lock",
"/*.md",
"/mypy.ini",
"/noxfile.py",
"bin/*",
"examples/*",
"src/*",
Expand Down Expand Up @@ -160,7 +159,6 @@ exclude = [
".git",
"_dev",
".venv",
".nox",
"examples/mcp_tool_runner.py", # mcp requires Python 3.10+, lint runs on 3.9
]

Expand Down Expand Up @@ -215,12 +213,6 @@ cache_fine_grained = true
# and would not be worth it.
disable_error_code = "func-returns-value,overload-cannot-match"

# https://github.com/python/mypy/issues/12162
[[tool.mypy.overrides]]
module = "black.files.*"
ignore_errors = true
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "anthropic.lib.vertex._auth"
disallow_untyped_calls = false
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/ruffen-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def finish_fragment() -> None:
fragment_lines = fragment.splitlines()
code += f"{PYCON_PREFIX}{fragment_lines[0]}\n"
for line in fragment_lines[1:]:
# Skip blank lines to handle Black adding a blank above
# Skip blank lines to handle the formatter adding a blank above
# functions within blocks. A blank line would end the REPL
# continuation prompt.
#
Expand Down
55 changes: 31 additions & 24 deletions src/anthropic/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
AccessTokenAuth,
CredentialsFile,
AccessTokenProvider,
BaseURLBoundProvider,
default_credentials,
)
from .lib.credentials._auth import (
Expand All @@ -70,18 +71,24 @@ def _close_credentials(credentials: object) -> None:
close()


def _bind_credentials_base_url(credentials: AccessTokenProvider | None, base_url: str) -> None:
"""If the credential provider supports ``bind_base_url``, pass it the
client's resolved ``base_url`` so the token exchange and API calls hit
the same deployment without the caller passing the URL twice.
def _bind_credentials_base_url(credentials: AccessTokenProvider | None, base_url: str) -> AccessTokenProvider | None:
"""Return the provider this client should exchange tokens through.

Providers without the hook (plain callables, custom impls) are left
untouched and MUST resolve their own token-exchange ``base_url`` — the
client does not second-guess them.
See :class:`BaseURLBoundProvider`; any other provider (plain callables,
custom impls) is returned untouched and resolves its own exchange URL.
"""
bind = getattr(credentials, "bind_base_url", None)
if callable(bind):
bind(base_url)
if isinstance(credentials, BaseURLBoundProvider):
return credentials.for_base_url(base_url)
return credentials


def _keeps_base_url(current: httpx.URL, requested: str | httpx.URL | None) -> bool:
"""Whether a ``copy()`` stays on the parent's deployment.

Tokens are only valid for the deployment that minted them, so the parent's
:class:`TokenCache` is only shared in that case.
"""
return requested is None or str(httpx.URL(requested)).rstrip("/") == str(current).rstrip("/")


def _warn_explicit_shadow(*, api_key: str | None, auth_token: str | None, credentials: object) -> None:
Expand Down Expand Up @@ -211,8 +218,8 @@ def __init__(
or profile is not None
)
if not has_explicit_credential:
api_key = os.environ.get("ANTHROPIC_API_KEY")
auth_token = os.environ.get("ANTHROPIC_AUTH_TOKEN")
api_key = os.environ.get("ANTHROPIC_API_KEY") or None
auth_token = os.environ.get("ANTHROPIC_AUTH_TOKEN") or None
self.api_key = api_key
self.auth_token = auth_token
# --- end credentials support ---
Expand Down Expand Up @@ -265,7 +272,7 @@ def __init__(
credential_headers = result.extra_headers
if not base_url_is_explicit and result.base_url:
base_url = result.base_url
_bind_credentials_base_url(credentials, str(base_url))
credentials = _bind_credentials_base_url(credentials, str(base_url))
self.credentials = credentials
_warn_explicit_shadow(api_key=api_key, auth_token=auth_token, credentials=credentials)
if _is_base_client(self):
Expand Down Expand Up @@ -476,10 +483,10 @@ def copy(
resolved_credentials = self.credentials if isinstance(credentials, NotGiven) else credentials
if resolved_credentials is not None and _is_base_client(self):
_extra_kwargs = {"credentials": resolved_credentials, **_extra_kwargs}
# Reuse the parent's TokenCache when the credentials provider is
# unchanged so with_options() copies don't trigger an independent
# token exchange. A new credentials= gets a fresh cache.
if isinstance(credentials, NotGiven):
# Share the parent's TokenCache only while the provider and
# deployment are unchanged; a new credentials= or base_url= gets
# its own cache.
if isinstance(credentials, NotGiven) and _keeps_base_url(self.base_url, base_url):
_extra_kwargs = {"_token_cache": self._token_cache, **_extra_kwargs}
# --- end credentials support ---
return self.__class__(
Expand Down Expand Up @@ -631,8 +638,8 @@ def __init__(
or profile is not None
)
if not has_explicit_credential:
api_key = os.environ.get("ANTHROPIC_API_KEY")
auth_token = os.environ.get("ANTHROPIC_AUTH_TOKEN")
api_key = os.environ.get("ANTHROPIC_API_KEY") or None
auth_token = os.environ.get("ANTHROPIC_AUTH_TOKEN") or None
self.api_key = api_key
self.auth_token = auth_token
# --- end credentials support ---
Expand Down Expand Up @@ -685,7 +692,7 @@ def __init__(
credential_headers = result.extra_headers
if not base_url_is_explicit and result.base_url:
base_url = result.base_url
_bind_credentials_base_url(credentials, str(base_url))
credentials = _bind_credentials_base_url(credentials, str(base_url))
self.credentials = credentials
_warn_explicit_shadow(api_key=api_key, auth_token=auth_token, credentials=credentials)
if _is_base_client(self):
Expand Down Expand Up @@ -892,10 +899,10 @@ def copy(
resolved_credentials = self.credentials if isinstance(credentials, NotGiven) else credentials
if resolved_credentials is not None and _is_base_client(self):
_extra_kwargs = {"credentials": resolved_credentials, **_extra_kwargs}
# Reuse the parent's TokenCache when the credentials provider is
# unchanged so with_options() copies don't trigger an independent
# token exchange. A new credentials= gets a fresh cache.
if isinstance(credentials, NotGiven):
# Share the parent's TokenCache only while the provider and
# deployment are unchanged; a new credentials= or base_url= gets
# its own cache.
if isinstance(credentials, NotGiven) and _keeps_base_url(self.base_url, base_url):
_extra_kwargs = {"_token_cache": self._token_cache, **_extra_kwargs}
# --- end credentials support ---
return self.__class__(
Expand Down
6 changes: 2 additions & 4 deletions src/anthropic/_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ def is_base64_file_input(obj: object) -> TypeGuard[Base64FileInput]:


def is_file_content(obj: object) -> TypeGuard[FileContent]:
return (
isinstance(obj, bytes) or isinstance(obj, tuple) or isinstance(obj, io.IOBase) or isinstance(obj, os.PathLike)
)
return isinstance(obj, bytes) or isinstance(obj, io.IOBase) or isinstance(obj, os.PathLike)


def assert_is_file_content(obj: object, *, key: str | None = None) -> None:
if not is_file_content(obj):
if not is_file_content(obj) and not is_tuple_t(obj):
prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`"
raise RuntimeError(
f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/anthropics/anthropic-sdk-python/tree/main#file-uploads"
Expand Down
2 changes: 1 addition & 1 deletion src/anthropic/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "anthropic"
__version__ = "0.121.0" # x-release-please-version
__version__ = "0.122.0" # x-release-please-version
21 changes: 11 additions & 10 deletions src/anthropic/lib/aws/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import httpx

from ..._types import NOT_GIVEN, Omit, Headers, Timeout, NotGiven
from ..._types import Omit, Headers, Timeout, NotGiven, not_given
from ..._utils import asyncify
from ..._client import Anthropic, AsyncAnthropic
from ._credentials import (
resolve_region,
Expand Down Expand Up @@ -43,7 +44,7 @@ def __init__(
workspace_id: str | None = None,
skip_auth: bool = False,
base_url: str | httpx.URL | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
Expand Down Expand Up @@ -180,14 +181,14 @@ def copy( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodO
credentials: AccessTokenProvider | None = None,
webhook_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.Client | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
set_default_query: Mapping[str, object] | None = None,
middleware: Sequence[MiddlewareInput] | None | NotGiven = NOT_GIVEN,
middleware: Sequence[MiddlewareInput] | None | NotGiven = not_given,
_extra_kwargs: Mapping[str, Any] = {},
) -> Self:
# The AWS client authenticates with SigV4 (or an API key), not a token
Expand Down Expand Up @@ -251,7 +252,7 @@ def __init__(
workspace_id: str | None = None,
skip_auth: bool = False,
base_url: str | httpx.URL | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
Expand Down Expand Up @@ -358,7 +359,7 @@ async def _prepare_request(self, request: httpx.Request) -> None:

data = request.read().decode()

headers = get_auth_headers(
headers = await asyncify(get_auth_headers)(
method=request.method,
url=str(request.url),
headers=request.headers,
Expand Down Expand Up @@ -388,14 +389,14 @@ def copy( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodO
credentials: AccessTokenProvider | None = None,
webhook_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.AsyncClient | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
set_default_query: Mapping[str, object] | None = None,
middleware: Sequence[MiddlewareInput] | None | NotGiven = NOT_GIVEN,
middleware: Sequence[MiddlewareInput] | None | NotGiven = not_given,
_extra_kwargs: Mapping[str, Any] = {},
) -> Self:
# The AWS client authenticates with SigV4 (or an API key), not a token
Expand Down
Loading
Loading