## TL;DR

Upgrade the workers-ai provider to v0.0.13 or later, which contains the fix from PR #24. Maintainer andyjessop confirmed the fix shipped in v0.0.13 of the provider, via PR #24.

## Steps

1. 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.

## When to use

You are seeing this: 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. Use this skill when you run into "Text generation is wrong or incomplete during wrangler dev with the workers-ai provider".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: v0.0.13. If you are on something much newer or older, the details may have shifted.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
