Before changedapi/migration-2026-10-21
Nearest release: v2.1.318, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+11added
Lines−1removed
From line
6
where the diff opens
First seen
23 Oct 2026
this site's first read of the page
Recorded edits5to this page, all time
The whole hunk
from line 6, old and new numbered
/
from line 6
66
77This guide lists the code changes for moving from API version `2023-06-01` to `2026-10-21`. The [upgrade steps](https://platform.claude.com/docs/en/api/migration-2026-10-21#migration-checklist) say what to do, in order.
88
9The easiest way to upgrade your code
10
11```text
12/claude-api api-version
13```
14
915## Upgrade steps
1016
1117<Steps>
from line 63
5763
5864 <Tab title="C#">
5965 Upgrade the `Anthropic` package to version 13.0.0.
66
67 Version 1.0.0 of `Anthropic.Bedrock`, `Anthropic.Vertex`, `Anthropic.Foundry`, `Anthropic.Aws`, `Anthropic.GoogleCloud`, and `Anthropic.Mcp` needs version 13.0.0 of `Anthropic`. If you use one of them, move it to 1.0.0 in the same upgrade. An earlier version still installs next to 13.0.0, but it can fail when it runs.
6068 </Tab>
6169
6270 <Tab title="Go">
from line 73
6573
6674 <Tab title="Java">
6775 Upgrade the `com.anthropic:anthropic-java` artifact to version 3.0.0.
76
77 Version 3.0.0 of `anthropic-java-bedrock`, `anthropic-java-vertex`, `anthropic-java-aws`, `anthropic-java-foundry`, `anthropic-java-google-cloud`, and `anthropic-java-mcp` goes with `anthropic-java` 3.0.0. If you use one of them, move it to 3.0.0 in the same upgrade.
6878 </Tab>
6979
7080 <Tab title="PHP">
from line 1182
11721182 <Tab title="Ruby">
11731183 The credential arguments of `Anthropic::Client.new` are `api_key:`, `auth_token:`, `credentials:`, and `config:`. A `nil` argument counts as not passed. The platform clients keep their own rules.
11741184
1175 * **Two or more passed:** `Anthropic::Client.new` raises `ArgumentError`. Earlier versions raised only for `credentials:` with `config:`, and otherwise sent the key if there was one, then the token.
1185 * **Two or more passed:** `Anthropic::Client.new` raises `ArgumentError`. Earlier versions raised only for `credentials:` with `config:`, and otherwise sent the key if there was one, or the token if not.
11761186 * **One passed:** The client uses it, and does not fall back to a credential from the environment or from a profile on disk.
11771187 * **None passed:** The client uses the first of these it finds: `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_PROFILE`, the workload identity federation variables, the active profile on disk. The order has not changed, but with both `ANTHROPIC_API_KEY` and `ANTHROPIC_AUTH_TOKEN` set, `client.auth_token` is now `nil`. An empty `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` now counts as unset, where earlier versions let an empty `ANTHROPIC_API_KEY` hide the token and everything after it.
11781188
No line in this hunk matches that.