Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
51fca79
chore: fix docstring
dgellow Nov 25, 2025
746ac05
chore: update uv.lock
stainless-app[bot] Nov 26, 2025
388bd0c
fix: ensure streams are always closed
stainless-app[bot] Dec 1, 2025
21c6374
chore(deps): mypy 1.18.1 has a regression, pin to 1.17
stainless-app[bot] Nov 27, 2025
536720d
codegen metadata
stainless-app[bot] Nov 27, 2025
90634f3
chore: bump required `uv` version
stainless-app[bot] Dec 1, 2025
d7ae1fc
chore: update lockfile
stainless-app[bot] Dec 2, 2025
87aa378
chore(docs): use environment variables for authentication in code sni…
stainless-app[bot] Dec 2, 2025
955c61d
feat: allow raw JSON schema to be passed to messages.stream()
karpetrosyan Dec 3, 2025
2163d26
codegen metadata
stainless-app[bot] Dec 3, 2025
1521316
feat(tool runner): add support for server-side tools (#1086)
karpetrosyan Dec 3, 2025
4547171
chore(internal): avoid using unstable Python versions in tests
stainless-app[bot] Dec 4, 2025
ede3242
fix(types): allow pyright to infer TypedDict types within SequenceNotStr
stainless-app[bot] Dec 8, 2025
d306605
chore: add missing docstrings
stainless-app[bot] Dec 11, 2025
adbd11c
codegen metadata
stainless-app[bot] Dec 11, 2025
c570bce
codegen metadata
stainless-app[bot] Dec 12, 2025
6285abc
chore(internal): add missing files argument to base client
stainless-app[bot] Dec 15, 2025
718fa8e
fix: use async_to_httpx_files in patch method
stainless-app[bot] Dec 17, 2025
8914b7a
chore(internal): add `--fix` argument to lint script
stainless-app[bot] Dec 18, 2025
83d1c4a
chore(ci): Add Claude Code GitHub Workflow (#1293)
dtmeadows Jan 6, 2026
5a0b89b
fix(client): loosen auth header validation
stainless-app[bot] Jan 7, 2026
4ff05e6
codegen metadata
stainless-app[bot] Jan 12, 2026
5302f27
feat(client): add support for binary request streaming
stainless-app[bot] Jan 13, 2026
96de73e
release: 0.76.0
stainless-app[bot] Jan 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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'
version: '0.9.13'

- name: Install dependencies
run: uv sync --all-extras
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'
version: '0.9.13'

- name: Install dependencies
run: uv sync --all-extras
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'
version: '0.9.13'

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

50 changes: 50 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'

# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'

2 changes: 1 addition & 1 deletion .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
if: ${{ steps.release.outputs.releases_created }}
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'
version: '0.9.13'

- name: Publish to PyPI
if: ${{ steps.release.outputs.releases_created }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/detect-breaking-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'
version: '0.9.13'
- name: Install dependencies
run: uv sync --all-extras
- name: Detect removed symbols
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'
version: '0.9.13'

- name: Publish to PyPI
run: |
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.75.0"
".": "0.76.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-a49e89deec4e00d1da490808099d66e2001531b12d8666a7f5d0b496f760440d.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-211390f4627177361550415b571a2b580b18c5882e3c2fc961b527e7b3474b0f.yml
openapi_spec_hash: c93ef3808c58e233b01966ff154f31ce
config_hash: 7e9dfe17ab5c80abee5372ce746a926e
config_hash: 2438d3dc2e69cd23b9ed60c091eaffa7
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## 0.76.0 (2026-01-13)

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

### Features

* allow raw JSON schema to be passed to messages.stream() ([955c61d](https://github.com/anthropics/anthropic-sdk-python/commit/955c61dd5aae4c8a2c7b8fab1f97a0b88c0ef03b))
* **client:** add support for binary request streaming ([5302f27](https://github.com/anthropics/anthropic-sdk-python/commit/5302f2724c9890340c1b0dd042a1e670ed00eb93))
* **tool runner:** add support for server-side tools ([#1086](https://github.com/anthropics/anthropic-sdk-python/issues/1086)) ([1521316](https://github.com/anthropics/anthropic-sdk-python/commit/15213160a016a70538c81163c49ce5948fe06879))


### Bug Fixes

* **client:** loosen auth header validation ([5a0b89b](https://github.com/anthropics/anthropic-sdk-python/commit/5a0b89bb2c808cd0a413697a1141d4835ce00181))
* ensure streams are always closed ([388bd0c](https://github.com/anthropics/anthropic-sdk-python/commit/388bd0cbc53c4d8d8884d17a3051623728588eb4))
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([ede3242](https://github.com/anthropics/anthropic-sdk-python/commit/ede32426043273f9b31e70893207ad6519240591))
* use async_to_httpx_files in patch method ([718fa8e](https://github.com/anthropics/anthropic-sdk-python/commit/718fa8e62aa939dd8c5d46430aa1d1b05a5906d9))


### Chores

* add missing docstrings ([d306605](https://github.com/anthropics/anthropic-sdk-python/commit/d306605103649320e900ab3a2413d0dbd6b118c5))
* bump required `uv` version ([90634f3](https://github.com/anthropics/anthropic-sdk-python/commit/90634f3ef0a9d7ae5a1945f005b13aad245f6b32))
* **ci:** Add Claude Code GitHub Workflow ([#1293](https://github.com/anthropics/anthropic-sdk-python/issues/1293)) ([83d1c4a](https://github.com/anthropics/anthropic-sdk-python/commit/83d1c4aef1ae34b1aebe4ca25de8b0cd2d37a493))
* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([21c6374](https://github.com/anthropics/anthropic-sdk-python/commit/21c6374f3825f43e104bad4a5df71941bcf09844))
* **docs:** use environment variables for authentication in code snippets ([87aa378](https://github.com/anthropics/anthropic-sdk-python/commit/87aa378f13f64099bec9513cba85ba9723773ec4))
* fix docstring ([51fca79](https://github.com/anthropics/anthropic-sdk-python/commit/51fca7942b4e74e1357fb72828e8e39a8b8eea6a))
* **internal:** add `--fix` argument to lint script ([8914b7a](https://github.com/anthropics/anthropic-sdk-python/commit/8914b7abe9b98565f08f4965f7fd0da8cd9f1f08))
* **internal:** add missing files argument to base client ([6285abc](https://github.com/anthropics/anthropic-sdk-python/commit/6285abcba9945a7c6c6b713940ee0478dfe25008))
* **internal:** avoid using unstable Python versions in tests ([4547171](https://github.com/anthropics/anthropic-sdk-python/commit/4547171aba17e41ff2f2e2c13d319b6bc1a13e85))
* update lockfile ([d7ae1fc](https://github.com/anthropics/anthropic-sdk-python/commit/d7ae1fc9c06d7565b909e5c2d48ebeb63ee9d8c9))
* update uv.lock ([746ac05](https://github.com/anthropics/anthropic-sdk-python/commit/746ac05cbb18c7d596a381e2fe89d0ee3e4e94b9))

## 0.75.0 (2025-11-24)

Full Changelog: [v0.74.1...v0.75.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.74.1...v0.75.0)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,15 @@ pip install anthropic[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from anthropic import DefaultAioHttpClient
from anthropic import AsyncAnthropic


async def main() -> None:
async with AsyncAnthropic(
api_key="my-anthropic-api-key",
api_key=os.environ.get("ANTHROPIC_API_KEY"), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
message = await client.messages.create(
Expand Down
22 changes: 13 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
[project]
name = "anthropic"
version = "0.75.0"
version = "0.76.0"
description = "The official Python library for the anthropic API"
dynamic = ["readme"]
license = "MIT"
authors = [
{ name = "Anthropic", email = "[email protected]" },
]

dependencies = [
"httpx>=0.25.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"jiter>=0.4.0, <1",
"docstring-parser>=0.15,<1",
]

requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
Expand All @@ -26,6 +28,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand All @@ -46,7 +49,7 @@ Repository = "https://github.com/anthropics/anthropic-sdk-python"

[tool.uv]
managed = true
required-version = ">=0.5.0"
required-version = ">=0.9"
conflicts = [
[
{ group = "pydantic-v1" },
Expand All @@ -58,7 +61,7 @@ conflicts = [
# version pins are in uv.lock
dev = [
"pyright==1.1.399",
"mypy",
"mypy==1.17",
"respx",
"pytest",
"pytest-asyncio",
Expand All @@ -76,7 +79,8 @@ pydantic-v1 = [
"pydantic>=1.9.0,<2",
]
pydantic-v2 = [
"pydantic>=2,<3",
"pydantic~=2.0 ; python_full_version < '3.14'",
"pydantic~=2.12 ; python_full_version >= '3.14'",
]

[build-system]
Expand Down
Loading
Loading