Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20261023T000722Z

139 pages moved out of 812 read.

Pages moved 139 significant first
Pages read 812 in this capture
Captured 00:07 UTC
Corpus hash b5a82bae26cf index-hash

What this read moved

76-100 of 139, page 4 of 6

This capture is too large to show at once. Changes 76-100 of 139 are below, significant first; the rest are on the following screens.

manage-claude/wif-providers/spiffe Changed · +5 / -5 lines

from line 298
298298 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
299299 
300300 var message = client.messages().create(MessageCreateParams.builder()
301 .model(Model.CLAUDE_OPUS_5_5)
302 .maxTokens(1024)
303 .addUserMessage("Hello, Claude")
304 .build());
301 .model(Model.CLAUDE_OPUS_5_5)
302 .maxTokens(1024)
303 .addUserMessage("Hello, Claude")
304 .build());
305305 
306306 IO.println(message.content());
307307 ```
from line 460
460460 | jq -rR 'split(".")[1] | gsub("-";"+") | gsub("_";"/") | @base64d | fromjson'
461461```
462462 
463The `-output json` flag returns the SVID response and bundle response as a two-element JSON array, so `jq -r '.[0].svids[0].svid'` extracts the bare token. On older SPIRE versions without `-output`, the command prints a labeled block instead. In that case, pipe the default output through `awk '/^[[:space:]]*eyJ/{print $1; exit}'` to extract the token line. Check that `iss` is the OIDC Discovery Provider URL you registered, `sub` is the workload's SPIFFE ID, and `aud` contains `https://api.anthropic.com`. Then run the cURL example from [Acquire and use the token](https://platform.claude.com/docs/en/manage-claude/wif-providers/spiffe#acquire-and-use-the-token). A successful exchange returns an `access_token` beginning with `sk-ant-oat01-`. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange). The most common SPIRE-side cause is a mismatch between SPIRE Server's `jwt_issuer` and the URL registered as the federation issuer.
463The `-output json` flag returns the SVID response and bundle response as a two-element JSON array, so `jq -r '.[0].svids[0].svid'` extracts the bare token. On older SPIRE versions without `-output`, the command prints a labeled block instead. In that case, pipe the default output through `awk '/^[[:space:]]*eyJ/{print $1; exit}'` to extract the token line. Check that `iss` is the OIDC Discovery Provider URL you registered, `sub` is the workload's SPIFFE ID, and `aud` contains `https://api.anthropic.com`. Then run the cURL example from [Acquire and use the token](https://platform.claude.com/docs/en/manage-claude/wif-providers/spiffe#acquire-and-use-the-token). A successful exchange returns an `access_token` starting with `sk-ant-oat01-`. If the exchange fails with the opaque `401` `authentication_error` response (message `Authentication failed`), check the [authentication history page](https://platform.claude.com/settings/workload-identity-federation?tab=history) in the Claude Console for the deny reason and see [Troubleshoot a failed exchange](https://platform.claude.com/docs/en/manage-claude/wif-reference#troubleshoot-a-failed-exchange). The most common SPIRE-side cause is a mismatch between SPIRE Server's `jwt_issuer` and the URL registered as the federation issuer.
464464 
465465## Scope your rule
466466 

manage-claude/workload-identity-federation Changed · +70 / -70 lines

