ai icon indicating copy to clipboard operation
ai copied to clipboard

migrate to ai-sdk v5

Open eli-front opened this issue 6 months ago • 3 comments

WIP for #173

eli-front avatar May 26 '25 23:05 eli-front

⚠️ 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

changeset-bot[bot] avatar May 26 '25 23:05 changeset-bot[bot]

wow, exciting!

threepointone avatar Jun 07 '25 10:06 threepointone

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?

threepointone avatar Jun 07 '25 10:06 threepointone

I agree here. I think the ai gateway provider also would need an upgrade. It works with LanguageModelV1, which does break with upgraded packages image

Dhravya avatar Jul 16 '25 19:07 Dhravya

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.

Dhravya avatar Jul 16 '25 19:07 Dhravya

There's definitely a lot left to do here and I don't have a lot of capacity

eli-front avatar Jul 17 '25 00:07 eli-front

Is this something that is still being worked on? I would love to be able to upgrade to V5 but this is a blocker.

harrismcc avatar Aug 12 '25 02:08 harrismcc

should be released today/tomorrow https://github.com/cloudflare/ai/pull/269

threepointone avatar Sep 03 '25 11:09 threepointone