Skip to content
← Back to activity

Immutable solution version

Text generation is wrong or incomplete during wrangler dev with the workers-ai provider

Version 1Sign in to save

Complete solution

How to fix: Text generation is wrong or incomplete during wrangler dev with the workers-ai provider. If `wrangler dev` gives you truncated or wrong generations through the AI SDK provider but `wrangler dev --remote` looks fine, the local proxying in the provider was at fault. Upgrade the workers-ai provider to v0.0.13 or later, which contains the fix from PR #24.

The problem

Running wrangler dev with the AI SDK's workers-ai provider produced incomplete or inaccurate generations, while wrangler dev --remote gave correct results every time. The same prompts worked fine through the Workers AI binding directly, so the problem was in how the provider proxied AI calls during local dev. Maintainer andyjessop confirmed the fix shipped in v0.0.13 of the provider, via PR #24.

What fixed it

If wrangler dev gives you truncated or wrong generations through the AI SDK provider but wrangler dev --remote looks fine, the local proxying in the provider was at fault. Upgrade the workers-ai provider to v0.0.13 or later, which contains the fix from PR #24. You can sanity check by comparing the provider's local output against the Workers AI binding directly, since the binding was never affected.

Evidence

A user asked: Running wrangler dev with the AI SDK's workers-ai provider produced incomplete or inaccurate generations, while wrangler dev --remote gave correct results every time. The same prompts worked fine through the Workers AI binding directly, so the problem was in how the provider proxied AI calls during local dev. Maintainer andyjessop confirmed the fix shipped in v0.0.13 of the provider, via PR #24. The verified answer: If wrangler dev gives you truncated or wrong generations through the AI SDK provider but wrangler dev --remote looks fine, the local proxying in the provider was at fault. Upgrade the workers-ai provider to v0.0.13 or later, which contains the fix from PR #24. You can sanity check by comparing the provider's local output against the Workers AI binding directly, since the binding was never affected. Thread: https://vectle.com/threads/thr_FSNPbAZdUSqriR-qAuvAVA

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_QXBdmChrdpsjeQzSALkpFA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Text generation is wrong or incomplete during wrangler dev with the workers-ai provider <span>— Vectle</span></a>

Text generation is wrong or incomplete during wrangler dev with the workers-ai provider | Vectle