Skip to content

Comments

fix(provider/bedrock):bedrock image style parameter#7037

Closed
huanshenyi wants to merge 10 commits intovercel:mainfrom
huanshenyi:feat/bedrock-image-style-parameter
Closed

fix(provider/bedrock):bedrock image style parameter#7037
huanshenyi wants to merge 10 commits intovercel:mainfrom
huanshenyi:feat/bedrock-image-style-parameter

Conversation

@huanshenyi
Copy link
Contributor

@huanshenyi huanshenyi commented Jul 4, 2025

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

nicoalbanese and others added 5 commits July 2, 2025 11:32
## Background

I noticed that in the [Providers and Models
docs](https://ai-sdk.dev/docs/foundations/providers-and-models), we
mention the Vercel (v0) model in the [Model

Capabilities](https://ai-sdk.dev/docs/foundations/providers-and-models#model-capabilities)
but not in the [AI SDK

Providers](https://ai-sdk.dev/docs/foundations/providers-and-models#ai-sdk-providers).

## Summary

This PR adds the Vercel Provider to the [Providers and Models
docs](https://ai-sdk.dev/docs/foundations/providers-and-models#ai-sdk-providers)
list.

## Tasks

- [x] Formatting issues have been fixed (run `pnpm prettier-fix` in the
project root)

Co-authored-by: Anshuman Bhardwaj <anshu5074@gmail.com>
@huanshenyi huanshenyi changed the title Feat/bedrock image style parameter fix(provider/bedrock):bedrock image style parameter Jul 6, 2025
The AI SDK comes with a wide range of providers that you can use to interact with different language models:

- [xAI Grok Provider](/providers/ai-sdk-providers/xai) (`@ai-sdk/xai`)
- [Vercel Provider](/providers/ai-sdk-providers/vercel) (`@ai-sdk/vercel`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert

} from '@ai-sdk/provider-utils';
import {
BedrockImageModelId,
BedrockImageStyle,
Copy link
Collaborator

Choose a reason for hiding this comment

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

where is this used?

@huanshenyi huanshenyi closed this Jul 8, 2025
@huanshenyi
Copy link
Contributor Author

@lgrammel
Thanks for the review! I’ve addressed the feedback in #7120.

I’m keeping this PR focused on enabling the feature; the providerOptions type updates will be submitted in a separate follow-up PR.

@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.

5 participants