Skip to content

feat: Anthropic extended thinking and interleaved thinking #628

@WtXeLd

Description

@WtXeLd

Description:

The Python SDK recently added support for Anthropic's extended thinking and interleaved thinking capabilities (merged in this PR). This feature is currently missing in the JavaScript/TypeScript SDK.

Current Behavior:
The JS/TS SDK does not support Anthropic models' thinking blocks, which are required as the first content in assistant messages when reasoning is enabled.

Requested Feature:
Add support for Anthropic extended thinking in the JS/TS SDK, similar to the Python implementation:

  • Store thinking text in response reasoning items
  • Handle both streaming and non-streaming cases
  • Support interleaved thinking when using tools with Claude models

Motivation:
This feature is critical for our project as we rely on Claude models' reasoning capabilities. Having parity between the Python and JS/TS SDKs would enable us to use the same advanced features across our stack.

Reference:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions