Commit 9271e9b
feat: add ThinkingConfig types and effort option to ClaudeAgentOptions
- Add ThinkingConfigAdaptive, ThinkingConfigEnabled, ThinkingConfigDisabled
TypedDict types and a ThinkingConfig union type in types.py
- Add `thinking: ThinkingConfig | None` field to ClaudeAgentOptions,
which takes precedence over the deprecated `max_thinking_tokens`
- Add `effort: Literal["low", "medium", "high", "max"] | None` field
to ClaudeAgentOptions, passed via --effort CLI flag
- Update subprocess_cli.py to resolve thinking config into
--max-thinking-tokens: adaptive defaults to 32_000, enabled uses
budget_tokens, disabled uses 0
- Export new ThinkingConfig types from the top-level package
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4703cae commit 9271e9b
File tree
3 files changed
+46
-4
lines changed- src/claude_agent_sdk
- _internal/transport
3 files changed
+46
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
334 | 338 | | |
335 | 339 | | |
336 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
337 | 345 | | |
338 | 346 | | |
339 | 347 | | |
| |||
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
304 | 317 | | |
305 | 318 | | |
306 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
699 | 715 | | |
700 | 716 | | |
701 | 717 | | |
| |||
753 | 769 | | |
754 | 770 | | |
755 | 771 | | |
| 772 | + | |
756 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
757 | 778 | | |
758 | 779 | | |
759 | 780 | | |
| |||
0 commit comments