fast-mode changedbuild-with-claude/fast-mode
Nearest release: v2.1.309, published 3 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+31added
Lines−28removed
From line
146
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits20to this page, all time
The whole hunk
from line 146, old and new numbered
/
from line 146
146146 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
147147
148148 Message response = client.messages().create(
149 MessageCreateParams.builder()
150 .model(Model.CLAUDE_OPUS_5_5)
151 .maxTokens(4096L)
152 .speed(MessageCreateParams.Speed.FAST)
153 .addUserMessage("Refactor this module to use dependency injection")
154 .build());
149 MessageCreateParams.builder()
150 .model(Model.CLAUDE_OPUS_5_5)
151 .maxTokens(4096L)
152 .speed(MessageCreateParams.Speed.FAST)
153 .addUserMessage("Refactor this module to use dependency injection")
154 .build());
155155
156156 response.content().stream()
157 .flatMap(block -> block.text().stream())
158 .forEach(textBlock -> IO.println(textBlock.text()));
157 .flatMap(block -> block.text().stream())
158 .forEach(textBlock -> IO.println(textBlock.text()));
159159 ```
160160
161161 ```php PHP
from line 162
162162 $client = new Client();
163163
164164 $response = $client->messages->create(
165 model: 'claude-opus-5-5',
165 model: Model::CLAUDE_OPUS_5_5,
166166 maxTokens: 4096,
167167 speed: 'fast',
168168 messages: [
from line 338
338338 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
339339
340340 MessageCreateParams params = MessageCreateParams.builder()
341 .model(Model.CLAUDE_OPUS_5_5)
342 .maxTokens(1024L)
343 .speed(MessageCreateParams.Speed.FAST)
344 .addUserMessage("Hello")
345 .build();
341 .model(Model.CLAUDE_OPUS_5_5)
342 .maxTokens(1024L)
343 .speed(MessageCreateParams.Speed.FAST)
344 .addUserMessage("Hello")
345 .build();
346346
347347 Message response = client.messages().create(params);
348348 IO.println(response.usage().speed().orElseThrow()); // "fast" or "standard"
from line 352
352352 $client = new Client();
353353
354354 $response = $client->messages->create(
355 model: 'claude-opus-5-5',
355 model: Model::CLAUDE_OPUS_5_5,
356356 maxTokens: 1024,
357357 speed: 'fast',
358358 messages: [['role' => 'user', 'content' => 'Hello']],
from line 578
578578 import com.anthropic.errors.InternalServerException;
579579 import com.anthropic.errors.RateLimitException;
580580 // ...
581 // Disable SDK auto-retry so the fallback logic below handles it
581 // Disable SDK auto-retry so the fallback logic that follows handles it
582582 AnthropicClient client =
583 AnthropicOkHttpClient.builder().fromEnv().maxRetries(0).build();
583 AnthropicOkHttpClient.builder()
584 .fromEnv()
585 .maxRetries(0)
586 .build();
584587
585588 Message createMessageWithFastFallback(
586589 MessageCreateParams params, int maxAttempts) {
from line 592
589592 } catch (RateLimitException e) {
590593 if (params.speed().isPresent()) {
591594 MessageCreateParams retryParams = params.toBuilder()
592 .speed(Optional.empty())
593 .build();
595 .speed(Optional.empty())
596 .build();
594597 return createMessageWithFastFallback(retryParams, maxAttempts);
595598 }
596599 throw e;
from line 607
604607
605608 void main() {
606609 Message message = createMessageWithFastFallback(
607 MessageCreateParams.builder()
608 .model(Model.CLAUDE_OPUS_5_5)
609 .maxTokens(1024L)
610 .addUserMessage("Hello")
611 .speed(MessageCreateParams.Speed.FAST)
612 .build(),
613 3);
610 MessageCreateParams.builder()
611 .model(Model.CLAUDE_OPUS_5_5)
612 .maxTokens(1024L)
613 .addUserMessage("Hello")
614 .speed(MessageCreateParams.Speed.FAST)
615 .build(),
616 3);
614617 message.content().stream()
615 .flatMap(block -> block.text().stream())
616 .forEach(textBlock -> IO.println(textBlock.text()));
618 .flatMap(block -> block.text().stream())
619 .forEach(textBlock -> IO.println(textBlock.text()));
617620 }
618621 ```
619622
No line in this hunk matches that.