claude adaptive thinking (#7944)
Signed-off-by: Angie Jones <angie@Angies-MBP.lan> Co-authored-by: Angie Jones <angie@Angies-MacBook-Pro.local> Co-authored-by: Angie Jones <angie@Angies-MBP.lan>
This commit is contained in:
@@ -1262,7 +1262,7 @@ Some models expose their internal reasoning or "chain of thought" as part of the
|
||||
| **DeepSeek-R1** (via OpenAI, Ollama, OpenRouter, OVHcloud, etc.) | Reasoning captured from the `reasoning_content` field in the API response |
|
||||
| **Kimi** (via Groq or other OpenAI-compatible endpoints) | Reasoning captured from the `reasoning_content` field in the API response |
|
||||
| **Gemini CLI** (Google Gemini models with thinking enabled) | Thinking blocks captured from the streaming response |
|
||||
| **Claude** (Anthropic, with [extended thinking](/docs/guides/environment-variables#claude-extended-thinking) enabled) | Thinking blocks captured from the API response |
|
||||
| **Claude** (Anthropic, with [Claude thinking](/docs/guides/environment-variables#claude-thinking-configuration) enabled) | Thinking blocks captured from the API response |
|
||||
|
||||
<Tabs groupId="interface">
|
||||
<TabItem value="ui" label="goose Desktop" default>
|
||||
|
||||
@@ -164,28 +164,32 @@ export GOOSE_LEAD_FAILURE_THRESHOLD=3
|
||||
export GOOSE_LEAD_FALLBACK_TURNS=2
|
||||
```
|
||||
|
||||
### Claude Extended Thinking
|
||||
### Claude Thinking Configuration
|
||||
|
||||
These variables control Claude's [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking) feature, which allows the model to reason through complex problems before generating a response. Supported on Anthropic and Databricks providers.
|
||||
These variables control Claude's reasoning behavior. Supported on Anthropic and Databricks providers.
|
||||
|
||||
| Variable | Purpose | Values | Default |
|
||||
|----------|---------|---------|---------|
|
||||
| `CLAUDE_THINKING_ENABLED` | Enables extended thinking for Claude models | Set to any value to enable | Disabled |
|
||||
| `CLAUDE_THINKING_BUDGET` | Maximum tokens allocated for Claude's internal reasoning process | Positive integer (minimum 1024) | 16000 |
|
||||
| `CLAUDE_THINKING_TYPE` | Controls Claude reasoning mode | `adaptive`, `enabled`, `disabled` | `adaptive` for Claude 4.6+ models, otherwise `disabled` |
|
||||
| `CLAUDE_THINKING_BUDGET` | Maximum tokens allocated for Claude's internal reasoning process when `CLAUDE_THINKING_TYPE=enabled` | Positive integer (minimum 1024) | 16000 |
|
||||
|
||||
**Examples**
|
||||
|
||||
```bash
|
||||
# Enable extended thinking with default budget (16000 tokens)
|
||||
export CLAUDE_THINKING_ENABLED=1
|
||||
# Claude 4.6 adaptive thinking
|
||||
export GOOSE_PROVIDER=anthropic
|
||||
export GOOSE_MODEL=claude-sonnet-4-6
|
||||
export CLAUDE_THINKING_TYPE=adaptive
|
||||
|
||||
# Enable with a larger budget for complex tasks
|
||||
export CLAUDE_THINKING_ENABLED=1
|
||||
# Explicit extended thinking with the default budget
|
||||
export CLAUDE_THINKING_TYPE=enabled
|
||||
|
||||
# Explicit extended thinking with a larger budget for complex tasks
|
||||
export CLAUDE_THINKING_TYPE=enabled
|
||||
export CLAUDE_THINKING_BUDGET=32000
|
||||
|
||||
# Enable with a smaller budget for faster responses
|
||||
export CLAUDE_THINKING_ENABLED=1
|
||||
export CLAUDE_THINKING_BUDGET=8000
|
||||
# Disable Claude thinking entirely
|
||||
export CLAUDE_THINKING_TYPE=disabled
|
||||
```
|
||||
|
||||
:::tip Viewing Thinking Output
|
||||
@@ -734,4 +738,3 @@ When deploying goose in enterprise environments, administrators might need to co
|
||||
- For security-sensitive variables (like API keys), consider using the system keyring instead of environment variables.
|
||||
- Some variables may require restarting goose to take effect.
|
||||
- When using the planning mode, if planner-specific variables are not set, goose will fall back to the main model configuration.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user