Skip to content

fix (provider/amazon-bedrock): better resolve mime-types of document and images #6185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christian-bromann
Copy link
Contributor

Background

I came across issue #5606 and thought it could be an easy fix.

Summary

According to the Bedrock API reference the following formats are supported for:

  • images: png | jpeg | gif | webp
  • documents: pdf | csv | doc | docx | xls | xlsx | html | txt | md

Verification

I haven't manually verified these types and implemented the change based on the assumption that the documentation is correct.

Tasks

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)

Future Work

n/a

Related Issues

Fixes #5606

@brianprost
Copy link

brianprost commented May 9, 2025

thanks for this! i've been going crazy for the past week trying every which way to redo how the mimeType is being exposed

@ecjs
Copy link

ecjs commented May 9, 2025

Also THANK YOU for doing this...been wrestling with this bug for hours!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

amazon bedrock package incorrectly extracting mimetype from files
3 participants