Skip to content

feat(bedrock-converse): Support thinking display & ensure that reasoningContent without text is captured#21592

Open
mattref wants to merge 1 commit intorun-llama:mainfrom
mattref:bedrock-converse-thinking-display
Open

feat(bedrock-converse): Support thinking display & ensure that reasoningContent without text is captured#21592
mattref wants to merge 1 commit intorun-llama:mainfrom
mattref:bedrock-converse-thinking-display

Conversation

@mattref
Copy link
Copy Markdown
Contributor

@mattref mattref commented May 8, 2026

Description

This PR contains two features:

  1. Adds support for controlling thinking display ("summarized" or "omitted") when using Adaptive/Extended thinking with Claude models, which is needed when working with models like Claude Opus 4.7 that hide thinking text by default via thinking.display being set to "omitted"

Thinking blocks still appear in the response stream on Claude Opus 4.7, but their thinking field is empty unless you explicitly opt in. This is a silent change from Claude Opus 4.6, where the default was to return summarized thinking text. To restore summarized thinking content on Claude Opus 4.7, set thinking.display to "summarized"

  1. Ensures that reasoningContent from Converse/ConverseStream without text (but with a signature) is captured via ToolCallBlock and provided back to Converse/ConverseStream for multi-turn continuity.

The display field on the thinking configuration controls how thinking content is returned in API responses. It accepts two values:

  • "summarized": Thinking blocks contain summarized thinking text. See Summarized thinking for details. This is the default on Claude Opus 4.6, Claude Sonnet 4.6, and earlier Claude 4 models.
  • "omitted": Thinking blocks are returned with an empty thinking field. The signature field still carries the encrypted full thinking for multi-turn continuity (see Thinking encryption). This is the default on Claude Opus 4.7 and Claude Mythos Preview.

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 8, 2026
@mattref mattref force-pushed the bedrock-converse-thinking-display branch from 3cddab8 to d78eff3 Compare May 9, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant