Skip to content

Conversation

@mattzcarey
Copy link
Collaborator

@mattzcarey mattzcarey commented Dec 23, 2025

ai is now a peer dep of agents. Some of these demos are linked in docs which have a Deploy to Cloudflare button which now errors

wrangler 4.56.0

✘ [ERROR] Build failed with 1 error:
  ✘ [ERROR] Could not resolve "ai"
  
      node_modules/agents/dist/client-QZa2Rq0l.js:945:39:
        945 │       const { jsonSchema } = await import("ai");

    You can mark the path "ai" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. You can also add ".catch()" here to handle this failure at run-time instead of bundle-time.

@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2025

⚠️ No Changeset found

Latest commit: 6271c61

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

@mattzcarey mattzcarey enabled auto-merge December 23, 2025 22:53
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 23, 2025

Open in StackBlitz

npx https://pkg.pr.new/cloudflare/ai/ai-gateway-provider@345
npx https://pkg.pr.new/cloudflare/ai/workers-ai-provider@345

commit: 6271c61

@mattzcarey mattzcarey changed the title fix: add ai demos fix: add ai to demos Dec 23, 2025
@threepointone
Copy link
Collaborator

I thought peer dependencies get installed automatically

Are these failing when deployed? please verify

If this is about our import in agents, something else might be happening... need to verify that too

@mattzcarey
Copy link
Collaborator Author

I thought peer dependencies get installed automatically

Are these failing when deployed? please verify

If this is about our import in agents, something else might be happening... need to verify that too

this is a report from internal. npm just errors when wrangler builds atm

@mattzcarey mattzcarey disabled auto-merge December 23, 2025 23:05
@threepointone
Copy link
Collaborator

don't land this

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.

2 participants