From 0aab45be7d5c9cc686ccb4f0e7bd942c8af3ae9b Mon Sep 17 00:00:00 2001 From: Michael Gendy <50384638+Mng-dev-ai@users.noreply.github.com> Date: Fri, 12 Sep 2025 12:22:01 +0300 Subject: [PATCH] Remove max thinking tokens (#144) It's not used anywhere and it can be set through the env parameter `ClaudeCodeOptions(env={"MAX_THINKING_TOKENS" : 8000})` --- examples/streaming_mode.py | 1 - src/claude_code_sdk/types.py | 1 - tests/test_types.py | 1 - 3 files changed, 3 deletions(-) diff --git a/examples/streaming_mode.py b/examples/streaming_mode.py index 333b488..fa1aa30 100755 --- a/examples/streaming_mode.py +++ b/examples/streaming_mode.py @@ -217,7 +217,6 @@ async def example_with_options(): # Configure options options = ClaudeCodeOptions( allowed_tools=["Read", "Write"], # Allow file operations - max_thinking_tokens=10000, system_prompt="You are a helpful coding assistant.", env={ "ANTHROPIC_MODEL": "claude-3-7-sonnet-20250219", diff --git a/src/claude_code_sdk/types.py b/src/claude_code_sdk/types.py index 79d21ff..d63f6ea 100644 --- a/src/claude_code_sdk/types.py +++ b/src/claude_code_sdk/types.py @@ -271,7 +271,6 @@ class ClaudeCodeOptions: """Query options for Claude SDK.""" allowed_tools: list[str] = field(default_factory=list) - max_thinking_tokens: int = 8000 system_prompt: str | None = None append_system_prompt: str | None = None mcp_servers: dict[str, McpServerConfig] | str | Path = field(default_factory=dict) diff --git a/tests/test_types.py b/tests/test_types.py index 42aea65..a72323e 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -80,7 +80,6 @@ class TestOptions: """Test Options with default values.""" options = ClaudeCodeOptions() assert options.allowed_tools == [] - assert options.max_thinking_tokens == 8000 assert options.system_prompt is None assert options.permission_mode is None assert options.continue_conversation is False