Skip to content
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

Image generation does not work with Amazon Bedrock #4942

Open
ebaizel opened this issue Feb 19, 2025 · 3 comments · May be fixed by #4953
Open

Image generation does not work with Amazon Bedrock #4942

ebaizel opened this issue Feb 19, 2025 · 3 comments · May be fixed by #4953
Labels
bug Something isn't working

Comments

@ebaizel
Copy link

ebaizel commented Feb 19, 2025

Description

I am trying to generate images using Bedrock but getting an error No such imageModel:bedrock:amazon.nova-canvas-v1:0. It works with openai.

Here is a code snippet:

import { generateText, experimental_generateImage } from 'ai';

const registry = createProviderRegistry({
  bedrock,
});

const { image } = await experimental_generateImage({
  model: registry.imageModel('bedrock:amazon.nova-canvas-v1:0'),
  prompt: 'A beautiful sunset over a calm ocean',
});

Here is the full error:

[2025-02-19 14:03:11] INFO: Generating image with options:
    imageModelProvider: "amazon.nova-canvas-v1:0"
[2025-02-19 14:03:11] ERROR: Bedrock image generation failed: No such imageModel: bedrock:amazon.nova-canvas-v1:0
[2025-02-19 14:03:11] ERROR: Image generation failed or returned no data.

Code example

No response

AI provider

No response

Additional context

No response

@ebaizel ebaizel added the bug Something isn't working label Feb 19, 2025
@nicoalbanese
Copy link
Contributor

Hi @ebaizel - thanks for the issue. This is because image generation isn't yet supported with the Bedrock provider. More info on currently support models/providers here.

@ebaizel
Copy link
Author

ebaizel commented Feb 20, 2025

That would explain it :) Do you have a rough ETA of when it might get added? Trying to decide if we wait for this to get added in, or if we embed the AWS SDK in order to support image gen. Ideally would just use the AI SDK since we're already using it for text inference.

@dreamorosi
Copy link

Hi, I have opened a PR to add support for image generation using the Amazon Canvas Model.

I have followed the implementation of other similar providers, hopefully we can get it merged 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants