Skip to content

Conversation

@evalstate
Copy link
Owner

No description provided.

claude and others added 5 commits December 24, 2025 11:16
Add comprehensive support for Anthropic's Extended Thinking feature:

- Add ThinkingBlock, ThinkingDelta, and related type imports
- Add thinking_enabled and thinking_budget_tokens config options
- Update model database with anthropic_thinking reasoning mode for Claude 4+
- Handle ThinkingDelta streaming with is_reasoning=True
- Store thinking segments in REASONING channel for UI display
- Store raw thinking blocks for tool use passback (API verification)
- Add interleaved-thinking-2025-05-14 beta header for tool use
- Update multipart converter to preserve thinking blocks in assistant messages
- Extract thinking_tokens in usage tracking
- Handle structured output mutual exclusivity (thinking disabled)

Extended thinking enables Claude to show step-by-step reasoning while
maintaining compatibility with tool use through interleaved thinking.
Replace the two-field config (thinking_enabled + thinking_budget_tokens)
with a single thinking_budget_tokens field where:
- None = disabled (default)
- >= 1024 = enabled with that budget

This matches Anthropic's API model more closely - you either don't send
the thinking parameter or you send it with a budget. The awkward states
like "enabled but no budget" or "budget set but disabled" are eliminated.

Also adds warnings for:
- Budgets below 1024 (auto-corrected to minimum)
- Budgets above 32K (may cause timeouts per Anthropic docs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants