Skip to content

Comments

feat(amazon-bedrock): add style parameter support for image generation#7120

Merged
lgrammel merged 1 commit intovercel:mainfrom
huanshenyi:feat/nova-canvas-style-parameter
Jul 8, 2025
Merged

feat(amazon-bedrock): add style parameter support for image generation#7120
lgrammel merged 1 commit intovercel:mainfrom
huanshenyi:feat/nova-canvas-style-parameter

Conversation

@huanshenyi
Copy link
Contributor

Background

Amazon Nova Canvas now supports predefined visual styles for image generation via the style parameter. AI SDK didn’t forward this parameter, so users couldn’t take advantage of the feature.

Summary

Adds conditional support for style in the image-generation request:

...(providerOptions?.bedrock?.style
  ? { style: providerOptions.bedrock.style }
  : {}),

Changes:

  • Inject the style field into the request body when providerOptions.bedrock.style is defined.

Verification

  1. Building the package with pnpm build
  2. Running tests with pnpm test in the packages/amazon-bedrock directory
  3. Confirmed request body contains the style field only when specified.

Tasks

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)

Future Work

  • Add docs & examples for using providerOptions.bedrock.style.
  • Consider a TypeScript enum / union for autocomplete.
  • Validate style values against the supported set.

Related Issues

N/A - This is a feature addition based on the latest AWS documentation for Amazon Nova Canvas.

Reference

AWS Documentation - Amazon Nova Canvas Request and Response Structure

@lgrammel lgrammel merged commit 89eaf5e into vercel:main Jul 8, 2025
9 of 10 checks passed
@gr2m gr2m added ai/provider provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider labels Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants