fix(amazon-bedrock): support document files in tool results#15534
Merged
Conversation
5 tasks
aayush-kapoor
commented
May 22, 2026
| ) { | ||
| throw new UnsupportedFunctionalityError({ | ||
| functionality: `media type: ${contentPart.mediaType}`, | ||
| toolResultContent = await Promise.all( |
Collaborator
Author
There was a problem hiding this comment.
it needs an await since for handling docs/files in amazon bedrock, we use shouldEnableCitations which is async in nature
lgrammel
approved these changes
May 27, 2026
Contributor
|
|
aayush-kapoor
added a commit
that referenced
this pull request
May 27, 2026
…#15626) This is an automated backport of #15534 to the release-v6.0 branch. FYI @aayush-kapoor This backport has conflicts that need to be resolved manually. ### `git cherry-pick` output ``` Auto-merging packages/amazon-bedrock/src/bedrock-api-types.ts CONFLICT (content): Merge conflict in packages/amazon-bedrock/src/bedrock-api-types.ts Auto-merging packages/amazon-bedrock/src/convert-to-bedrock-chat-messages.test.ts Auto-merging packages/amazon-bedrock/src/convert-to-bedrock-chat-messages.ts CONFLICT (content): Merge conflict in packages/amazon-bedrock/src/convert-to-bedrock-chat-messages.ts error: could not apply 9d5a299... fix(amazon-bedrock): support document files in tool results (#15534) hint: After resolving the conflicts, mark them with hint: "git add/rm <pathspec>", then run hint: "git cherry-pick --continue". hint: You can instead skip this commit with "git cherry-pick --skip". hint: To abort and get back to the state before "git cherry-pick", hint: run "git cherry-pick --abort". hint: Disable this message with "git config set advice.mergeConflict false" ``` --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Aayush Kapoor <aayushkapoor34@gmail.com> Co-authored-by: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
reported in #15319
alternate to #15361 with all signed commits + reproduction
the
tool-result case 'file'branch only allows image media types, everything else throwsUnsupportedFunctionalityError. PDFs and other documents are unsupported, even though Bedrock's Converse API accepts documents.Summary
tool-result file handling now mirrors user-message file handling:
Manual Verification
repro:
Checklist
pnpm changesetin the project root)Related Issues
fixes #15319
Co-authored-by: Pragnyan Ramtha pragnyanramtha@gmail.com