Repository navigation
fix(docs): worker:dev keeps its remote AI and KV bindings (#367) - #370
Conversation
`wrangler dev --local` in wrangler 4 disables remote bindings, so the `remote = true` on `[ai]` and `DOX_USAGE` was ignored and the local Dox chat could not reach Workers AI. Drop the flag; the bindings table now reads `env.AI AI remote` and `env.DOX_USAGE KV Namespace remote`. Correct the docs that gave `--local` as the reason for `remote = true`. Closes #367
There was a problem hiding this comment.
code-reviewer: minor issues
Drops --local from worker:dev so wrangler 4 honours remote = true on the AI and DOX_USAGE bindings, and rewrites the README, wrangler.toml comment and verify.md line to match. The fix is correct, and the docs edits are accurate. One gap remains: without --local, the dev Worker now needs Cloudflare credentials to start its remote bindings, and the Local development prerequisites still don't say so.
Reviewed 2b10605 for baldurpan · claude-opus-5-5 · 4 files · $0.17
There was a problem hiding this comment.
code-reviewer follow-up: looks good
Since the last review, the branch documents that worker:dev (and dev:local*) now needs Cloudflare credentials, in docs/README.md, docs/worker/README.md and .env.local.example, and explains how to run without account access by removing the [ai] block and the KV block's remote = true. That answers the one open point, and the author checked the logged-out failure mode against wrangler 4.152.0. I found nothing further, and the PR looks ready to merge.
Earlier comments
- Fixed; yours to resolve: Risk:
worker:dev(anddev:local) now need Cloudflare credentials; the setup docs don't say so
Reviewed 8e5fb3a (changes since 2b10605) for baldurpan · claude-opus-5-5 · 3 files · $0.06
Closes #367
What changed
docs/package.json:worker:devno longer passes--local. In wrangler 4 that flag runs dev with remote bindings off, soremote = trueon[ai]andDOX_USAGEwas ignored.dev:localanddev:local:watchcallworker:dev, so they get the fix too.docs/worker/README.md,docs/worker/wrangler.toml: the reason given forremote = trueno longer mentions--local. Both now warn against adding the flag back, and the README says what the bindings table should show.context/verify.md: the line about running the Worker now points toworker:devand no longer towrangler dev --local.context/stack.md:39and the README's other "remote in dev" lines needed no edit. They are accurate now.Verification
context/verify.mdexited 0: check, typecheck (both), build, docs:build, worker:bundle-check, docs:audit-dist, test, docs:test. The test step ran 1657 docs tests. After the review edits, which were docs only, lint was run again and passed.pnpm --filter docs run worker:devprinted:verify.md:94and line wrapping are fixed in this PR. One note is not acted on: nothing fails if--localis added back. Only the comments guard against it.Release note
None. Only
docs/**andcontext/**change, andcontext/release.mdsays those owe no note.