from line 188
188188 }
189189 ```
190190 
191 ```csharp C#
192 using Anthropic.Credentials;
193 // ...
194 
195 var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions
196 {
197 FederationRuleId = "fdrl_...",
198 OrganizationId = "00000000-0000-0000-0000-000000000000",
199 ServiceAccountId = "svac_...",
200 WorkspaceId = "wrkspc_...",
201 IdentityTokenProvider = new FileIdentityTokenProvider("/var/run/secrets/anthropic.com/token"),
202 });
203 using var client = new AnthropicClient(new ClientOptions { Credentials = credentials });
204 
205 var message = await client.Messages.Create(new()
206 {
207 Model = Model.ClaudeOpus5_5,
208 MaxTokens = 1024,
209 Messages = [new UserMessageParam { Content = "Hello, Claude" }],
210 });
211 foreach (var block in message.Content)
212 {
213 if (block.Value is TextBlock textBlock)
214 {
215 Console.WriteLine(textBlock.Text);
216 }
217 }
218 ```
219 
191220 ```go Go
192221 client := anthropic.NewClient(
193222 option.WithFederationTokenProvider(
from line 261
232261 
233262 void main() {
234263 AnthropicClient client = AnthropicOkHttpClient.builder()
235 .fromEnv()
236 .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder()
237 .organizationId("00000000-0000-0000-0000-000000000000")
238 .workspaceId("wrkspc_...")
239 .authentication(AuthenticationConfig.builder()
240 .type(AuthenticationType.OIDC_FEDERATION)
241 .federationRuleId("fdrl_...")
242 .serviceAccountId("svac_...")
243 .identityToken(IdentityTokenConfig.builder()
244 .source("file")
245 .path("/var/run/secrets/anthropic.com/token")
246 .build())
247 .build())
248 .build()))
249 .build();
264 .fromEnv()
265 .configurationProvider(InMemoryProfileConfigProvider.of(ProfileConfig.builder()
266 .organizationId("00000000-0000-0000-0000-000000000000")
267 .workspaceId("wrkspc_...")
268 .authentication(AuthenticationConfig.builder()
269 .type(AuthenticationType.OIDC_FEDERATION)
270 .federationRuleId("fdrl_...")
271 .serviceAccountId("svac_...")
272 .identityToken(IdentityTokenConfig.builder()
273 .source("file")
274 .path("/var/run/secrets/anthropic.com/token")
275 .build())
276 .build())
277 .build()))
278 .build();
250279 
251280 var message = client.messages().create(MessageCreateParams.builder()
252 .model(Model.CLAUDE_OPUS_5_5)
253 .maxTokens(1024)
254 .addUserMessage("Hello, Claude")
255 .build());
281 .model(Model.CLAUDE_OPUS_5_5)
282 .maxTokens(1024)
283 .addUserMessage("Hello, Claude")
284 .build());
256285 
257286 IO.println(message.content());
258 }
259 ```
260 
261 ```csharp C#
262 using Anthropic.Credentials;
263 // ...
264 
265 var credentials = new WorkloadIdentityCredentials(new WorkloadIdentityOptions
266 {
267 FederationRuleId = "fdrl_...",
268 OrganizationId = "00000000-0000-0000-0000-000000000000",
269 ServiceAccountId = "svac_...",
270 WorkspaceId = "wrkspc_...",
271 IdentityTokenProvider = new FileIdentityTokenProvider("/var/run/secrets/anthropic.com/token"),
272 });
273 using var client = new AnthropicClient(new ClientOptions { Credentials = credentials });
274 
275 var message = await client.Messages.Create(new()
276 {
277 Model = Model.ClaudeOpus5_5,
278 MaxTokens = 1024,
279 Messages = [new UserMessageParam { Content = "Hello, Claude" }],
280 });
281 foreach (var block in message.Content)
282 {
283 if (block.Value is TextBlock textBlock)
284 {
285 Console.WriteLine(textBlock.Text);
286 }
287287 }
288288 ```
289289 

managed-agents/define-outcomes Changed · +4 / -4 lines

from line 393
393393 Title = "Financial analysis on Costco",
394394 });
395395 
396 // Define the outcome — agent starts working on receipt
396 // Define the outcome. The agent starts working on receipt.
397397 await client.Beta.Sessions.Events.Send(session.ID, new()
398398 {
399399 Events =
from line 422
422422 panic(err)
423423 }
424424 
425 // Define the outcome — agent starts working on receipt
425 // Define the outcome. The agent starts working on receipt.
426426 _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{
427427 Events: []anthropic.BetaManagedAgentsEventParamsUnion{{
428428 OfUserDefineOutcome: &anthropic.BetaManagedAgentsUserDefineOutcomeEventParams{
from line 451
451451 .title("Financial analysis on Costco")
452452 .build());
453453 
454 // Define the outcome — agent starts working on receipt
454 // Define the outcome. The agent starts working on receipt.
455455 client.beta().sessions().events().send(
456456 session.id(),
457457 EventSendParams.builder()
from line 474
474474 title: 'Financial analysis on Costco',
475475 );
476476 
477 // Define the outcome — agent starts working on receipt
477 // Define the outcome. The agent starts working on receipt.
478478 $client->beta->sessions->events->send(
479479 $session->id,
480480 events: [

managed-agents/event-deltas Changed · +12 / -12 lines

from line 117
117117 </CodeGroupItem>
118118 
119119 ```python Python
120 # Preview snapshots, keyed by event id. accumulate_managed_agents_event folds each
120 # Preview snapshots, keyed by event ID. accumulate_managed_agents_event folds each
121121 # event_start / event_delta into an agent.message snapshot; the buffered
122122 # agent.message replaces it.
123123 previews: dict[str, BetaManagedAgentsAgentMessageEvent] = {}
from line 171
171171 ```
172172 
173173 ```typescript TypeScript
174 // Preview snapshots, keyed by event id. `accumulateManagedAgentsEvent`
174 // Preview snapshots, keyed by event ID. `accumulateManagedAgentsEvent`
175175 // folds event_start / event_delta previews into an agent.message snapshot.
176176 const previews = new Map<string, BetaManagedAgentsAgentMessageEvent>();
177177 
from line 191
191191 deltas: for await (const event of stream) {
192192 switch (event.type) {
193193 case "event_start": {
194 // 1. Note the announced id and open the snapshot. Deltas and the
195 // buffered event carry the same id.
194 // 1. Note the announced ID and open the snapshot. Deltas and the
195 // buffered event carry the same ID.
196196 const preview = accumulateManagedAgentsEvent(undefined, event);
197197 if (preview) {
198198 previews.set(event.event.id, preview);
from line 256
256256 ],
257257 });
258258 
259 // Accumulate preview fragments per (event id, content index). The buffered
259 // Accumulate preview fragments for each (event ID, content index). The buffered
260260 // agent.message that follows carries the complete content, so it replaces the
261261 // accumulated preview rather than appending to it.
262262 Dictionary<string, SortedDictionary<long, string>> previews = [];
from line 265
265265 {
266266 if (streamEvent.TryPickStartEvent(out var start))
267267 {
268 // A preview opened for the event with this id. This stream only opts in
268 // A preview opened for the event with this ID. This stream only opts in
269269 // to agent.message deltas; TryPick* returns false instead of throwing,
270270 // so other preview types (including ones added later) are skipped.
271271 if (start.Event.TryPickAgentMessage(out var preview))
from line 331
331331 }
332332 
333333 // The accumulator folds event_start / event_delta fragments into
334 // per-event-id agent.message snapshots. The zero value is ready to use.
334 // agent.message snapshots, one for each event ID. The zero value is ready to use.
335335 var previews anthropic.BetaManagedAgentsEventAccumulator
336336 
337337 deltas:
from line 436
436436 use Anthropic\Beta\Sessions\Events\ManagedAgentsTextBlock;
437437 use Anthropic\Lib\Sessions\EventAccumulator;
438438 
439 // Preview snapshots, keyed by event id. EventAccumulator::accumulate() adds each
439 // Preview snapshots, keyed by event ID. EventAccumulator::accumulate() adds each
440440 // event_start / event_delta to an agent.message snapshot; the buffered
441441 // agent.message replaces it.
442442 $previews = [];
from line 523
523523 
524524 # Accumulate preview fragments by (event_id, index) into explicitly mutable
525525 # (`+""`) buffers so `<<` can append in place. The buffered agent.message with
526 # the same id is authoritative and replaces whatever the deltas built up.
526 # the same ID is authoritative and replaces whatever the deltas built up.
527527 buffers = Hash.new do |by_event, event_id|
528528 by_event[event_id] = Hash.new { |fragments, index| fragments[index] = +"" }
529529 end
from line 606
606606 case "event_delta":
607607 print(event.delta.content.text, end="")
608608 case "agent.message":
609 # The buffered event is the authoritative record; render its content
609 # The buffered event is the authoritative record; render its content.
610610 print()
611611 for block in event.content:
612612 if block.type == "text":
from line 708
708708 }
709709 
710710 // The child thread's stream takes the same event_deltas parameter as the
711 // session stream; run one read loop per stream connection.
711 // session stream; run one read loop for each stream connection.
712712 stream := client.Beta.Sessions.Threads.Events.StreamEvents(ctx, childThreadID, anthropic.BetaSessionThreadEventStreamParams{
713713 SessionID: session.ID,
714714 EventDeltas: []anthropic.BetaManagedAgentsDeltaType{
from line 806
806806 echo $event->delta->content->text;
807807 break;
808808 case $event instanceof ManagedAgentsAgentMessageEvent:
809 // The buffered event is the authoritative record; render its content
809 // The buffered event is the authoritative record; render its content.
810810 echo "\n";
811811 foreach ($event->content as $block) {
812812 if ($block instanceof ManagedAgentsTextBlock) {

managed-agents/events-and-streaming Changed · +8 / -8 lines

from line 327
327327 
328328 // Tail live events, skipping anything already seen
329329 tail: for await (const event of stream) {
330 // Preview events (event_start/event_delta) carry no top-level id
330 // Preview events (event_start/event_delta) carry no top-level `id`
331331 if (event.type === "event_start" || event.type === "event_delta") {
332332 continue;
333333 }
from line 692
692692 for event in stream:
693693 match event.type:
694694 case "agent.custom_tool_use":
695 # Execute the tool
695 # Run the tool
696696 result = call_tool(event.name, event.input)
697697 
698698 # Send the result back
from line 717
717717 loop: for await (const event of stream) {
718718 switch (event.type) {
719719 case "agent.custom_tool_use": {
720 // Execute the tool
720 // Run the tool
721721 const result = await callTool(event.name, event.input);
722722 
723723 // Send the result back
from line 746
746746 {
747747 if (streamEvent.Value is BetaManagedAgentsAgentCustomToolUseEvent toolUse)
748748 {
749 // Execute the tool
749 // Run the tool
750750 var result = await CallTool(toolUse.Name, toolUse.Input);
751751 
752752 // Send the result back
from line 778
778778 for stream.Next() {
779779 switch event := stream.Current().AsAny().(type) {
780780 case anthropic.BetaManagedAgentsAgentCustomToolUseEvent:
781 // Execute the tool
781 // Run the tool
782782 result := callTool(event.Name, event.Input)
783783 // Send the result back
784784 if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{
from line 812
812812 for (var event : (Iterable<BetaManagedAgentsStreamSessionEvents>) stream.stream()::iterator) {
813813 switch (event.type().value()) {
814814 case AGENT_CUSTOM_TOOL_USE -> {
815 // Execute the tool
815 // Run the tool
816816 var toolUse = event.asAgentCustomToolUse();
817817 var result = callTool(toolUse.name(), toolUse.input());
818818 
from line 842
842842 foreach ($stream as $event) {
843843 switch (true) {
844844 case $event instanceof \Anthropic\Beta\Sessions\Events\ManagedAgentsAgentCustomToolUseEvent:
845 // Execute the tool
845 // Run the tool
846846 $result = callTool($event->name, $event->input);
847847 
848848 // Send the result back
from line 870
870870 client.beta.sessions.events.stream_events(session.id).each do |event|
871871 case event
872872 when Anthropic::Beta::Sessions::BetaManagedAgentsAgentCustomToolUseEvent
873 # Execute the tool
873 # Run the tool
874874 result = call_tool.call(event.name, event.input)
875875 # Send the result back
876876 client.beta.sessions.events.send_(

managed-agents/files Changed · +15 / -5 lines

from line 65
6565 
6666 ```java Java
6767 var file = client.files().upload(
68 FileUploadParams.builder().file(dataCsv).build()
68 FileUploadParams.builder()
69 .file(dataCsv)
70 .build()
6971 );
7072 IO.println("File ID: " + file.id());
7173 ```
from line 325
323325 
324326 var resources = List.of(
325327 BetaManagedAgentsFileResourceParams.builder()
326 .fileId("file_abc123").mountPath("/data.csv").build(),
328 .fileId("file_abc123")
329 .mountPath("/data.csv")
330 .build(),
327331 BetaManagedAgentsFileResourceParams.builder()
328 .fileId("file_def456").mountPath("/config.json").build(),
332 .fileId("file_def456")
333 .mountPath("/config.json")
334 .build(),
329335 BetaManagedAgentsFileResourceParams.builder()
330 .fileId("file_ghi789").mountPath("/src/main.py").build()
336 .fileId("file_ghi789")
337 .mountPath("/src/main.py")
338 .build()
331339 );
332340 ```
333341 
from line 541
533541 
534542 client.beta().sessions().resources().delete(
535543 resource.id(),
536 ResourceDeleteParams.builder().sessionId(session.id()).build()
544 ResourceDeleteParams.builder()
545 .sessionId(session.id())
546 .build()
537547 );
538548 ```
539549 

managed-agents/memory Changed · +56 / -33 lines

from line 34
3434 -H "anthropic-version: 2023-06-01" \
3535 -H "anthropic-beta: agent-memory-2026-07-22" \
3636 -H "content-type: application/json" \
37 -d '{"name": "User Preferences", "description": "Per-user preferences and project context."}'
37 -d '{
38 "name": "User Preferences",
39 "description": "Per-user preferences and project context."
40 }'
3841 ```
3942 
4043 <CodeGroupItem>
from line 138
135138 -H "anthropic-version: 2023-06-01" \
136139 -H "anthropic-beta: agent-memory-2026-07-22" \
137140 -H "content-type: application/json" \
138 -d '{"path": "/formatting_standards.md", "content": "All reports use GAAP formatting. Dates are ISO-8601..."}'
141 -d '{
142 "path": "/formatting_standards.md",
143 "content": "All reports use GAAP formatting. Dates are ISO-8601..."
144 }'
139145 ```
140146 
141147 ```bash CLI
from line 443
437443 });
438444 await foreach (var item in page.Paginate())
439445 {
440 var line = item.Match(m => $"memory {m.Path}", p => $"memory_prefix {p.Path}");
446 var line = item.Match(
447 memoryItem => $"memory {memoryItem.Path}",
448 prefixItem => $"memory_prefix {prefixItem.Path}");
441449 Console.WriteLine(line);
442450 }
443451 ```
from line 470
462470 .build()
463471 );
464472 for (var item : page.data()) {
465 item.memory().ifPresent(m -> IO.println("memory " + m.path()));
466 item.memoryPrefix().ifPresent(p -> IO.println("memory_prefix " + p.path()));
473 item.memory().ifPresent(memoryItem -> IO.println("memory " + memoryItem.path()));
474 item.memoryPrefix().ifPresent(prefixItem -> IO.println("memory_prefix " + prefixItem.path()));
467475 }
468476 ```
469477 
from line 552
544552 ```java Java
545553 var retrieved = client.beta().memoryStores().memories().retrieve(
546554 mem.id(),
547 MemoryRetrieveParams.builder().memoryStoreId(store.id()).build()
555 MemoryRetrieveParams.builder()
556 .memoryStoreId(store.id())
557 .build()
548558 );
549559 IO.println(retrieved.content().orElseThrow());
550560 ```
from line 586
576586 -H "anthropic-version: 2023-06-01" \
577587 -H "anthropic-beta: agent-memory-2026-07-22" \
578588 -H "content-type: application/json" \
579 -d '{"path": "/preferences/formatting.md", "content": "Always use tabs, not spaces."}'
589 -d '{
590 "path": "/preferences/formatting.md",
591 "content": "Always use tabs, not spaces."
592 }'
580593 ```
581594 
582595 ```bash CLI
from line 890
877890 ```java Java
878891 client.beta().memoryStores().memories().delete(
879892 mem.id(),
880 MemoryDeleteParams.builder().memoryStoreId(store.id()).build()
893 MemoryDeleteParams.builder()
894 .memoryStoreId(store.id())
895 .build()
881896 );
882897 ```
883898 
from line 967
952967 MemoryID = mem.ID,
953968 });
954969 var versionIds = new List<string>();
955 await foreach (var v in versions.Paginate())
970 await foreach (var memoryVersion in versions.Paginate())
956971 {
957 Console.WriteLine($"{v.ID}: {v.Operation.Raw()}");
958 versionIds.Add(v.ID);
972 Console.WriteLine($"{memoryVersion.ID}: {memoryVersion.Operation.Raw()}");
973 versionIds.Add(memoryVersion.ID);
959974 }
960975 
961976 var versionId = versionIds[1];
from line 981
966981 MemoryID: anthropic.String(mem.ID),
967982 })
968983 for versions.Next() {
969 v := versions.Current()
970 fmt.Printf("%s: %s\n", v.ID, v.Operation)
984 memoryVersion := versions.Current()
985 fmt.Printf("%s: %s\n", memoryVersion.ID, memoryVersion.Operation)
971986 }
972987 if err := versions.Err(); err != nil {
973988 panic(err)
from line 1000
9851000 ```java Java
9861001 var versions = client.beta().memoryStores().memoryVersions().list(
9871002 store.id(),
988 MemoryVersionListParams.builder().memoryId(mem.id()).build()
1003 MemoryVersionListParams.builder()
1004 .memoryId(mem.id())
1005 .build()
9891006 );
990 for (var v : versions.autoPager()) {
991 IO.println(v.id() + ": " + v.operation());
1007 for (var memoryVersion : versions.autoPager()) {
1008 IO.println(memoryVersion.id() + ": " + memoryVersion.operation());
9921009 }
9931010 
9941011 var versionId = versions.data().get(1).id();
from line 1016
9991016 $store->id,
10001017 memoryID: $mem->id,
10011018 );
1002 foreach ($versions->pagingEachItem() as $v) {
1003 echo "{$v->id}: {$v->operation}\n";
1019 foreach ($versions->pagingEachItem() as $memoryVersion) {
1020 echo "{$memoryVersion->id}: {$memoryVersion->operation}\n";
10041021 }
10051022 
10061023 $versionId = $versions->data[1]->id;
from line 1092
10751092 ```java Java
10761093 var version = client.beta().memoryStores().memoryVersions().retrieve(
10771094 versionId,
1078 MemoryVersionRetrieveParams.builder().memoryStoreId(store.id()).build()
1095 MemoryVersionRetrieveParams.builder()
1096 .memoryStoreId(store.id())
1097 .build()
10791098 );
10801099 IO.println(version.content().orElseThrow());
10811100 ```
from line 1172
11531172 ```java Java
11541173 client.beta().memoryStores().memoryVersions().redact(
11551174 versionId,
1156 MemoryVersionRedactParams.builder().memoryStoreId(store.id()).build()
1175 MemoryVersionRedactParams.builder()
1176 .memoryStoreId(store.id())
1177 .build()
11571178 );
11581179 ```
11591180 
from line 1228
12071228 
12081229 ```csharp C#
12091230 var stores = await client.Beta.MemoryStores.List(new() { IncludeArchived = true });
1210 await foreach (var s in stores.Paginate())
1231 await foreach (var memoryStore in stores.Paginate())
12111232 {
1212 Console.WriteLine($"{s.ID} {s.Name} {s.ArchivedAt}");
1233 Console.WriteLine($"{memoryStore.ID} {memoryStore.Name} {memoryStore.ArchivedAt}");
12131234 }
12141235 ```
12151236 
from line 1239
12181239 IncludeArchived: anthropic.Bool(true),
12191240 })
12201241 for stores.Next() {
1221 s := stores.Current()
1222 fmt.Println(s.ID, s.Name, s.ArchivedAt)
1242 memoryStore := stores.Current()
1243 fmt.Println(memoryStore.ID, memoryStore.Name, memoryStore.ArchivedAt)
12231244 }
12241245 if err := stores.Err(); err != nil {
12251246 panic(err)
from line 1248
12271248 ```
12281249 
12291250 ```java Java
1230 for (var s : client.beta().memoryStores().list(
1231 MemoryStoreListParams.builder().includeArchived(true).build()
1251 for (var memoryStore : client.beta().memoryStores().list(
1252 MemoryStoreListParams.builder()
1253 .includeArchived(true)
1254 .build()
12321255 ).autoPager()) {
1233 IO.println(s.id() + " " + s.name() + " " + s.archivedAt());
1256 IO.println(memoryStore.id() + " " + memoryStore.name() + " " + memoryStore.archivedAt());
12341257 }
12351258 ```
12361259 
12371260 ```php PHP
1238 foreach ($client->beta->memoryStores->list(includeArchived: true)->pagingEachItem() as $s) {
1261 foreach ($client->beta->memoryStores->list(includeArchived: true)->pagingEachItem() as $memoryStore) {
12391262 // archivedAt is only set on archived stores.
1240 $archivedAt = isset($s->archivedAt) ? $s->archivedAt->format(DATE_ATOM) : '';
1241 echo "{$s->id} {$s->name} {$archivedAt}\n";
1263 $archivedAt = isset($memoryStore->archivedAt) ? $memoryStore->archivedAt->format(DATE_ATOM) : '';
1264 echo "{$memoryStore->id} {$memoryStore->name} {$archivedAt}\n";
12421265 }
12431266 ```
12441267 

managed-agents/permission-policies Changed · +10 / -10 lines

from line 1045
10451045 
10461046<CodeGroup>
10471047 ```bash cURL
1048 # Allow the tool to execute
1048 # Allow the tool to run
10491049 curl -fsSL "https://api.anthropic.com/v1/sessions/$SESSION_ID/events" \
10501050 -H "x-api-key: $ANTHROPIC_API_KEY" \
10511051 -H "anthropic-version: 2023-06-01" \
from line 1080
10801080 ```
10811081 
10821082 ```bash CLI
1083 # Allow the tool to execute
1083 # Allow the tool to run
10841084 ant beta:sessions:events send \
10851085 --session-id "$SESSION_ID" \
10861086 --event "{type: user.tool_confirmation, tool_use_id: $AGENT_TOOL_USE_EVENT_ID, result: allow}"
from line 1093
10931093 ```
10941094 
10951095 ```python Python
1096 # Allow the tool to execute
1096 # Allow the tool to run
10971097 client.beta.sessions.events.send(
10981098 session.id,
10991099 events=[
from line 1120
11201120 ```
11211121 
11221122 ```typescript TypeScript
1123 // Allow the tool to execute
1123 // Allow the tool to run
11241124 await client.beta.sessions.events.send(session.id, {
11251125 events: [
11261126 {
from line 1145
11451145 ```
11461146 
11471147 ```csharp C#
1148 // Allow the tool to execute
1148 // Allow the tool to run
11491149 await client.Beta.Sessions.Events.Send(session.ID, new()
11501150 {
11511151 Events =
from line 1174
11741174 ```
11751175 
11761176 ```go Go
1177 // Allow the tool to execute
1177 // Allow the tool to run
11781178 _, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{
11791179 Events: []anthropic.BetaManagedAgentsEventParamsUnion{{
11801180 OfUserToolConfirmation: &anthropic.BetaManagedAgentsUserToolConfirmationEventParams{
from line 1203
12031203 ```
12041204 
12051205 ```java Java
1206 // Allow the tool to execute
1206 // Allow the tool to run
12071207 client.beta().sessions().events().send(
12081208 session.id(),
12091209 EventSendParams.builder()
from line 1234
12341234 ```php PHP
12351235 use Anthropic\Beta\Sessions\Events\ManagedAgentsUserToolConfirmationEventParams;
12361236 
1237 // Allow the tool to execute
1237 // Allow the tool to run
12381238 $client->beta->sessions->events->send(
12391239 $session->id,
12401240 events: [
from line 1259
12591259 ```
12601260 
12611261 ```ruby Ruby
1262 # Allow the tool to execute
1262 # Allow the tool to run
12631263 client.beta.sessions.events.send_(
12641264 session.id,
12651265 events: [
from line 1288
12881288 
12891289## Custom tools
12901290 
1291Permission policies do not apply to custom tools. When the agent calls a custom tool, your application receives an `agent.custom_tool_use` event and is responsible for deciding whether to run it before sending back a `user.custom_tool_result`. See [Answer tool calls that pause the session](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#answer-tool-calls-that-pause-the-session) for the full flow.
1291Permission policies do not apply to custom tools. When the agent calls a custom tool, your application receives an `agent.custom_tool_use` event and is responsible for determining whether to run it before sending back a `user.custom_tool_result`. See [Answer tool calls that pause the session](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#answer-tool-calls-that-pause-the-session) for the full flow.
12921292 
12931293## Next steps
12941294 

managed-agents/quickstart Changed · +6 / -5 lines

from line 314
314314 
315315 <CodeGroupItem>
316316 ```php PHP
317 use Anthropic\Beta\Agents\BetaManagedAgentsModel;
317318 use Anthropic\Client;
318319 
319320 $client = new Client();
from line 321
320321 
321322 $agent = $client->beta->agents->create(
322323 name: 'Coding Assistant',
323 model: 'claude-opus-5-5',
324 model: BetaManagedAgentsModel::CLAUDE_OPUS_5_5,
324325 system: 'You are a helpful coding assistant. Write clean, well-documented code.',
325326 tools: [
326327 ['type' => 'agent_toolset_20260401'],
from line 737
736737 });
737738 
738739 // Process streaming events
739 await foreach (var ev in stream)
740 await foreach (var streamEvent in stream)
740741 {
741 if (ev.Value is BetaManagedAgentsAgentMessageEvent message)
742 if (streamEvent.Value is BetaManagedAgentsAgentMessageEvent message)
742743 {
743744 foreach (var block in message.Content)
744745 {
from line 749
748749 }
749750 }
750751 }
751 else if (ev.Value is BetaManagedAgentsAgentToolUseEvent toolUse)
752 else if (streamEvent.Value is BetaManagedAgentsAgentToolUseEvent toolUse)
752753 {
753754 Console.WriteLine($"\n[Using tool: {toolUse.Name}]");
754755 }
755 else if (ev.Value is BetaManagedAgentsSessionStatusIdleEvent)
756 else if (streamEvent.Value is BetaManagedAgentsSessionStatusIdleEvent)
756757 {
757758 Console.WriteLine("\n\nAgent finished.");
758759 break;

managed-agents/secure-deployment-risks Changed · +8 / -8 lines

from line 31
3131 
3232Managed Agents keeps the agent loop, session history, and vault secrets outside the sandbox by design. For the design background, see [Scaling Managed Agents](https://www.anthropic.com/engineering/managed-agents).
3333 
34| Part | Where it runs | What limits it |
35| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36| Agent loop | Anthropic's servers | The tool set, permission policies, and budget that you set |
37| `bash` and file tools | The sandbox. In a cloud environment, each session gets its own isolated Linux container | Environment networking, the tool set, and permission policies |
38| `web_search` and `web_fetch` | Anthropic's servers | The tool's own domain list and, in a `limited` cloud environment, the environment's allowed hosts. `web_fetch` also opens only URLs that have already appeared in the session |
39| Vault secret | Outside the sandbox. MCP credentials never enter it. For an environment variable credential, code sees a placeholder | For an MCP credential, the MCP server URL it is for. For an environment variable credential, the hosts the credential allows, its injection location, and the environment's allowed hosts |
40| Session history | Anthropic's servers, until you delete the session | The API keys for the workspace, the Developer and Admin roles in the Claude Console, and session deletion |
41| Custom tools | Your application | Your code |
34| Part | Where it runs | What limits it |
35| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36| Agent loop | Anthropic's servers | The tool set, permission policies, and budget that you set |
37| `bash` and file tools | The sandbox. In a cloud environment, each session gets its own isolated Linux container | Environment networking, the tool set, and permission policies |
38| `web_search` and `web_fetch` | Anthropic's servers | The tool's own domain list, your organization's web search and web fetch settings in the Claude Console, and, in a `limited` cloud environment, the environment's allowed hosts. `web_fetch` also opens only URLs that have already appeared in the session |
39| Vault secret | Outside the sandbox. MCP credentials never enter it. For an environment variable credential, code sees a placeholder | For an MCP credential, the MCP server URL it is for. For an environment variable credential, the hosts the credential allows, its injection location, and the environment's allowed hosts |
40| Session history | Anthropic's servers, until you delete the session | The API keys for the workspace, the Developer and Admin roles in the Claude Console, and session deletion |
41| Custom tools | Your application | Your code |
4242 
4343In a cloud environment, sessions do not share filesystem state. A memory store attached to more than one session is shared between them.
4444 

managed-agents/session-operations Changed · +6 / -2 lines

from line 416
416416 
417417 // Advance by passing next_page as the page cursor.
418418 var nextCursor = firstPage.response().nextPage().orElseThrow();
419 var secondPage = client.beta().sessions().list(params.toBuilder().page(nextCursor).build());
419 var secondPage = client.beta().sessions().list(params.toBuilder()
420 .page(nextCursor)
421 .build());
420422 
421423 // Go back by passing prev_page as the same page cursor.
422424 var prevCursor = secondPage.response().prevPage().orElseThrow();
423 var previousPage = client.beta().sessions().list(params.toBuilder().page(prevCursor).build());
425 var previousPage = client.beta().sessions().list(params.toBuilder()
426 .page(prevCursor)
427 .build());
424428 // Back on the first page, so prev_page is empty again.
425429 IO.println("prev_page: " + previousPage.response().prevPage());
426430 // For forward-only iteration, page.autoPager() returns an Iterable that auto-follows next_page.

managed-agents/session-threads Changed · +7 / -3 lines

from line 503
503503 ```java Java
504504 try (var streamResponse = client.beta().sessions().threads().events().streamStreaming(
505505 thread.id(),
506 EventStreamParams.builder().sessionId(session.id()).build()
506 EventStreamParams.builder()
507 .sessionId(session.id())
508 .build()
507509 )) {
508510 loop:
509511 for (var event : (Iterable<BetaManagedAgentsStreamSessionThreadEvents>) streamResponse.stream()::iterator) {
from line 616
614616 ```java Java
615617 for (var event : client.beta().sessions().threads().events().list(
616618 thread.id(),
617 EventListParams.builder().sessionId(session.id()).build()
618 ).autoPager()) {
619 EventListParams.builder()
620 .sessionId(session.id())
621 .build()
622 ).autoPager()) {
619623 var type = event._json().orElseThrow() instanceof JsonObject json
620624 ? json.values().get("type").asStringOrThrow()
621625 : "unknown";

models/fable-5-1/migration-guide Changed · +3 / -3 lines

from line 28
2828* **Prefill:** Prefilling the assistant message returns a 400 error, unchanged from Claude Fable 5. Use system prompt instructions instead.
2929* **Tool choice:** `{type: "auto"}` (the default) and `{type: "none"}` are supported. Forcing a tool call with `{type: "any"}` or `{type: "tool", name: "..."}` returns a 400 error. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes).
3030* **Preserved thinking across models:** Claude Fable 5.1 reads thinking blocks from Claude Opus 5, Claude Fable 5, Claude Mythos 5, and earlier Claude models. None of those models can read Claude Fable 5.1's blocks. See [Breaking changes](https://platform.claude.com/docs/en/models/fable-5-1/migration-guide#fable-5-1-breaking-changes).
31* **Context window and output:** A [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, and up to 128k output tokens per request.
31* **Context window and output:** A [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default, and up to 128k output tokens for each request.
3232* **Pricing:** $10 USD per million input tokens and $50 USD per million output tokens, the same as Claude Fable 5. Prompt cache reads are $0.25 USD per million tokens, a quarter of the Claude Fable 5 rate. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing).
33* **Data retention:** Both models require 30-day data retention, aren't available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic, and are designated Covered Models, the same as Claude Fable 5 and Claude Mythos 5. On the Claude API, a request from an organization or workspace without 30-day retention returns a 400 `invalid_request_error`. Organizations with a ZDR arrangement should contact their Anthropic account team, or configure retention per workspace. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) for per-platform details.
33* **Data retention:** Both models require 30-day data retention, aren't available under zero data retention (ZDR) arrangements unless expressly authorized by Anthropic, and are designated Covered Models, the same as Claude Fable 5 and Claude Mythos 5. On the Claude API, a request from an organization or workspace without 30-day retention returns a 400 `invalid_request_error`. Organizations with a ZDR arrangement should contact their Anthropic account team, or configure retention for individual workspaces. See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) for per-platform details.
3434* **Priority Tier:** Neither model is supported on [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models). Claude Fable 5 is.
3535 
3636Where the two models diverge:
from line 254
254254 messages: [
255255 ['role' => 'user', 'content' => 'Summarize: The meeting moved to Thursday.']
256256 ],
257 model: 'claude-fable-5',
257 model: Model::CLAUDE_FABLE_5,
258258 toolChoice: ['type' => 'tool', 'name' => 'record_summary'],
259259 tools: [
260260 [

models/fable-5-1/whats-new-fable-5-1 Changed · +5 / -5 lines

from line 398
398398* **Long-context work**, reasoning over and connecting details across the full [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows)
399399* **Computer use**, operating a browser and desktop applications more reliably and recovering from failed steps
400400 
401Multilingual performance is comparable to Claude Fable 5.
401Multilingual performance is at the same level as Claude Fable 5's.
402402 
403403## Refusals, fallback, and billing
404404 
from line 424
424424 
425425Claude Fable 5.1 is available on:
426426 
427* **Claude API:** all customers, as `claude-fable-5-1`.
428* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-fable-5-1`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-fable-5-1`.
429* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-fable-5-1`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-fable-5-1`.
430* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), on Anthropic infrastructure.
427* **Claude API:** all customers, as `claude-fable-5-1`
428* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-fable-5-1`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-fable-5-1`
429* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-fable-5-1`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-fable-5-1`
430* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), on Anthropic infrastructure
431431 
432432Claude Mythos 5.1 is available only to organizations verified through Anthropic's verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case, or contact your Anthropic, AWS, or Google Cloud account team.
433433 

models/opus-5-5/migration-guide Changed · +10 / -7 lines

from line 115
115115 Model = Model.ClaudeOpus5_5,
116116 MaxTokens = 4096,
117117 Messages = [
118 new UserMessageParam {
118 new UserMessageParam
119 {
119120 Content = "Analyze the trade-offs between microservices and monolithic architectures"
120121 }
121122 ],
from line 837
836837 // strict tool use: every call matches the tool's input_schema
837838 .tools(tools.stream()
838839 .map(tool -> tool.tool()
839 .map(customTool -> customTool.toBuilder().strict(true).build())
840 .map(customTool -> customTool.toBuilder()
841 .strict(true)
842 .build())
840843 .map(ToolUnion::ofTool)
841844 .orElse(tool))
842845 .toList())
from line 1472
14691472 $message = $client->messages->create(
14701473 maxTokens: 16000,
14711474 messages: [['role' => 'user', 'content' => '...']],
1472 model: 'claude-opus-5-5',
1475 model: Model::CLAUDE_OPUS_5_5,
14731476 thinking: ['type' => 'adaptive'],
14741477 outputConfig: ['effort' => 'high'], // or 'max', 'xhigh', 'medium', 'low'
14751478 );
from line 1523
15201523 
15211524 High-resolution support is automatic and requires no beta header or client-side opt-in. Two things to plan for:
15221525 
1523 * Full-resolution images can use up to approximately 3x more image tokens than on prior models (up to 4,784 tokens per image, compared to the previous cap of roughly 1,600 tokens per image). Re-budget `max_tokens` and cost expectations for image-heavy workloads, or downsample before sending if you do not need the additional fidelity.
1526 * Full-resolution images can use up to approximately 3x more image tokens than on prior models (up to 4,784 tokens for each image, compared to the previous cap of roughly 1,600 tokens). Re-budget `max_tokens` and cost expectations for image-heavy workloads, or downsample before sending if you do not need the additional fidelity.
15241527 * Pointing and bounding-box coordinates returned by the model are 1:1 with actual image pixels on Claude Opus 4.7, so no scale-factor conversion is required.
15251528 
15261529 See [High-resolution image support on Claude Opus 4.7](https://platform.claude.com/docs/en/build-with-claude/vision#high-resolution-image-support-on-claude-opus-4-7) for details.
from line 1538
15351538 
153615391. **Prefill removal** is covered in the [breaking changes for migrating from Claude Opus 4.6](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#opus-46-breaking-changes).
15371540 
15382. **Tool parameter quoting:** Claude Opus 4.6 and later models might produce slightly different JSON string escaping in tool call arguments (for example, different handling of Unicode escapes or forward slash escaping). If you parse tool call `input` as a raw string rather than using a JSON parser, verify your parsing logic. Standard JSON parsers (such as `json.loads()` or `JSON.parse()`) handle these differences automatically.
15412. **Tool parameter quoting:** Claude Opus 4.6 and later models might produce slightly different JSON string escaping in tool call arguments (for example, different handling of Unicode escapes or forward slash escaping). If you parse tool call `input` as a raw string rather than using a JSON parser, check your parsing logic. Standard JSON parsers (such as `json.loads()` or `JSON.parse()`) handle these differences automatically.
15391542 
15401543#### Recommended changes
15411544 
from line 1635
16321635 ```
16331636 </CodeGroup>
16341637 
1635 * **Text editor:** Use `text_editor_20250728` and `str_replace_based_edit_tool`. See [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) documentation for details.
1636 * **Code execution:** Upgrade to `code_execution_20260521`. See [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version) documentation for migration instructions.
1638 * **Text editor:** Use `text_editor_20250728` and `str_replace_based_edit_tool`. See the [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) documentation for details.
1639 * **Code execution:** Upgrade to `code_execution_20260521`. See the [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version) documentation for migration instructions.
16371640 * **Computer use:** On the Claude API and Claude Models on Google Cloud (Google managed), Claude Opus 5.5 accepts computer use only as the `computer_toolset_20260801` toolset: the earlier `computer_20250124` and `computer_20251124` tools are rejected there. See the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#computer-use-toolset).
16381641 
163916423. **Handle the `refusal` stop reason**

models/opus-5-5/whats-new-opus-5-5 Changed · +5 / -5 lines

from line 60
6060 
6161## Feature support
6262 
63Claude Opus 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). On the Claude API and Claude Models on Google Cloud (Google managed), computer use requires the `computer_toolset_20260801` toolset (see the [breaking change](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability.
63Claude Opus 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). On the Claude API and Claude Models on Google Cloud (Google managed), computer use requires the `computer_toolset_20260801` toolset (see the [computer use breaking change](https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability.
6464 
6565### Fast mode
6666 
from line 98
9898 
9999Claude Opus 5.5 is available on:
100100 
101* **Claude API:** all customers, as `claude-opus-5-5`.
102* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-opus-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-opus-5-5`.
103* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-opus-5-5`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-opus-5-5`.
104* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-opus-5-5`.
101* **Claude API:** all customers, as `claude-opus-5-5`
102* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-opus-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-opus-5-5`
103* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-opus-5-5`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-opus-5-5`
104* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-opus-5-5`
105105 
106106## Migrate from Claude Opus 5
107107 

models/overview Changed · +21 / -21 lines

from line 24
2424 
2525If you're unsure which model to use, start with [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) for most workloads. Use [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) for demanding reasoning and long-horizon agentic work, or when your evals on Claude Opus 5.5 at higher effort still fall short. All current models support text and image input, text output, multilingual capabilities, vision, and tool use. Each model's page lists the platforms it's available on.
2626 
27| Feature | Claude Fable 5.1 | Claude Opus 5.5 | Claude Sonnet 5.5 | Claude Haiku 5.5 |
28| :-------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- |
29| Description | For demanding reasoning and long-horizon agentic work | For long-running agentic coding and knowledge work | The best combination of speed and intelligence | For high-volume, latency-sensitive tasks such as classification, extraction, and routing |
30| Model page | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) | [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview) |
31| Comparative latency | Slower | Moderate | Fast | Fastest |
32| [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) | $10 / input MTok, $50 / output MTok | $4 / input MTok, $20 / output MTok | $2 / input MTok, $10 / output MTok | From $0.10 / input MTok, From $0.50 / output MTok |
33| Claude API ID | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
34| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive (always on) | Adaptive (always on) | Adaptive | Adaptive |
35| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` | `medium` | `high` | `medium` |
36| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens | 1M tokens | 1M tokens | 1M tokens |
37| Max output | 128K tokens | 128K tokens | 128K tokens | 128K tokens |
38| Reliable knowledge cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 |
39| Training data cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 |
40| [Retirement](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Not sooner than September 1, 2027 | Not sooner than September 22, 2027 | Not sooner than September 28, 2027 | Not sooner than October 7, 2027 |
41| Claude API alias | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
42| [Amazon Bedrock ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` | `anthropic.claude-opus-5-5` | `anthropic.claude-sonnet-5-5` | `anthropic.claude-haiku-5-5` |
43| [Google Cloud ID](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
44| [Microsoft Foundry ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
45| [Claude Platform on AWS ID](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
27| Feature | Claude Fable 5.1 | Claude Opus 5.5 | Claude Sonnet 5.5 | Claude Haiku 5.5 |
28| :------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- |
29| Description | For demanding reasoning and long-horizon agentic work | For long-running agentic coding and knowledge work | The best combination of speed and intelligence | For high-volume, latency-sensitive tasks such as classification, extraction, and routing |
30| Model page | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) | [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview) |
31| Comparative latency | Slower | Moderate | Fast | Fastest |
32| [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) | $10 / input MTok, $50 / output MTok | $4 / input MTok, $20 / output MTok | $2 / input MTok, $10 / output MTok | From $0.10 / input MTok, From $0.50 / output MTok |
33| Claude API ID | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
34| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive (always on) | Adaptive (always on) | Adaptive | Adaptive |
35| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` | `medium` | `high` | `medium` |
36| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens | 1M tokens | 1M tokens | 1M tokens |
37| Max output | 128K tokens | 128K tokens | 128K tokens | 128K tokens |
38| Reliable knowledge cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 |
39| Training data cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 |
40| [Retirement](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Not sooner than September 1, 2027 | Not sooner than September 22, 2027 | Not sooner than September 28, 2027 | Not sooner than October 7, 2027 |
41| Claude API alias | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
42| [Amazon Bedrock ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` | `anthropic.claude-opus-5-5` | `anthropic.claude-sonnet-5-5` | `anthropic.claude-haiku-5-5` |
43| [Claude Models on Google Cloud (Google managed) ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
44| [Microsoft Foundry ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
45| [Claude Platform on AWS ID](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
4646 
4747* **Comparative latency:** Relative to the current lineup. Actual latency depends on prompt length, output length, and thinking effort.
4848* **Pricing:** Base price per million tokens. Batch API requests are 50% off; prompt cache reads cost 10% of the base input price (2.5% on Claude Fable 5.1 and Claude Mythos 5.1, 5% on Claude Opus 5.5 and Claude Sonnet 5.5). See Pricing for cache writes, long-context, and per-platform pricing.
from line 52
5252* **Context window:** 1M tokens is roughly 555k words or 2.5M Unicode characters on the current tokenizer (introduced with Claude Opus 4.7); models before it fit about 750k words in 1M tokens. 200k tokens is roughly 150k words.
5353* **Max output:** Synchronous Messages API limit. On the Message Batches API, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Haiku 5.5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6 support up to 300k output tokens with the output-300k-2026-03-24 beta header.
5454* **Reliable knowledge cutoff:** The date through which the model’s knowledge is most extensive and reliable. Training data cutoff (under Additional details) is the broader range of data used. See Anthropic’s Transparency Hub for details.
55* **Retirement:** Anthropic’s commitment for the platforms that Anthropic operates. Amazon Bedrock and Google Cloud set their own dates.
55* **Retirement:** Anthropic’s commitment for the platforms that Anthropic operates. Partner-operated platforms set their own dates.
5656* **Claude API alias:** For models before the 4.6 generation, the alias is a convenience pointer that resolves to the dated ID. Dateless IDs are their own pinned snapshot; the alias row repeats them.
5757* **Amazon Bedrock ID:** The ID on Bedrock’s Messages-API endpoint (Claude Opus 4.7 and later, plus Claude Haiku 4.5); a model offered only through Bedrock’s InvokeModel integration shows that ID instead. Bedrock offers global endpoints (dynamic routing) and regional endpoints (guaranteed data routing) for Claude Sonnet 4.5 and later, and sets its own lifecycle dates.
58* **Google Cloud ID:** Google Cloud offers global, multi-region, and regional endpoints, and sets its own lifecycle dates.
58* **Claude Models on Google Cloud (Google managed) ID:** Claude Models on Google Cloud (Google managed) offers global, multi-region, and regional endpoints, and sets its own lifecycle dates.
5959* **Microsoft Foundry ID:** Foundry deployments default to the Claude API model ID (the alias, where one exists); the deployment name is what you send. Foundry follows the Claude API lifecycle schedule.
6060* **Claude Platform on AWS ID:** Claude Platform on AWS uses the Claude API model IDs (the dateless form where the Claude API has an alias), not Bedrock-style IDs, and follows Anthropic’s first-party model lifecycle.
6161 

models/sonnet-5-5/migration-guide Changed · +8 / -5 lines

from line 26
2626 
2727## Send a request to Claude Sonnet 5.5
2828 
29This request works on Claude Sonnet 5.5 as written. The example sets an effort level and, in the SDK, reads the reply by block type. It leaves out five settings that return a 400 error: [thinking budgets](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [sampling parameters](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [assistant prefill](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migrating-from-sonnet-45), [forced tool choice](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#forced-tool-use), and [`thinking: {"type": "disabled"}`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking).
29This request works on Claude Sonnet 5.5 as written. It sets an effort level, and the SDK example reads the reply by block type. It leaves out five settings that return a 400 error: [thinking budgets](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [sampling parameters](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#sonnet-46-breaking-changes), [assistant prefill](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migrating-from-sonnet-45), [forced tool choice](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#forced-tool-use), and [`thinking: {"type": "disabled"}`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking).
3030 
3131<CodeGroup>
3232 ```bash cURL
from line 106
106106 Model = Model.ClaudeSonnet5_5,
107107 MaxTokens = 4096,
108108 Messages = [
109 new UserMessageParam {
109 new UserMessageParam
110 {
110111 Content = "Analyze the trade-offs between microservices and monolithic architectures"
111112 }
112113 ],
from line 477
476477* Replace [forced tool use](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#forced-tool-use) with `auto` and strict tools.
477478* Keep conversations [append-only](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#thinking-blocks).
478479* On the Claude API and Claude Models on Google Cloud (Google managed), move computer use to the [toolset](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#computer-use-toolset), without the `fine-grained-tool-streaming-2025-05-14` beta header.
479* Pair the [advisor tool](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#advisor-tool) with a supported advisor, and expect encrypted advice.
480* [Pair the advisor tool](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#advisor-tool) with a supported advisor, and expect encrypted advice.
480481* Read [text between tool calls](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#text-between-tool-calls) from `thinking` blocks.
481482* [Handle refusals](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#safety-classifiers-and-fallback), and configure fallback.
482483* [Re-run your effort sweep](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#recommended-changes), and re-baseline cost.
from line 798
797798 // strict tool use: every call matches the tool's input_schema
798799 .tools(tools.stream()
799800 .map(tool -> tool.tool()
800 .map(customTool -> customTool.toBuilder().strict(true).build())
801 .map(customTool -> customTool.toBuilder()
802 .strict(true)
803 .build())
801804 .map(ToolUnion::ofTool)
802805 .orElse(tool))
803806 .toList())
from line 1167
11641167 $message = $client->messages->create(
11651168 maxTokens: 16000,
11661169 messages: [['role' => 'user', 'content' => '...']],
1167 model: 'claude-sonnet-5-5',
1170 model: Model::CLAUDE_SONNET_5_5,
11681171 thinking: ['type' => 'adaptive'],
11691172 outputConfig: ['effort' => 'high'], // or 'max', 'xhigh', 'medium', 'low'
11701173 );

models/sonnet-5-5/whats-new-sonnet-5-5 Changed · +8 / -8 lines

from line 9
99* [Turn off up-front thinking with `between_tools`](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#turn-off-up-front-thinking).
1010* [Forced tool use returns an error](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#forced-tool-use-is-not-supported).
1111* [Thinking blocks are tied to the model and the conversation](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them).
12* [On the Claude API and Claude Models on Google Cloud (Google managed), the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported).
13* [The advisor tool rejects Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, and Claude Haiku 5.5 as advisors](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#advisor-tool-pairings).
12* On the Claude API and Claude Models on Google Cloud (Google managed), [the earlier `computer_20251124` computer use tool is not accepted](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported).
13* [The advisor tool rejects four models as advisors](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#advisor-tool-pairings): Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, and Claude Haiku 5.5.
1414 
1515One more change alters the response shape without failing any request: [text between tool calls comes back in `thinking` blocks](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#text-between-tool-calls). An application that streams that text to its users goes quiet between tool calls until it sets a `display` value that returns the text, or turns off up-front thinking with `between_tools`.
1616 
from line 74
7474 
7575## Feature support
7676 
77Claude Sonnet 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) (beta), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). Per-message effort, mid-conversation system messages, and mid-conversation tool changes aren't available on Claude Sonnet 5, whose minimum cacheable prompt is 1,024 tokens. On the Claude API and Claude Models on Google Cloud (Google managed), computer use requires the `computer_toolset_20260801` toolset (see the [breaking change](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability.
77Claude Sonnet 5.5 supports [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta), [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages), [mid-conversation tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) (beta), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) with a 512-token minimum cacheable prompt, [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). Per-message effort, mid-conversation system messages, and mid-conversation tool changes aren't available on Claude Sonnet 5, whose minimum cacheable prompt is 1,024 tokens. On the Claude API and Claude Models on Google Cloud (Google managed), computer use requires the `computer_toolset_20260801` toolset (see the [computer use breaking change](https://platform.claude.com/docs/en/models/sonnet-5-5/whats-new-sonnet-5-5#computer-20251124-is-not-supported)). See each feature's page for model availability.
7878 
7979### Compact on demand (beta)
8080 
from line 86
8686 
8787### Thinking blocks stay with the account that produced them
8888 
89Thinking blocks that Claude Sonnet 5.5 produces work only in the account that produced them, or in an account linked to it. When another account sends one of these blocks, the API drops the block before the model sees it, and the request succeeds. On the Claude API and Claude Models on Google Cloud (Google managed), with the `thinking-binding-controls-2026-08-01` beta header, the response lists each dropped block in `input_transformations` with `reason: "organization_binding_mismatch"`. Blocks from earlier models aren't affected. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking).
89Thinking blocks that Claude Sonnet 5.5 produces work only in the account that produced them, or in an account linked to it. When another account sends one of these blocks, the API drops the block before the model receives it, and the request succeeds. On the Claude API and Claude Models on Google Cloud (Google managed), with the `thinking-binding-controls-2026-08-01` beta header, the response lists each dropped block in `input_transformations` with `reason: "organization_binding_mismatch"`. Blocks from earlier models aren't affected. See [thinking blocks from another account](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#account-bound-thinking) in Preserved thinking.
9090 
9191## Behavior differences
9292 
from line 108
108108 
109109Claude Sonnet 5.5 is available on:
110110 
111* **Claude API:** all customers, as `claude-sonnet-5-5`.
112* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-sonnet-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-sonnet-5-5`.
113* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-sonnet-5-5`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-sonnet-5-5`.
114* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-sonnet-5-5`.
111* **Claude API:** all customers, as `claude-sonnet-5-5`
112* **AWS:** [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), as `anthropic.claude-sonnet-5-5`, and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), as `claude-sonnet-5-5`
113* **Google Cloud:** [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), as `claude-sonnet-5-5`, and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), as `claude-sonnet-5-5`
114* **Microsoft Foundry:** [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), as `claude-sonnet-5-5`
115115 
116116## Migrate from Claude Sonnet 5
117117 

test-and-evaluate/develop-tests Changed · +27 / -27 lines

from line 1118
11181118 
11191119 // ROUGE-L measures the longest common subsequence (LCS) of words between the
11201120 // candidate and reference summaries, reported here as an F1 score. Tokenization
1121 // is simplified to whitespace words; scores may differ from the Python rouge library.
1121 // is simplified to whitespace words; scores might differ from the Python rouge library.
11221122 function rougeL(candidate: string, reference: string): number {
11231123 const candidateWords = candidate.toLowerCase().trim().split(/\s+/);
11241124 const referenceWords = reference.toLowerCase().trim().split(/\s+/);
from line 1187
11871187 
11881188 // ROUGE-L measures the longest common subsequence (LCS) of words between the
11891189 // candidate and reference summaries, reported here as an F1 score. Tokenization
1190 // is simplified to whitespace words; scores may differ from the Python rouge library.
1190 // is simplified to whitespace words; scores might differ from the Python rouge library.
11911191 double RougeL(string candidate, string reference)
11921192 {
11931193 var candidateWords = Regex.Split(candidate.ToLowerInvariant().Trim(), @"\s+");
from line 1290
12901290 
12911291 // ROUGE-L measures the longest common subsequence (LCS) of words between the
12921292 // candidate and reference summaries, reported here as an F1 score. Tokenization
1293 // is simplified to whitespace words; scores may differ from the Python rouge library.
1293 // is simplified to whitespace words; scores might differ from the Python rouge library.
12941294 func rougeL(candidate, reference string) float64 {
12951295 candidateWords := strings.Fields(strings.ToLower(candidate))
12961296 referenceWords := strings.Fields(strings.ToLower(reference))
from line 1371
13711371 
13721372 // ROUGE-L measures the longest common subsequence (LCS) of words between the
13731373 // candidate and reference summaries, reported here as an F1 score. Tokenization
1374 // is simplified to whitespace words; scores may differ from the Python rouge library.
1374 // is simplified to whitespace words; scores might differ from the Python rouge library.
13751375 double rougeL(String candidate, String reference) {
13761376 var candidateWords = candidate.toLowerCase().strip().split("\\s+");
13771377 var referenceWords = reference.toLowerCase().strip().split("\\s+");
from line 1443
14431443 
14441444 // ROUGE-L measures the longest common subsequence (LCS) of words between the
14451445 // candidate and reference summaries, reported here as an F1 score. Tokenization
1446 // is simplified to whitespace words; scores may differ from the Python rouge library.
1446 // is simplified to whitespace words; scores might differ from the Python rouge library.
14471447 function rougeL(string $candidate, string $reference): float
14481448 {
14491449 $candidateWords = preg_split('/\s+/', strtolower(trim($candidate)));
from line 1527
15271527 
15281528 # ROUGE-L measures the longest common subsequence (LCS) of words between the
15291529 # candidate and reference summaries, reported here as an F1 score. Tokenization
1530 # is simplified to whitespace words; scores may differ from the Python rouge library.
1530 # is simplified to whitespace words; scores might differ from the Python rouge library.
15311531 def rouge_l(candidate, reference)
15321532 candidate_words = candidate.downcase.split
15331533 reference_words = reference.downcase.split
from line 1602
16021602 5: Perfectly {target_tone}
16031603 Output only the number."""
16041604 
1605 # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
1605 # Generally best practice to evaluate with a different model from the one used to generate the evaluated output
16061606 response = client.messages.create(
16071607 model="claude-opus-5-5",
16081608 max_tokens=1024,
from line 1660
16601660 5: Perfectly ${targetTone}
16611661 Output only the number.`;
16621662 
1663 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
1663 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
16641664 const response = await client.messages.create({
16651665 model: "claude-opus-5-5",
16661666 max_tokens: 1024,
from line 1721
17211721 Output only the number.
17221722 """;
17231723 
1724 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
1724 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
17251725 var response = await client.Messages.Create(new MessageCreateParams
17261726 {
17271727 Model = Model.ClaudeOpus5_5,
from line 1804
18041804 5: Perfectly %[1]s
18051805 Output only the number.`, targetTone, modelOutput)
18061806 
1807 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
1807 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
18081808 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
18091809 Model: anthropic.ModelClaudeOpus5_5,
18101810 MaxTokens: 1024,
from line 1873
18731873 5: Perfectly %1$s
18741874 Output only the number.""".formatted(targetTone, modelOutput);
18751875 
1876 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
1876 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
18771877 var params = MessageCreateParams.builder()
18781878 .model(Model.CLAUDE_OPUS_5_5)
18791879 .maxTokens(1024L)
from line 1931
19311931 Output only the number.
19321932 PROMPT;
19331933 
1934 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
1934 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
19351935 $response = $client->messages->create(
19361936 model: Model::CLAUDE_OPUS_5_5,
19371937 maxTokens: 1024,
from line 2008
20082008 Output only the number.
20092009 PROMPT
20102010 
2011 # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2011 # Generally best practice to evaluate with a different model from the one used to generate the evaluated output
20122012 response = client.messages.create(
20132013 model: Anthropic::Model::CLAUDE_OPUS_5_5,
20142014 max_tokens: 1024,
from line 2082
20822082 <response>{model_output}</response>
20832083 Output only 'yes' or 'no'."""
20842084 
2085 # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2085 # Generally best practice to evaluate with a different model from the one used to generate the evaluated output
20862086 response = client.messages.create(
20872087 model="claude-opus-5-5",
20882088 max_tokens=1024,
from line 2159
21592159 <response>${modelOutput}</response>
21602160 Output only 'yes' or 'no'.`;
21612161 
2162 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2162 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
21632163 const response = await client.messages.create({
21642164 model: "claude-opus-5-5",
21652165 max_tokens: 1024,
from line 2227
22272227 Output only 'yes' or 'no'.
22282228 """;
22292229 
2230 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2230 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
22312231 var response = await client.Messages.Create(new MessageCreateParams
22322232 {
22332233 Model = Model.ClaudeOpus5_5,
from line 2324
23242324 <response>%s</response>
23252325 Output only 'yes' or 'no'.`, modelOutput)
23262326 
2327 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2327 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
23282328 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
23292329 Model: anthropic.ModelClaudeOpus5_5,
23302330 MaxTokens: 1024,
from line 2401
24012401 <response>%s</response>
24022402 Output only 'yes' or 'no'.""".formatted(modelOutput);
24032403 
2404 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2404 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
24052405 var params = MessageCreateParams.builder()
24062406 .model(Model.CLAUDE_OPUS_5_5)
24072407 .maxTokens(1024L)
from line 2472
24722472 Output only 'yes' or 'no'.
24732473 PROMPT;
24742474 
2475 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2475 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
24762476 $response = $client->messages->create(
24772477 model: Model::CLAUDE_OPUS_5_5,
24782478 maxTokens: 1024,
from line 2558
25582558 Output only 'yes' or 'no'.
25592559 PROMPT
25602560 
2561 # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2561 # Generally best practice to evaluate with a different model from the one used to generate the evaluated output
25622562 response = client.messages.create(
25632563 model: Anthropic::Model::CLAUDE_OPUS_5_5,
25642564 max_tokens: 1024,
from line 2656
26562656 5: Perfectly utilizes context
26572657 Output only the number and nothing else."""
26582658 
2659 # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2659 # Generally best practice to evaluate with a different model from the one used to generate the evaluated output
26602660 response = client.messages.create(
26612661 model="claude-opus-5-5",
26622662 max_tokens=1024,
from line 2748
27482748 5: Perfectly utilizes context
27492749 Output only the number and nothing else.`;
27502750 
2751 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2751 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
27522752 const response = await client.messages.create({
27532753 model: "claude-opus-5-5",
27542754 max_tokens: 1024,
from line 2829
28292829 Output only the number and nothing else.
28302830 """;
28312831 
2832 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2832 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
28332833 var response = await client.Messages.Create(new MessageCreateParams
28342834 {
28352835 Model = Model.ClaudeOpus5_5,
from line 2940
29402940 5: Perfectly utilizes context
29412941 Output only the number and nothing else.`, conversationText.String(), modelOutput)
29422942 
2943 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
2943 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
29442944 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
29452945 Model: anthropic.ModelClaudeOpus5_5,
29462946 MaxTokens: 1024,
from line 3029
30293029 5: Perfectly utilizes context
30303030 Output only the number and nothing else.""".formatted(conversationText, modelOutput);
30313031 
3032 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
3032 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
30333033 var params = MessageCreateParams.builder()
30343034 .model(Model.CLAUDE_OPUS_5_5)
30353035 .maxTokens(1024L)
from line 3100
31003100 Output only the number and nothing else.
31013101 PROMPT;
31023102 
3103 // Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
3103 // Generally best practice to evaluate with a different model from the one used to generate the evaluated output
31043104 $response = $client->messages->create(
31053105 model: Model::CLAUDE_OPUS_5_5,
31063106 maxTokens: 1024,
from line 3187
31873187 Output only the number and nothing else.
31883188 PROMPT
31893189 
3190 # Generally best practice to use a different model to evaluate than the model used to generate the evaluated output
3190 # Generally best practice to evaluate with a different model from the one used to generate the evaluated output
31913191 response = client.messages.create(
31923192 model: Anthropic::Model::CLAUDE_OPUS_5_5,
31933193 max_tokens: 1024,

test-and-evaluate/strengthen-guardrails/handle-streaming-refusals Changed · +3 / -2 lines

from line 236
236236 $client = new Client();
237237 $messages = [];
238238 
239 function resetConversation(&$messages) {
239 function resetConversation(&$messages)
240 {
240241 $messages = [];
241242 echo "Conversation reset due to refusal\n";
242243 }
from line 258
257258 }
258259 }
259260 } catch (\Exception $e) {
260 echo "Error: " . $e->getMessage() . "\n";
261 echo 'Error: ' . $e->getMessage() . "\n";
261262 }
262263 ```
263264 

about-claude/pricing Changed · +2 / -2 lines

from line 76
7676 
7777 For implementation details and code examples:
7878 
79 * [Amazon Bedrock global vs regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions) for Opus 4.7, Haiku 4.5, and later models, or [the legacy integration](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#global-vs-regional-endpoints) for all other models on Bedrock
79 * [Amazon Bedrock global versus regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions) for Opus 4.7, Haiku 4.5, and later models, or the [legacy integration](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#global-vs-regional-endpoints) for all other models on Bedrock
8080 * [Claude Models on Google Cloud (Google managed) global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints)
8181</Note>
8282 
from line 159
159159 
160160For Claude 4.6 and later models, specifying US-only inference through the `inference_geo` parameter incurs a 1.1x multiplier on all token pricing categories, including input tokens, output tokens, cache writes, and cache reads. On Claude Haiku 5.5, the multiplier also applies to the higher prices for prompts over 100,000 tokens (see [Long context pricing](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing)). Global routing (the default) uses standard pricing.
161161 
162This applies to the Claude API (first-party), Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed). On Claude in Microsoft Foundry, the same 1.1x multiplier applies to deployments that use the US Data Zone Standard deployment type (see [Inference geography](https://platform.claude.com/docs/en/about-claude/pricing#foundry-inference-geography)). Partner-operated platforms, Bedrock and Claude Models on Google Cloud (Google managed), have independent regional pricing. See [Bedrock](https://aws.amazon.com/bedrock/pricing/) and [Google Cloud](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models) for details. Earlier models do not support the `inference_geo` parameter and always use standard pricing; requests that include the parameter on these models return a 400 error.
162This applies to the Claude API (first-party), Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed). On Claude in Microsoft Foundry, the same 1.1x multiplier applies to deployments that use the US Data Zone Standard deployment type (see [Inference geography](https://platform.claude.com/docs/en/about-claude/pricing#foundry-inference-geography)). Partner-operated platforms, Bedrock and Claude Models on Google Cloud (Google managed), have independent regional pricing. See [Bedrock pricing](https://aws.amazon.com/bedrock/pricing/) and [Google Cloud pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models) for details. Earlier models do not support the `inference_geo` parameter and always use standard pricing; requests that include the parameter on these models return a 400 error.
163163 
164164For more information, see [Data residency](https://platform.claude.com/docs/en/manage-claude/data-residency).
165165 

agents-and-tools/agent-skills/claude-api-skill Changed · +1 / -1 lines

from line 36
3636* **Onboarding flow:** An interview-driven walkthrough for setting up a new Managed Agent, available through the `/claude-api managed-agents-onboard` subcommand
3737* **Security guide check:** A read-only check of an agent's settings against [Secure your Managed Agents deployment](https://platform.claude.com/docs/en/managed-agents/secure-deployment), available through the `/claude-api managed-agents-secure` subcommand of the skill bundled with Claude Code
3838* **Language-specific Managed Agents docs:** Creating persistent agents, starting sessions, streaming events, and handling tool confirmations for Python, TypeScript, C#, Go, Java, PHP, Ruby, and cURL
39* **Client patterns:** Lossless stream reconnect, `processed_at` queued/processed gate, interrupt handling, file-mount gotchas, and credential handling
39* **Client patterns:** Lossless stream reconnect, `processed_at` queued/processed gate, interrupt handling, file-mount pitfalls, and credential handling
4040* **Deployment constraints:** Which platforms support Managed Agents, and the Messages API with tool use as the alternative on platforms that don't
4141 
4242## When the skill activates

agents-and-tools/agent-skills/overview Changed · +1 / -1 lines

from line 302
302302The exact runtime environment available to your Skill depends on the product surface where you use it.
303303 
304304* **claude.ai:**
305 * **Varying network access:** Depending on user/admin settings, Skills might have full, partial, or no network access. For more details, see the [Create and Edit Files](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude#h_6b7e833898) support article.
305 * **Varying network access:** Depending on user/admin settings, Skills might have full, partial, or no network access. For more details, see the [Create and edit files with Claude](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude#h_6b7e833898) support article.
306306 
307307* **Claude API:**
308308 

agents-and-tools/agent-skills/quickstart Changed · +3 / -1 lines

from line 86
8686 ```java Java
8787 // List Anthropic-managed Skills
8888 SkillListPage skills = client.skills().list(
89 SkillListParams.builder().source("anthropic").build()
89 SkillListParams.builder()
90 .source("anthropic")
91 .build()
9092 );
9193 
9294 for (Skill skill : skills.data()) {
Feedback