Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,34 @@ jobs:
(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
contents: write
pull-requests: write
issues: write
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
fetch-depth: 0

- name: Configure git
run: |
git config user.name "claude[bot]"
git config user.email "209825114+claude[bot]@users.noreply.github.com"

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

# Allow Claude to run git commands and push changes
allowed_tools: "Bash(git commit:*),Bash(git push:*),Bash(git merge:*),Bash(git checkout:*),Bash(git add:*),Bash(git status:*),Bash(git diff:*),Bash(git log:*),Bash(git fetch:*),Bash(gh pr:*),Bash(gh issue:*)"

# Allow github-actions[bot] to trigger Claude Code Action
allowed_bots: "stainless-app"

# 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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.79.0"
".": "0.80.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: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-fee5dc365a4948e68639582c5301d4d0666c7d85a11628d7917e1477f76d3da1.yml
openapi_spec_hash: d5543958074cd2bd74096cd69f3bb4f9
config_hash: c4802b6c7f8ffae62f7d73b2ac61e635
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-6924f88807cb0cad6fcffa77da1c9263ce48d5f7db632dfc842773e3bb1f17e4.yml
openapi_spec_hash: 9cec3bf2e3ee3dbad7447c26c5e579ae
config_hash: 409a17b0a2807d809e958c50c09f9665
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## 0.80.0 (2026-02-17)

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

### Features

* **api:** Releasing claude-sonnet-4-6 ([d518d6e](https://github.com/anthropics/anthropic-sdk-python/commit/d518d6ecede3d0638f0b14950dc2be8efa0b4ff4))


### Bug Fixes

* **api:** fix spec errors ([1413a76](https://github.com/anthropics/anthropic-sdk-python/commit/1413a76f905e590fab583417f5cb1eef9f537c2c))
* remove speed from ga messages ([#1402](https://github.com/anthropics/anthropic-sdk-python/issues/1402)) ([f6ce67c](https://github.com/anthropics/anthropic-sdk-python/commit/f6ce67c3ed5f2fc4a2fc48fb9d7bc6f1bbb5bd4a))


### Chores

* format all `api.md` files ([28a0eb5](https://github.com/anthropics/anthropic-sdk-python/commit/28a0eb55c031a9ed584eafe7f9096b32f9883e6f))
* **internal:** bump dependencies ([99f3014](https://github.com/anthropics/anthropic-sdk-python/commit/99f301460a3933229768d19fa7ae725072012592))
* **internal:** fix lint error on Python 3.14 ([a90d71b](https://github.com/anthropics/anthropic-sdk-python/commit/a90d71bfcdef5592f0f7f9a176cf347163ee2137))


### Refactors

* **vertex:** remove redundant isinstance check in `load_auth` ([#1387](https://github.com/anthropics/anthropic-sdk-python/issues/1387)) ([6b7a7dc](https://github.com/anthropics/anthropic-sdk-python/commit/6b7a7dce065b7bfbf6c5d8ed41825f36b36fc402))

## 0.79.0 (2026-02-07)

Full Changelog: [v0.78.0...v0.79.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.78.0...v0.79.0)
Expand Down
69 changes: 69 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ Types:
from anthropic.types import (
Base64ImageSource,
Base64PDFSource,
BashCodeExecutionOutputBlock,
BashCodeExecutionOutputBlockParam,
BashCodeExecutionResultBlock,
BashCodeExecutionResultBlockParam,
BashCodeExecutionToolResultBlock,
BashCodeExecutionToolResultBlockParam,
BashCodeExecutionToolResultError,
BashCodeExecutionToolResultErrorCode,
BashCodeExecutionToolResultErrorParam,
CacheControlEphemeral,
CacheCreation,
CitationCharLocation,
Expand All @@ -34,18 +43,40 @@ from anthropic.types import (
CitationPageLocationParam,
CitationSearchResultLocationParam,
CitationWebSearchResultLocationParam,
CitationsConfig,
CitationsConfigParam,
CitationsDelta,
CitationsSearchResultLocation,
CitationsWebSearchResultLocation,
CodeExecutionOutputBlock,
CodeExecutionOutputBlockParam,
CodeExecutionResultBlock,
CodeExecutionResultBlockParam,
CodeExecutionTool20250522,
CodeExecutionTool20250825,
CodeExecutionToolResultBlock,
CodeExecutionToolResultBlockContent,
CodeExecutionToolResultBlockParam,
CodeExecutionToolResultBlockParamContent,
CodeExecutionToolResultError,
CodeExecutionToolResultErrorCode,
CodeExecutionToolResultErrorParam,
Container,
ContainerUploadBlock,
ContainerUploadBlockParam,
ContentBlock,
ContentBlockParam,
ContentBlockSource,
ContentBlockSourceContent,
DirectCaller,
DocumentBlock,
DocumentBlockParam,
EncryptedCodeExecutionResultBlock,
EncryptedCodeExecutionResultBlockParam,
ImageBlockParam,
InputJSONDelta,
JSONOutputFormat,
MemoryTool20250818,
Message,
MessageCountTokensTool,
MessageDeltaUsage,
Expand All @@ -66,6 +97,7 @@ from anthropic.types import (
RedactedThinkingBlock,
RedactedThinkingBlockParam,
SearchResultBlockParam,
ServerToolCaller,
ServerToolUsage,
ServerToolUseBlock,
ServerToolUseBlockParam,
Expand All @@ -76,6 +108,17 @@ from anthropic.types import (
TextCitation,
TextCitationParam,
TextDelta,
TextEditorCodeExecutionCreateResultBlock,
TextEditorCodeExecutionCreateResultBlockParam,
TextEditorCodeExecutionStrReplaceResultBlock,
TextEditorCodeExecutionStrReplaceResultBlockParam,
TextEditorCodeExecutionToolResultBlock,
TextEditorCodeExecutionToolResultBlockParam,
TextEditorCodeExecutionToolResultError,
TextEditorCodeExecutionToolResultErrorCode,
TextEditorCodeExecutionToolResultErrorParam,
TextEditorCodeExecutionViewResultBlock,
TextEditorCodeExecutionViewResultBlockParam,
ThinkingBlock,
ThinkingBlockParam,
ThinkingConfigAdaptive,
Expand All @@ -90,7 +133,18 @@ from anthropic.types import (
ToolChoiceAuto,
ToolChoiceNone,
ToolChoiceTool,
ToolReferenceBlock,
ToolReferenceBlockParam,
ToolResultBlockParam,
ToolSearchToolBm25_20251119,
ToolSearchToolRegex20251119,
ToolSearchToolResultBlock,
ToolSearchToolResultBlockParam,
ToolSearchToolResultError,
ToolSearchToolResultErrorCode,
ToolSearchToolResultErrorParam,
ToolSearchToolSearchResultBlock,
ToolSearchToolSearchResultBlockParam,
ToolTextEditor20250124,
ToolTextEditor20250429,
ToolTextEditor20250728,
Expand All @@ -100,6 +154,14 @@ from anthropic.types import (
URLImageSource,
URLPDFSource,
Usage,
WebFetchBlock,
WebFetchBlockParam,
WebFetchTool20250910,
WebFetchToolResultBlock,
WebFetchToolResultBlockParam,
WebFetchToolResultErrorBlock,
WebFetchToolResultErrorBlockParam,
WebFetchToolResultErrorCode,
WebSearchResultBlock,
WebSearchResultBlockParam,
WebSearchTool20250305,
Expand Down Expand Up @@ -241,6 +303,7 @@ from anthropic.types.beta import (
BetaCodeExecutionResultBlockParam,
BetaCodeExecutionTool20250522,
BetaCodeExecutionTool20250825,
BetaCodeExecutionTool20260120,
BetaCodeExecutionToolResultBlock,
BetaCodeExecutionToolResultBlockContent,
BetaCodeExecutionToolResultBlockParam,
Expand All @@ -266,6 +329,8 @@ from anthropic.types.beta import (
BetaCountTokensContextManagementResponse,
BetaDirectCaller,
BetaDocumentBlock,
BetaEncryptedCodeExecutionResultBlock,
BetaEncryptedCodeExecutionResultBlockParam,
BetaFileDocumentSource,
BetaFileImageSource,
BetaImageBlockParam,
Expand Down Expand Up @@ -312,6 +377,7 @@ from anthropic.types.beta import (
BetaRequestMCPToolResultBlockParam,
BetaSearchResultBlockParam,
BetaServerToolCaller,
BetaServerToolCaller20260120,
BetaServerToolUsage,
BetaServerToolUseBlock,
BetaServerToolUseBlockParam,
Expand Down Expand Up @@ -376,9 +442,11 @@ from anthropic.types.beta import (
BetaURLImageSource,
BetaURLPDFSource,
BetaUsage,
BetaUserLocation,
BetaWebFetchBlock,
BetaWebFetchBlockParam,
BetaWebFetchTool20250910,
BetaWebFetchTool20260209,
BetaWebFetchToolResultBlock,
BetaWebFetchToolResultBlockParam,
BetaWebFetchToolResultErrorBlock,
Expand All @@ -387,6 +455,7 @@ from anthropic.types.beta import (
BetaWebSearchResultBlock,
BetaWebSearchResultBlockParam,
BetaWebSearchTool20250305,
BetaWebSearchTool20260209,
BetaWebSearchToolRequestError,
BetaWebSearchToolResultBlock,
BetaWebSearchToolResultBlockContent,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "anthropic"
version = "0.79.0"
version = "0.80.0"
description = "The official Python library for the anthropic API"
dynamic = ["readme"]
license = "MIT"
Expand Down
28 changes: 14 additions & 14 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
-e .
annotated-types==0.7.0
# via pydantic
anyio==4.12.0
anyio==4.12.1
# via
# anthropic
# httpx
asttokens==3.0.1
# via inline-snapshot
backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
# via pytest-asyncio
boto3-stubs==1.41.5
botocore-stubs==1.41.6
boto3-stubs==1.42.44
botocore-stubs==1.42.41
# via boto3-stubs
certifi==2025.11.12
certifi==2026.1.4
# via
# httpcore
# httpx
Expand Down Expand Up @@ -49,13 +49,13 @@ idna==3.11
# via
# anyio
# httpx
importlib-metadata==8.7.0
importlib-metadata==8.7.1
iniconfig==2.1.0 ; python_full_version < '3.10'
# via pytest
iniconfig==2.3.0 ; python_full_version >= '3.10'
# via pytest
inline-snapshot==0.31.1
jiter==0.12.0
jiter==0.13.0
# via anthropic
markdown-it-py==3.0.0 ; python_full_version < '3.10'
# via rich
Expand All @@ -66,11 +66,11 @@ mdurl==0.1.2
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
nodeenv==1.9.1
nodeenv==1.10.0
# via pyright
packaging==25.0
# via pytest
pathspec==0.12.1
pathspec==1.0.3
# via mypy
pluggy==1.6.0
# via pytest
Expand All @@ -88,7 +88,7 @@ pytest==8.4.2 ; python_full_version < '3.10'
# inline-snapshot
# pytest-asyncio
# pytest-xdist
pytest==9.0.1 ; python_full_version >= '3.10'
pytest==9.0.2 ; python_full_version >= '3.10'
# via
# inline-snapshot
# pytest-asyncio
Expand All @@ -101,21 +101,21 @@ python-dateutil==2.9.0.post0 ; python_full_version < '3.10'
respx==0.22.0
rich==14.2.0
# via inline-snapshot
ruff==0.14.7
ruff==0.14.13
six==1.17.0 ; python_full_version < '3.10'
# via python-dateutil
sniffio==1.3.1
# via anthropic
time-machine==2.19.0 ; python_full_version < '3.10'
time-machine==3.1.0 ; python_full_version >= '3.10'
tomli==2.3.0 ; python_full_version < '3.11'
time-machine==3.2.0 ; python_full_version >= '3.10'
tomli==2.4.0 ; python_full_version < '3.11'
# via
# inline-snapshot
# mypy
# pytest
types-awscrt==0.29.1
types-awscrt==0.31.1
# via botocore-stubs
types-s3transfer==0.15.0
types-s3transfer==0.16.0
# via boto3-stubs
typing-extensions==4.15.0
# via
Expand Down
2 changes: 1 addition & 1 deletion scripts/format
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ uv run ruff check --fix .
uv run ruff format

echo "==> Formatting docs"
uv run python scripts/utils/ruffen-docs.py README.md api.md
uv run python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)
2 changes: 1 addition & 1 deletion src/anthropic/_utils/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool:
else:
import types

return tp is Union or tp is types.UnionType
return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap]


def is_typeddict(tp: Type[Any]) -> bool:
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.79.0" # x-release-please-version
__version__ = "0.80.0" # x-release-please-version
3 changes: 0 additions & 3 deletions src/anthropic/lib/vertex/_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ def load_auth(*, project_id: str | None) -> tuple[Credentials, str]:
if not project_id:
raise ValueError("Could not resolve project_id")

if not isinstance(project_id, str):
raise TypeError(f"Expected project_id to be a str but got {type(project_id)}")

return credentials, project_id


Expand Down
Loading
Loading