anthropic-ai/sdk
Anthropic PHP SDK
v0.43.0
1.2M downloads/mo
#1150 most downloaded on Packagist
anthropics/anthropic-sdk-php
What this package is like to depend on
Last release 3 days ago
20 Aug 2026
Ships on a steady schedule
a new release about every 1 weeks
Nearly every release is documented
notes for 48 of 48 stable releases
Nothing withdrawn
no release was ever pulled
12 months old
48 releases · first in 2025
46 releases in the last 12 months
see the full history below
Release timeline
48 releases · Aug 2025 to Aug 2026Releases
latest 48-
v0.43.020 Aug 2026Release notes
Open source →0.43.0 (2026-08-20)
Full Changelog: v0.42.0...v0.43.0
Features
- api: add input_transformations to beta message responses; default to the user-profiles-2026-08-18 beta (dc61a98)
- api: add support for message threads (beta) (9b3febc)
- api: add tool configuration for Managed Agents toolsets (a163631)
- api: additions to files and memory stores (c84d91b)
- api: Files and Skills APIs are now GA; add computer use and browser use toolsets (eccbd6c)
Bug Fixes
- api: remove unsupported mid_conv_system content block (d0940d2)
- bedrock,foundry: follow MessageCreateParamsContainer rename in restricted services (#170) (#188) (e2d278b)
- bedrock,vertex: preserve encoded query params (#178) (#187) (8623ab9)
- client: do not send schema defaults for omitted optional params (070d76b)
- tool-runner: forward the server-assigned container on follow-up requests (#160) (0a9497c)
- tool-runner: stop on refusal instead of executing tools (#144) (70040a2)
Chores
- api: expose Managed Agents per-tool config types at top level (2a50464)
- api: share the computer use and browser use toolset config models (dc61a98)
- deps: bump mcp/sdk dev dependency (f436e41)
- use model enum constants in generated examples and tests (e72da8b)
Documentation
Release notes
Open source →Full Changelog: v0.42.0...v0.43.0
Features
- api: add input_transformations to beta message responses; default to the user-profiles-2026-08-18 beta (dc61a98)
- api: add support for message threads (beta) (9b3febc)
- api: add tool configuration for Managed Agents toolsets (a163631)
- api: additions to files and memory stores (c84d91b)
- api: Files and Skills APIs are now GA; add computer use and browser use toolsets (eccbd6c)
Bug Fixes
- api: remove unsupported mid_conv_system content block (d0940d2)
- bedrock,foundry: follow MessageCreateParamsContainer rename in restricted services (#170) (#188) (e2d278b)
- bedrock,vertex: preserve encoded query params (#178) (#187) (8623ab9)
- client: do not send schema defaults for omitted optional params (070d76b)
- tool-runner: forward the server-assigned container on follow-up requests (#160) (0a9497c)
- tool-runner: stop on refusal instead of executing tools (#144) (70040a2)
Chores
- api: expose Managed Agents per-tool config types at top level (2a50464)
- api: share the computer use and browser use toolset config models (dc61a98)
- deps: bump mcp/sdk dev dependency (f436e41)
- use model enum constants in generated examples and tests (e72da8b)
Documentation
-
v0.42.013 Aug 2026Release notes
Open source →0.42.0 (2026-08-13)
Full Changelog: v0.41.0...v0.42.0
Features
- api: add output_behavior to dream creation (create a new memory store or update the input store in place) (3def5a2)
Bug Fixes
- client: add models (2a6eebf)
- streaming: apply all message_delta fields when accumulating streamed messages (#140) (4fff7e7)
Documentation
- api: clarify that user profile name is optional for resold profiles (87420c9)
Release notes
Open source →Full Changelog: v0.41.0...v0.42.0
Features
- api: add output_behavior to dream creation (create a new memory store or update the input store in place) (3def5a2)
Bug Fixes
- client: add models (2a6eebf)
- streaming: apply all message_delta fields when accumulating streamed messages (#140) (4fff7e7)
Documentation
- api: clarify that user profile name is optional for resold profiles (87420c9)
-
v0.41.006 Aug 2026Release notes
Open source →0.41.0 (2026-08-06)
Full Changelog: v0.40.0...v0.41.0
Features
- api: add
mid-conversation-tool-changes-2026-07-01beta (6cdad3e) - api: add support for session budgets, advisor tool, pinned inference location and skills auto-loading from GitHub (37531b2)
Bug Fixes
- client: improve http-discovery error message (3be4d22)
Chores
Release notes
Open source →Full Changelog: v0.40.0...v0.41.0
Features
- api: add
mid-conversation-tool-changes-2026-07-01beta (6cdad3e) - api: add support for session budgets, advisor tool, pinned inference location and skills auto-loading from GitHub (37531b2)
Bug Fixes
- client: improve http-discovery error message (3be4d22)
Chores
- api: add
-
v0.40.024 Jul 2026 -
v0.39.023 Jul 2026Release notes
Open source →0.39.0 (2026-07-23)
Full Changelog: v0.38.0...v0.39.0
Features
- api: add new stop reason 'model_context_window_exceeded' (2b0fedf)
Release notes
Open source →Full Changelog: v0.38.0...v0.39.0
Features
- api: add new stop reason 'model_context_window_exceeded' (2b0fedf)
-
v0.38.022 Jul 2026Release notes
Open source →0.38.0 (2026-07-22)
Full Changelog: v0.37.1...v0.38.0
Features
- api: add support for Managed Agents model effort, initial session events, and threads delta streaming (c39866c)
Release notes
Open source →Full Changelog: v0.37.1...v0.38.0
Features
- api: add support for Managed Agents model effort, initial session events, and threads delta streaming (c39866c)
-
v0.37.121 Jul 2026 -
v0.37.016 Jul 2026Release notes
Open source →0.37.0 (2026-07-16)
Full Changelog: v0.36.0...v0.37.0
Features
- api: add support for dreaming (68645d3)
- api: add support for MCP Tunnels (2214a96)
- helpers: add session delta accumulator for agent.message previews (#94) (52a6a82)
Chores
Release notes
Open source →Full Changelog: v0.36.0...v0.37.0
Features
- api: add support for dreaming (68645d3)
- api: add support for MCP Tunnels (2214a96)
- helpers: add session delta accumulator for agent.message previews (#94) (52a6a82)
Chores
-
v0.36.002 Jul 2026Release notes
Open source →0.36.0 (2026-07-02)
Full Changelog: v0.35.1...v0.36.0
Features
- api: add agent-memory-2026-07-22 beta header (96ec8ca)
Release notes
Open source → -
v0.35.101 Jul 2026Release notes
Open source →0.35.1 (2026-07-01)
Full Changelog: v0.35.0...v0.35.1
Chores
- api: remove some nonfunctional types from the SDKs (3750760)
Release notes
Open source →Full Changelog: v0.35.0...v0.35.1
Chores
- api: remove some nonfunctional types from the SDKs (3750760)
-
v0.35.001 Jul 2026 -
v0.34.030 Jun 2026 -
v0.33.030 Jun 2026Release notes
Open source → -
v0.32.029 Jun 2026Release notes
Open source →Full Changelog: v0.31.0...v0.32.0
Features
- api: add support for 20260318 web fetch and support tools (7656043)
Bug Fixes
Chores
-
v0.31.024 Jun 2026Release notes
Open source →Full Changelog: v0.30.0...v0.31.0
Features
- client: add support for system.message streaming events (a665f06)
- helpers: single source for x-stainless-helper + tag the BetaToolRunner (#63) (ba6ce02)
Bug Fixes
Chores
-
v0.30.018 Jun 2026Release notes
Open source →Full Changelog: v0.29.2...v0.30.0
Features
- api: add support for new code_execution_20260120 tool (08d80b7)
- client: request middleware (#35) (0a05e5c)
Bug Fixes
- client: merge extraBodyParams into the request body (#53) (08035a9)
- client: preserve client-level options over request-level defaults (a8c61c4)
- Merge extraBodyParams into the body with the same precedence as extraHeaders (extras win on collision). Lives in Util::mergeBody because the body at that layer is one of four shapes (assoc array, stdClass, list, null) and only map-shaped bodies are merged into; lists and scalars pass through. Five unit tests pin the shape matrix. (08035a9)
- streaming: return error statuses instead of throwing (4e1d617)
- vertex: do not send stream: false (c38340e)
Chores
- client: add early return when no extraBody is specified (d79eb94)
-
v0.29.215 Jun 2026Release notes
Open source → -
v0.29.109 Jun 2026Release notes
Open source → -
v0.29.009 Jun 2026Release notes
Open source →Full Changelog: v0.28.0...v0.29.0
Features
- api: add support for Managed Agents deployments and environment variable credentials (211a580)
-
v0.28.009 Jun 2026Release notes
Open source →Full Changelog: v0.27.0...v0.28.0
Features
- api: add support for claude-mythos-5 and claude-fable-5, with support for server-side fallbacks on refusal (e10ba6f)
-
v0.27.006 Jun 2026Release notes
Open source → -
v0.26.005 Jun 2026Release notes
Open source →Full Changelog: v0.25.0...v0.26.0
Features
- api: mark Claude Opus 4.1 as deprecated (a9ddf0b)
Chores
Documentation
-
v0.25.028 May 2026Release notes
Open source →Full Changelog: v0.24.0...v0.25.0
Features
- api: Add support for claude-opus-4-8, mid-conversation system blocks, and usage.output_tokens_details (80e5ce5)
Documentation
- replace literal newlines (6a98894)
-
v0.24.021 May 2026Release notes
Open source →Full Changelog: v0.23.0...v0.24.0
Features
- api: Add support for thinking-token-count beta for estimated tokens in thinking block deltas when streaming (2bbd614)
-
v0.23.019 May 2026Release notes
Open source →Full Changelog: v0.22.0...v0.23.0
Features
- client: Add support for self-hosted sandboxes in CMA with sandbox helpers (974eb58)
-
v0.22.013 May 2026Release notes
Open source →Full Changelog: v0.21.0...v0.22.0
Features
- api: Add BetaManagedAgentsSearchResultBlock types (f29c016)
- api: Add support for cache diagnostics beta (c47486d)
Bug Fixes
- guzzle requires special handling to enable streaming (248a5aa)
Chores
-
v0.21.011 May 2026Release notes
Open source →Full Changelog: v0.20.0...v0.21.0
Features
- aws: Add AWS client for Claude Platform on AWS (c56e7ad)
Bug Fixes
- client: address bug with PageCursor not advancing past first page (#613) (6e9982f)
- client: prevent betas request param being silently overridden by per-endpoint extraHeaders default (#615) (cacb6da)
Chores
-
v0.20.006 May 2026Release notes
Open source →Full Changelog: v0.19.0...v0.20.0
Features
- api: add support for Managed Agents multiagents and outcomes, webhooks, vault validation (99047bc)
Bug Fixes
- api: Adjust webhook configuration (9b0bd4f)
-
v0.19.005 May 2026Release notes
Open source →Full Changelog: v0.18.0...v0.19.0
Features
- client: allow targeting a workspace for OIDC federation token exchange (77eaa4d)
-
v0.18.004 May 2026 -
v0.17.127 Apr 2026Release notes
Open source →Full Changelog: v0.17.0...v0.17.1
Bug Fixes
- revert enum parsing change that lead to unconditional failure (94a3363)
-
v0.17.023 Apr 2026Release notes
Open source →Full Changelog: v0.16.0...v0.17.0
Features
- api: CMA Memory public beta (b313ec0)
Bug Fixes
- api: fix errors in api spec (a4e0699)
- api: restore missing features (34e585e)
- client: resolve serialization issue with unions and enums (c9795cd)
- populate enum-typed properties with enum instances (6c0d3de)
Chores
- tests: bump steady to v0.22.1 (fe9a8f0)
-
v0.16.016 Apr 2026Release notes
Open source →Full Changelog: v0.15.0...v0.16.0
Features
- api: add claude-opus-4-7, token budgets and user_profiles (88f42ab)
-
v0.15.014 Apr 2026Release notes
Open source →Full Changelog: v0.14.0...v0.15.0
Features
Bug Fixes
- lint: remove dead code flagged by PHPStan 2.1.47 (#534) (0393a38)
- streaming: add missing events (e06bf16)
Chores
-
v0.14.010 Apr 2026Release notes
Open source →Full Changelog: v0.13.0...v0.14.0
Features
Bug Fixes
- client: properly generate file params (3866f0e)
Documentation
-
v0.13.009 Apr 2026Release notes
Open source → -
v0.12.008 Apr 2026Release notes
Open source → -
v0.11.007 Apr 2026Release notes
Open source → -
v0.10.007 Apr 2026Release notes
Open source →Full Changelog: v0.9.0...v0.10.0
Features
- api: Add support for claude-mythos-preview (140ef63)
- vertex: add support for US multi-region endpoint (347a703)
Chores
- client: internal updates (553ec56)
-
v0.9.001 Apr 2026Release notes
Open source →Full Changelog: v0.8.0...v0.9.0
Features
- add error type field to APIStatusException (#457) (c889d8e)
- api: add structured stop_details to message responses (80151ce)
- prepare aws package (#471) (de64488)
- support API key auth in Bedrock (#490) (ee2528d)
Bug Fixes
Chores
- internal: update multipart form array serialization (12b1028)
- tests: bump steady to v0.19.4 (f257675)
- tests: bump steady to v0.19.5 (dea677e)
- tests: bump steady to v0.19.6 (c708ab5)
- tests: bump steady to v0.19.7 (88d31c8)
- tests: bump steady to v0.20.1 (e9324d3)
- tests: bump steady to v0.20.2 (0f9de36)
-
v0.8.018 Mar 2026Release notes
Open source → -
v0.7.016 Mar 2026Release notes
Open source →Full Changelog: v0.6.0...v0.7.0
Features
- add beta tool runner (#324) (57a3df6)
- add structured output helpers for messages (#302) (a8685fc)
- api: chore(config): clean up model enum list (#31) (c9b776b)
- api: GA thinking-display-setting (00fc5a5)
- tests: update mock server (97fdd5b)
Bug Fixes
- client: update thinking config from enabled to adaptive and remove budgetTokens (#401) (12e8e41)
- remove broken methods (13776b6)
- restore x-release-please-start-version markers in README (#320) (1052efc)
Chores
-
v0.6.019 Feb 2026Release notes
Open source →Full Changelog: v0.5.0...v0.6.0
Features
- add Bedrock client (#273) (cf8b733)
- add Foundry client (#307) (8ccd093)
- add Vertex client (#264) (d7d87ad)
- api: add support for speed mode (955855c)
- api: Add top-level cache control (automatic caching) (b98536b)
- api: fix shared UserLocation and error code types (db15b55)
- api: manual updates (3ce2054)
- api: Release Claude Opus 4.6, adaptive thinking, and other features (439fcf8)
- api: Releasing claude-sonnet-4-6 (78fda97)
- use
$_ENVaware getenv helper (c40668b) - warn when thinking is enabled for certain models (#305) (e306169)
Bug Fixes
- add backward-compat class_alias stubs for renamed UserLocation and ErrorCode types (#319) (e470d01)
- add type declaration to avoid lint error (#311) (2b8765d)
- api: fix spec errors (f57e850)
- ci: use correct GitHub URL for Packagist notification (#14) (ef0a1dc)
Chores
- add exception message to
Util::getenv()and add tests (#309) (451a3d4) - add usage sections for the Bedrock and Vertex clients (#303) (a8b5419)
- ci: Remove claude code review (#17) (df06300)
- client: update model name (dac28a0)
- integrate latest API updates into Bedrock and Vertex clients (#308) (0f33eec)
- internal: php cs fixer should not be memory limited (cbc55ad)
- update mock server docs (13e0170)
Documentation
-
v0.5.030 Jan 2026Release notes
Open source →Full Changelog: v0.4.0...v0.5.0
⚠ BREAKING CHANGES
- replace special flag type
omittablewith justnull - use camel casing for all class properties
Features
- add
BaseResponseclass for accessing raw responses (b803fb8) - add idempotency header support (113b79f)
- add setters to constant parameters (a476273)
- allow both model class instances and arrays in setters (71aa7fc)
- api: add support for Structured Outputs in the Messages API (9fd43ce)
- api: migrate sending message format in output_config rather than output_format (d334157)
- better support for pagination mechanisms (829ee6e)
- improved phpstan type annotations (cc981bb)
- replace special flag type
omittablewith justnull(e1137de) - simplify and make the phpstan types more consistent (9f536fe)
- split out services into normal & raw types (5ba5dbf)
- support unwrapping envelopes (0ed53db)
- use camel casing for all class properties (90f0805)
Bug Fixes
- a number of serialization errors (e318451)
- correctly serialize dates (af8260d)
- support arrays in query param construction (779413f)
- typos in README.md (cb61dee)
Chores
- add git attributes and composer lock file (006c7c2)
- be more targeted in suppressing superfluous linter warnings (4b8cbf5)
- ci: Add Claude Code GitHub Workflow (#240) (4fd215b)
- ensure constant values are marked as optional in array types (66cf88c)
- formatting (5878c16)
- internal: add a basic client test (8835b21)
- internal: codegen related update (1c218af)
- internal: codegen related update (7240372)
- internal: codegen related update (9557a1c)
- internal: codegen related update (a8a13ec)
- internal: codegen related update (e2bebf6)
- internal: codegen related update (213c670)
- internal: codegen related update (2d460ff)
- internal: codegen related update (6087933)
- internal: codegen related update (3e5e21a)
- internal: codegen related update (ee26b2b)
- internal: codegen related update (b3411dd)
- internal: codegen related update (e98bd62)
- internal: codegen related update (94d88c4)
- internal: ignore stainless-internal artifacts (b144935)
- internal: improve pagination tests (94f8bc8)
- internal: minor test script reformatting (e27d068)
- internal: refactor auth by moving concern from base client into client (af7b192)
- internal: update
actions/checkoutversion (212b762) - internal: update phpstan comments (f0f7ddf)
- readme: remove beta warning now that we're in ga (ca60a4b)
- support jsonl streaming (b350cbc)
- switch from
#[Api(optional: true|false)]to#[Required]|#[Optional]for annotations (f938919) - update examples (eef6daf)
- use
$self = clone $this;instead of$obj = clone $this;(1607f76) - use non-trivial test assertions (c223976)
- use single quote strings (441785c)
- replace special flag type
-
v0.4.024 Nov 2025Release notes
Open source →Full Changelog: v0.3.0...v0.4.0
⚠ BREAKING CHANGES
- client: redesign methods
- remove confusing
toArray()alias to__serialize()in favour oftoProperties() - expose services and service contracts
Features
- api: add ability to clear thinking in context management (99617c4)
- api: add support for structured outputs beta (b3c80f7)
- api: adding support for agent skills (471dd50)
- api: adds support for Claude Opus 4.5, Effort, Advance Tool Use Features, Autocompaction, and Computer Use v5 (1e73c3d)
- api: adds support for Claude Sonnet 4.5 and context management features (74e2d73)
- api: adds support for Documents in tool results (f98a2d4)
- api: adds support for web_fetch_20250910 tool (6159be3)
- api: manual updates (bc265c5)
- client: add raw methods (64d6f33)
- client: redesign methods (b00b0d8)
- client: support raw responses (1c8b9ee)
- client: use real enums (29faa11)
- expose services and service contracts (2c99ab5)
- remove confusing
toArray()alias to__serialize()in favour oftoProperties()(d12c426)
Bug Fixes
- ci: release doctor workflow (215237e)
- decorate with enum label for all enum classes (e3c3890)
- ensure auth methods return non-nullable arrays (bb1ed82)
- inverted retry condition (300bcf1)
- phpStan linter errors (02fce13)
Chores
- add license (00cc634)
- api: mark older sonnet models as deprecated (76fdfa8)
- cleanup streaming (26d89eb)
- client: add context-management-2025-06-27 beta header (276d908)
- client: add model-context-window-exceeded-2025-08-26 beta header (1ab3668)
- client: send metadata headers (cd895d4)
- docs: update readme formatting (041acbb)
- document parameter object usage (47d4c9b)
- fix lints in UnionOf (b57e2c7)
- internal: codegen related update (46489b1)
- internal: codegen related update (2859486)
- internal: fix tests (bc714d4)
- internal: refactor base client internals (08252f7)
- make more targeted phpstan ignores (00a1680)
- refactor methods (1d7489e)
- update examples (#191) (5c3819a)
- use pascal case for phpstan typedefs (034b6b0)
-
v0.3.002 Sep 2025Release notes
Open source →Full Changelog: v0.2.0...v0.3.0
⚠ BREAKING CHANGES
- use builders for RequestOptions
Features
- client: adds support for code-execution-2025-08-26 tool (99a5428)
- expose streams and pages in the public namespace (41382e4)
- use builders for RequestOptions (fd0c23a)
Bug Fixes
- remove inaccurate
licensefield in composer.json (5296a0d)
Chores
-
v0.2.027 Aug 2025Release notes
Open source →Full Changelog: v0.1.0...v0.2.0
⚠ BREAKING CHANGES
- rename errors to exceptions
Features
- rename errors to exceptions (8bbf53a)
Bug Fixes
- add create release workflow (6455528)
Chores
-
v0.1.026 Aug 2025Release notes
Open source →Full Changelog: v0.0.1...v0.1.0
Features
- ensure
->toArray()benefits from structural typing (0758217)
Chores
- ensure