reproduction: @ai-sdk/amazon-bedrock S3 / Image URL support - #17676
Closed
lgrammel wants to merge 1 commit into
Closed
reproduction: @ai-sdk/amazon-bedrock S3 / Image URL support#17676lgrammel wants to merge 1 commit into
lgrammel wants to merge 1 commit into
Conversation
1 task
lgrammel
added a commit
that referenced
this pull request
Jul 22, 2026
…ed through to inference (#17693) ## Background The published Amazon Bedrock provider rejected S3-hosted images before inference, forcing users to load image bytes into memory. ## Root Cause The model declared no native URL support, causing the core downloader to reject s3:// URLs, while Bedrock message conversion also unconditionally rejected URL-backed files. Reproduction confirmed AI_DownloadError through generateText and AI_UnsupportedFunctionalityError through direct provider use. ## Summary The provider now recognizes s3:// image URLs and serializes user and tool-result images as Bedrock s3Location sources. Bedrock image source types and a patch changeset were updated. ## Testing Added regression coverage for native S3 URL declaration and conversion of user and tool-result S3 images. ## End-to-end Validation - `AWS_REGION=us-east-1 pnpm -C examples/ai-functions exec tsx src/reproduction/amazon-bedrock-s3-image-url.ts` using a temporary Nova variant reached live Bedrock and returned `Provided S3Location not found`, confirming pass-through instead of the previous pre-inference `AI_DownloadError`. ## Related Issues Fixes #15792 Closes #17676 Backport of #17681 Co-authored-by: tommyOtsai <171396937+tommyOtsai@users.noreply.github.com>
lgrammel
added a commit
that referenced
this pull request
Jul 22, 2026
…ed through to inference (#17694) ## Background The published Amazon Bedrock provider rejected S3-hosted images before inference, forcing users to load image bytes into memory. ## Root Cause The model declared no native URL support, causing the core downloader to reject s3:// URLs, while Bedrock message conversion also unconditionally rejected URL-backed files. Reproduction confirmed AI_DownloadError through generateText and AI_UnsupportedFunctionalityError through direct provider use. ## Summary The provider now recognizes s3:// image URLs and serializes user and tool-result images as Bedrock s3Location sources. Bedrock image source types and a patch changeset were updated. ## Testing Added regression coverage for native S3 URL declaration and conversion of user and tool-result S3 images. ## End-to-end Validation - `AWS_REGION=us-east-1 pnpm -C examples/ai-functions exec tsx src/reproduction/amazon-bedrock-s3-image-url.ts` using a temporary Nova variant reached live Bedrock and returned `Provided S3Location not found`, confirming pass-through instead of the previous pre-inference `AI_DownloadError`. ## Related Issues Fixes #15792 Closes #17676 Backport of #17681 Co-authored-by: tommyOtsai <171396937+tommyOtsai@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.
Bug
@ai-sdk/amazon-bedrock S3 / Image URL support
Reproduction
main,@ai-sdk/amazon-bedrock5.0.27 cannot pass S3-hosted images to Amazon Bedrock, forcing users toward memory-intensive byte or base64 inputs.examples/ai-functions/src/reproduction/amazon-bedrock-s3-image-url.tsobservedAI_DownloadErrorfor ans3://image before inference; AWS documents that the URL should be forwarded asimage.source.s3Location.AI_UnsupportedFunctionalityError: 'File URL data' functionality not supported, so download configuration does not resolve the failure.packages/amazon-bedrock/src/amazon-bedrock-s3-image-url.reproduction.test.tsandpackages/amazon-bedrock/src/__fixtures__/amazon-bedrock-s3-image-url.jsonassert the expected Bedrock request; the test failed before fetch instead of producing the documenteds3Locationrequest.APICallError; this does not affect the reproduced S3 failure.Relevant Documentation
Related Issues
Reproduces #15792