ai
ai copied to clipboard
migrate to ai-sdk v5
WIP for #173
⚠️ No Changeset found
Latest commit: 326d744e84bd74e7ac359337b769d8983389426e
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
wow, exciting!
I wonder if we should publish a version with both inside it for a while. so workers-ai-provider still for <=v4, and workers-ai-provider/v5 for v5. eventually we can deprecate the core one, and in a major release flip it so v5 becomes the default. what do you think?
I agree here. I think the ai gateway provider also would need an upgrade. It works with LanguageModelV1, which does break with upgraded packages
I think merging this would be harder than to send another PR? Wdyt @threepointone
❯ git pull origin main
From https://github.com/cloudflare/ai
* branch main -> FETCH_HEAD
Auto-merging packages/workers-ai-provider/package.json
CONFLICT (content): Merge conflict in packages/workers-ai-provider/package.json
Auto-merging packages/workers-ai-provider/src/autorag-chat-language-model.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/autorag-chat-language-model.ts
Auto-merging packages/workers-ai-provider/src/convert-to-workersai-chat-messages.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/convert-to-workersai-chat-messages.ts
Auto-merging packages/workers-ai-provider/src/index.ts
Auto-merging packages/workers-ai-provider/src/map-workersai-finish-reason.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/map-workersai-finish-reason.ts
Auto-merging packages/workers-ai-provider/src/map-workersai-usage.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/map-workersai-usage.ts
Auto-merging packages/workers-ai-provider/src/streaming.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/streaming.ts
Auto-merging packages/workers-ai-provider/src/utils.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/utils.ts
Auto-merging packages/workers-ai-provider/src/workers-ai-embedding-model.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/workers-ai-embedding-model.ts
Auto-merging packages/workers-ai-provider/src/workersai-chat-language-model.ts
CONFLICT (content): Merge conflict in packages/workers-ai-provider/src/workersai-chat-language-model.ts
Auto-merging packages/workers-ai-provider/src/workersai-image-model.ts
Auto-merging packages/workers-ai-provider/src/workersai-models.ts
Auto-merging pnpm-lock.yaml
CONFLICT (content): Merge conflict in pnpm-lock.yaml
Automatic merge failed; fix conflicts and then commit the result.
There's definitely a lot left to do here and I don't have a lot of capacity
Is this something that is still being worked on? I would love to be able to upgrade to V5 but this is a blocker.
should be released today/tomorrow https://github.com/cloudflare/ai/pull/269