feat(Bedrock): add image support to Bedrock#1874
Merged
jxnl merged 1 commit into567-labs:mainfrom Oct 29, 2025
geekbass:geekbass/add-image-support-bedrock
Merged
feat(Bedrock): add image support to Bedrock#1874jxnl merged 1 commit into567-labs:mainfrom geekbass:geekbass/add-image-support-bedrock
jxnl merged 1 commit into567-labs:mainfrom
geekbass:geekbass/add-image-support-bedrock
Conversation
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to f108825 in 1 minute and 7 seconds. Click for details.
- Reviewed
376lines of code in6files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. instructor/providers/bedrock/utils.py:135
- Draft comment:
Defaulting to 'jpeg' for unsupported mime types is intentional; consider logging a warning for unexpected mime types for easier debugging in the future. - Reason this comment was not posted:
Confidence changes required:33%<= threshold85%None
2. instructor/providers/bedrock/utils.py:170
- Draft comment:
Error handling for data URLs is clear; optionally, include the invalid input value in the error message for enhanced troubleshooting. - Reason this comment was not posted:
Confidence changes required:33%<= threshold85%None
3. instructor/providers/bedrock/utils.py:181
- Draft comment:
Good use of specific exception handling for HTTP requests; consider implementing a retry mechanism or centralizing HTTP calls if image fetching failures become common in production. - Reason this comment was not posted:
Confidence changes required:33%<= threshold85%None
4. tests/llm/test_bedrock/test_openai_image_conversion.py:20
- Draft comment:
This test depends on an external URL, which may lead to flaky tests. Consider mocking the HTTP request to simulate image fetching reliably. - Reason this comment was not posted:
Confidence changes required:66%<= threshold85%None
5. tests/llm/test_bedrock/test_openai_image_conversion.py:30
- Draft comment:
Consider adding tests for unsupported content types in _to_bedrock_content_items to further validate error handling robustness. - Reason this comment was not posted:
Confidence changes required:33%<= threshold85%None
Workflow ID: wflow_D1FCx1OBWCObmP6U
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Contributor
Author
|
Sorry I'm making this a mess but I'm not getting the PR template. |
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.
Important
Adds image support to Bedrock by converting OpenAI-style image parts to Bedrock format and updates related utilities and tests.
_normalize_bedrock_image_format()to map image types to Bedrock's format inutils.py._openai_image_part_to_bedrock()to convert OpenAI-style image parts to Bedrock format inutils.py._prepare_bedrock_converse_kwargs_internal()to handle image content conversion inutils.py.test_bedrock_native_passthrough.pyto test Bedrock-native text and image passthrough.test_normalize.pyto test image format normalization.test_openai_image_conversion.pyto test OpenAI image part conversion.test_prepare_kwargs.pyto test preparation of Bedrock API call arguments with images.conftest.pyfor image data used in tests.This description was created by
for f108825. You can customize this summary. It will automatically update as commits are pushed.