Skip to content

Fix: Default vision model overriding custom model name for AWS Chat Bedrock. #4309

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

Merged
merged 2 commits into from
Apr 18, 2025

Conversation

nicklhw
Copy link
Contributor

@nicklhw nicklhw commented Apr 16, 2025

This PR fixes this bug.

Bedrock requires the use of an inference profile when making on-demand API requests to Claude sonnet. The inference profile is in the form <region>.<model name and version>, i.e. us.anthropic.claude-3-7-sonnet-20250219-v1:0. The inference profile ID needs to be set as the Custom Model Name attribute for the AWS ChatBedrock node in order to override the default model name.

image

The existing code incorrectly sets the vision model to default to anthropic.claude-3-haiku-20240307-v1:0 when an inference profile ID is set as the Custom Model Name. For example, setting custom model name us.anthropic.claude-3-7-sonnet-20250219-v1:0 will cause the vision model to default to haiku because the custom model name does not start with claude-3.

The proposed fix checks that the model name includes the string claude-3, which would allow the custom model name to be used as the vision model.

Copy link
Contributor

@HenryHengZJ HenryHengZJ left a comment

Choose a reason for hiding this comment

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

thanks!

@HenryHengZJ HenryHengZJ merged commit ddba891 into FlowiseAI:main Apr 18, 2025
2 checks passed
Yshayy pushed a commit to Yshayy/Flowise that referenced this pull request Apr 23, 2025
…edrock. (FlowiseAI#4309)

fix condition to not default to claude haiku when custom model name is provided
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.

2 participants