Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] Handle SDK_UNKNOWN_MEMBER in Content Blocks #736

@dbschmigelski

Description

@dbschmigelski

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

1.5.0

Python Version

3.10

Operating System

macOs

Installation Method

pip

Steps to Reproduce

When using an older version of boto3 (< 1.30.0), which is reasoningContent blocks are not supported. The client then began returning

{'SDK_UNKNOWN_MEMBER': {'name': 'reasoningContent'}}

This behavior is documented in the boto3 but not the bedrock documentation

In the event new content types are added, the current code is not able to handle SDK_UNKNOWN_MEMBER.

Expected Behavior

When SDK_UNKNOWN_MEMBER is returned, the content block is dropped.

Actual Behavior

Exception is thrown

Unknown parameter in messages[1].content[1]: "SDK_UNKNOWN_MEMBER", must be one of: text, image, document, toolUse, toolResult, guardContent

Additional Context

In addition to the SDK_UNKNOWN_MEMBER handling, we may also want to consider bumping the minimum boto3 version in the next minor version release.

Possible Solution

No response

Related Issues

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions