Skip to content

[FEATURE] BedrockModel - support redactedContent in reasoningContent streamed events #99

@awsarron

Description

@awsarron

Problem Statement

Bedrock models with extended thinking return reasoningContent events. These events can contain either reasoningText or redactedContent (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ReasoningContentBlock.html). Currently the BedrockModel provider handles reasoningText but not redactedContent:

elif "reasoningContent" in delta_content:
if "text" in delta_content["reasoningContent"]:
if "reasoningText" not in state:
state["reasoningText"] = ""
state["reasoningText"] += delta_content["reasoningContent"]["text"]
callback_handler(
reasoningText=delta_content["reasoningContent"]["text"],
delta=delta_content,
reasoning=True,
**kwargs,
)

Proposed Solution

Support redactedContent in reasoningContent Bedrock Model events.

Use Case

Implement handling of redactedContent in my agent's async iterator or callback handler.

Alternatives Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions