Skip to content

docs(examples): switch next example to use AI Gateway provider#8654

Merged
gr2m merged 3 commits intovercel:mainfrom
fveiraswww:feat/update-provider-to-ai-gateway
Sep 15, 2025
Merged

docs(examples): switch next example to use AI Gateway provider#8654
gr2m merged 3 commits intovercel:mainfrom
fveiraswww:feat/update-provider-to-ai-gateway

Conversation

@fveiraswww
Copy link
Contributor

@fveiraswww fveiraswww commented Sep 15, 2025

Background

the Next.js example was using the OpenAI provider directly, which requires users to have an OpenAI API key and limits them to only OpenAI models. By switching to AI Gateway, users can access multiple AI providers

Summary

  • Replaced @ai-sdk/openai provider with a direct model string
  • Updated the Next.js example to use the cheaper gpt-5-nano model

Manual Verification

@gr2m verified

@gr2m gr2m added the documentation Improvements or additions to documentation label Sep 15, 2025
Copy link
Collaborator

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

I think that makes sense but will double check with @lgrammel. Can you also update the package.json file since this change removes the dependency on @ai-sdk/openai?

@gr2m gr2m requested a review from lgrammel September 15, 2025 16:32
@gr2m gr2m changed the title feat(examples): switch next example to use AI Gateway provider docs(examples): switch next example to use AI Gateway provider Sep 15, 2025
@fveiraswww
Copy link
Contributor Author

I think that makes sense but will double check with @lgrammel. Can you also update the package.json file since this change removes the dependency on @ai-sdk/openai?

done ✅

@gr2m gr2m enabled auto-merge (squash) September 15, 2025 16:49
@gr2m gr2m merged commit 474a0ed into vercel:main Sep 15, 2025
8 of 9 checks passed
nvie pushed a commit to nvie/ai that referenced this pull request Sep 16, 2025
…l#8654)

## Background

the Next.js example was using the OpenAI provider directly, which
requires users to have an OpenAI API key and limits them to only OpenAI
models. By switching to AI Gateway, users can access multiple AI
providers

## Summary

- Replaced `@ai-sdk/openai` provider with a direct model string
- Updated the Next.js example to use the cheaper `gpt-5-mini` model

---------

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
@lgrammel
Copy link
Collaborator

pls ignore, mistook this for examples/next-openai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants