Skip to content

Conversation

@joelochlann
Copy link
Member

@joelochlann joelochlann commented Jan 27, 2026

We are planning to implement resizing and TIFF-handling logic that will make all these tests pass.

First, we need to know exactly the requirements of Bedrock Cohere v3.

The AWS docs claim that the image can have a max size of 5 MB, but the tests prove that in actual fact that limit is 5 mebibytes (MiB), i.e. 5 * 1024 * 1024 = 5,242,880.

So PNGs and JPGs under the size limit currently work fine, but TIFFs of any size fail, as do PNGs and JPGs over the size limit.

Screenshot 2026-01-27 at 16 34 58

how to test

Run

npm run test:integration

This will hit Bedrock for real

@joelochlann joelochlann requested a review from a team as a code owner January 27, 2026 16:09
@github-actions
Copy link

github-actions bot commented Jan 27, 2026

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "jest",
"test:integration": "AWS_PROFILE=media-service NODE_OPTIONS='--experimental-vm-modules' jest --config jest.integration.config.ts",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://jestjs.io/docs/ecmascript-modules for why --experimental-vm-modules

(VSCode doesn't like me putting comments in JSON!)

Maybe there's another solution involving fiddling with the tsconfig or transpiling but I didn't want to go down that road

@joelochlann joelochlann added the feature Departmental tracking: work on a new feature label Jan 27, 2026
Copy link
Contributor

@ellenmuller ellenmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

I've gone ahead and removed the images that were in the image-embedding-test bucket in the test-folder, because we don't need those anymore now that we can embed from localstack and test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants