Skip to content

Fix deployment issues and bring in line with latest SDK - #156

Merged
aron-cf merged 15 commits into
mainfrom
updates
Jul 24, 2026
Merged

Fix deployment issues and bring in line with latest SDK#156
aron-cf merged 15 commits into
mainfrom
updates

Conversation

@aron-cf

@aron-cf aron-cf commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Deploying the starter on Wrangler 4.113 or newer fails with The "legacy_env" field is no longer supported. The pinned @cloudflare/vite-plugin@1.42.3 writes "legacy_env": true into the generated dist/*/wrangler.json, a field Wrangler has since removed.

Upgrading agents, @cloudflare/ai-chat, @cloudflare/vite-plugin and wrangler to their current releases fixes this, since the newer plugin no longer emits the field.

The upgrade also drops the direct @cloudflare/workers-types dependency in favor of types generated by wrangler types, avoiding a peer conflict between Wrangler (wants version 5) and partyserver (wants version 4); the generated env.d.ts is committed so a fresh clone type-checks without a build.

The same change realigns the template with the reference chat example in cloudflare/agents:

  • The agent moves to the current kimi-k2.7-code model, waits for tool servers to reconnect after hibernation, prunes old reasoning, and allows more steps per turn.
  • The client walks message parts in a single ordered pass, so text, reasoning and tool calls render in the order they happened, which also clears a React duplicate-key warning.
  • Failed tool calls show their error instead of nothing, and tool inputs are shown while running and after.
  • Minor cleanups: the compatibility date moves to the current standard, an invalid data-theme="workers" attribute is removed, and the README documents that npm run dev needs a Cloudflare login because Workers AI has no local simulator.

@aron-cf
aron-cf merged commit 4ea6a72 into main Jul 24, 2026
4 checks passed
@aron-cf
aron-cf deleted the updates branch July 24, 2026 11:48
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.

1 participant