[Bug]: Flux image generation tool compatibility with Claude 3.7 on AWS Bedrock #6255
Open
1 task done
Labels
🐛 bug
Something isn't working
What happened?
Bug Report: Image Generation Fails with Claude 3.7 on AWS Bedrock
Issue Description
When using the Flux image generation tool with Claude 3.7 on AWS Bedrock, generated images fail to display in the chat interface. The following error is returned in the API response:
Environment
Expected Behavior
The generated image should be displayed in the chat interface after successful generation.
Actual Behavior
No image is displayed. Looking at the developer console or logs reveals the format validation error message.
Root Cause Analysis
The issue occurs because the response format returned by the FluxAPI tool doesn't match the schema expected by Claude 3.7 on AWS Bedrock. The current implementation in
FluxAPI.js
uses a nested array structure that triggers format validation errors with the AWS Bedrock implementation.Specifically, the current code returns:
which creates a nested array structure that fails validation.
Solution
This issue has been fixed in PR #6253 by updating the response format to use a cleaner structure:
This flat structure with properly typed content objects satisfies the validation requirements of AWS Bedrock's Claude 3.7 implementation.
Additional Context
This issue appears to be specific to Claude 3.7 on AWS Bedrock, which has stricter validation requirements for tool response formats compared to some other implementations.
Version Information
35da0859ce14bf0fbdf63507ced93a2cf61301fd
Steps to Reproduce
Steps to Reproduce
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: