Skip to content

Conversation

@lawsonoates
Copy link

Added openrouter provider to ai package

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

🦋 Changeset detected

Latest commit: 0954abb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@workflow/ai Patch
@workflow/docs-typecheck Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Dec 8, 2025

@lawsonoates is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

This looks goo to me, though we changed the package structure slightly since this PR was made. Could you:

  • Merge main
  • Ensure DCO passes (your latest commit should use the -s flag in git)
  • Add a changeset (npm changeset) as a patch for the @workflow/ai package
    ?

Then I'm happy to merge this PR

…provider

Signed-off-by: lawsonoates <lawsonoates@users.noreply.github.com>
Signed-off-by: lawsonoates <lawsonoates@users.noreply.github.com>
@lawsonoates
Copy link
Author

should be good :)

Copy link
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

Thanks! DCO doesn't seem to pass (see CI check), which is the only thing preventing me from merging this, sorry for the trouble

DCO Remediation Commit for lawsonoates <lawsonoates@users.noreply.github.com>

I, lawsonoates <lawsonoates@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 58c7051

Signed-off-by: lawsonoates <lawsonoates@users.noreply.github.com>
Copy link
Collaborator

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

The goal with @workflow/ai is to match the AI SDK in compat. Since openrouter is not a package under the @ai-sdk org, I don't think we should natively support it here

You can publish this package yourself though, or potentially ship it under the @openrouter org as @openrouter/ai-sdk-provider/workflow. Or you could also open up an issue on the AI sdk repo to bring native support there in the AI sdk


ofcourse, as noticed in this PR, there's also not reason this has to be a package explicitly and you can simply use openrouter directly in workflow using the pattern you've shown :)

@pranaygp pranaygp closed this Jan 5, 2026
@lawsonoates
Copy link
Author

That makes a lot of sense. At the heart of it I was trying to address the differences in using a provider from @workflow/ai vs others. From a users' perspective you wrap in a func with 'use step' evident but from @workflow/ai you don't.

Perhaps @ai-sdk/provider could be the only dep and all are wrapped in 'use step', making it explicit?

#570
Keen to help make workflow the best it can be!

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.

3 participants