claude-prompting-best-practices changedbuild-with-claude/prompt-engineering/claude-prompting-best-practices
Nearest release: v2.1.331, published 2 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+20added
Lines−20removed
From line
569
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits38to this page, all time
The whole hunk
from line 569, old and new numbered
/
from line 569
569569
570570<CodeGroup>
571571 ```bash cURL
572 # Before: extended thinking with a manual budget (older models)
572 # Before: extended thinking with a manual budget
573573 curl https://api.anthropic.com/v1/messages \
574574 -H "content-type: application/json" \
575575 -H "x-api-key: $ANTHROPIC_API_KEY" \
576576 -H "anthropic-version: 2026-10-21" \
577577 -d '{
578 "model": "claude-sonnet-4-5-20250929",
578 "model": "claude-opus-4-6",
579579 "max_tokens": 16000,
580580 "thinking": {"type": "enabled", "budget_tokens": 10000},
581581 "messages": [
from line 600
600600 ```
601601
602602 ```bash CLI
603 # Before: extended thinking with a manual budget (older models)
603 # Before: extended thinking with a manual budget
604604 ant messages create <<'YAML'
605 model: claude-sonnet-4-5-20250929
605 model: claude-opus-4-6
606606 max_tokens: 16000
607607 thinking:
608608 type: enabled
from line 627
627627 ```
628628
629629 ```python Python
630 # Before: extended thinking with a manual budget (older models)
630 # Before: extended thinking with a manual budget
631631 client.messages.create(
632 model="claude-sonnet-4-5-20250929",
632 model="claude-opus-4-6",
633633 max_tokens=16000,
634634 thinking={"type": "enabled", "budget_tokens": 10000},
635635 messages=[{"role": "user", "content": "..."}],
from line 646
646646 ```
647647
648648 ```typescript TypeScript
649 // Before: extended thinking with a manual budget (older models)
649 // Before: extended thinking with a manual budget
650650 await client.messages.create({
651 model: "claude-sonnet-4-5-20250929",
651 model: "claude-opus-4-6",
652652 max_tokens: 16000,
653653 thinking: { type: "enabled", budget_tokens: 10000 },
654654 messages: [{ role: "user", content: "..." }]
from line 665
665665 ```
666666
667667 ```csharp C#
668 // Before: extended thinking with a manual budget (older models)
668 // Before: extended thinking with a manual budget
669669 await client.Messages.Create(new MessageCreateParams
670670 {
671 Model = Model.ClaudeSonnet4_5_20250929,
671 Model = Model.ClaudeOpus4_6,
672672 MaxTokens = 16000,
673673 Thinking = new ThinkingConfigEnabled(budgetTokens: 10000),
674674 Messages = [new UserMessageParam { Content = "..." }]
from line 686
686686 ```
687687
688688 ```go Go
689 // Before: extended thinking with a manual budget (older models)
689 // Before: extended thinking with a manual budget
690690 client.Messages.New(ctx, anthropic.MessageNewParams{
691 Model: anthropic.ModelClaudeSonnet4_5_20250929,
691 Model: anthropic.ModelClaudeOpus4_6,
692692 MaxTokens: 16000,
693693 Thinking: anthropic.ThinkingConfigParamUnion{
694694 OfEnabled: &anthropic.ThinkingConfigEnabledParam{BudgetTokens: 10000},
from line 715
715715 ```
716716
717717 ```java Java
718 // Before: extended thinking with a manual budget (older models)
718 // Before: extended thinking with a manual budget
719719 client.messages().create(MessageCreateParams.builder()
720 .model(Model.CLAUDE_SONNET_4_5_20250929)
720 .model(Model.CLAUDE_OPUS_4_6)
721721 .maxTokens(16000L)
722722 .thinking(ThinkingConfigEnabled.builder()
723723 .budgetTokens(10000L)
from line 738
738738 ```
739739
740740 ```php PHP
741 // Before: extended thinking with a manual budget (older models)
741 // Before: extended thinking with a manual budget
742742 $client->messages->create(
743 model: 'claude-sonnet-4-5-20250929',
743 model: Model::CLAUDE_OPUS_4_6,
744744 maxTokens: 16000,
745 thinking: ['type' => 'enabled', 'budget_tokens' => 10000],
745 thinking: ['type' => 'enabled', 'budgetTokens' => 10000],
746746 messages: [['role' => 'user', 'content' => '...']],
747747 );
748748
749749 // After: adaptive thinking with effort
750750 $client->messages->create(
751 model: 'claude-opus-5-5',
751 model: Model::CLAUDE_OPUS_5_5,
752752 maxTokens: 16000,
753753 thinking: ['type' => 'adaptive'],
754754 outputConfig: ['effort' => 'high'],
from line 757
757757 ```
758758
759759 ```ruby Ruby
760 # Before: extended thinking with a manual budget (older models)
760 # Before: extended thinking with a manual budget
761761 client.messages.create(
762 model: "claude-sonnet-4-5-20250929",
762 model: Anthropic::Model::CLAUDE_OPUS_4_6,
763763 max_tokens: 16000,
764764 thinking: { type: "enabled", budget_tokens: 10000 },
765765 messages: [{ role: "user", content: "..." }]
No line in this hunk matches that.