Skip to content

Support Anthropic interleaved thinking with tool use #3513

@markpollack

Description

@markpollack

support Claude 4 models feature of interleaved thinking with tool use, allowing the model to reason between tool calls.

See https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#extended-thinking-with-tool-use

To support this feature will require

  • Store thinking blocks, their signatures, and the order in which they appeared
  • Maintain this state between API calls in a multi-turn conversation
  • Add support for the interleaved-thinking-2025-05-14 beta header
  • Enforce compatible tool_choice settings (auto or none only)
  • Allow budget_tokens to exceed max_tokens for interleaved thinking

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions