#Cannot use wrangler dev with Workers AI - 403 on edge-preview endpoint

2 messages · Page 1 of 1 (latest)

outer vine
#

Here's a concise Discord message for the #workers-help channel:

Hey everyone! I'm hitting a frustrating issue with `wrangler dev` and Workers AI.

**The Problem:**
When I run `wrangler dev` with a remote AI binding, I get:

✘ [ERROR] A request to the Cloudflare API (/accounts/.../workers/subdomain/edge-preview) failed.
Authentication error [code: 10000]
HTTP 403 Forbidden


**What's Working:**
✅ Workers AI works perfectly in production (actively using it)
✅ `wrangler dev --local` works (but AI shows "not supported")
✅ OAuth authenticated with all required scopes including `ai (write)`
✅ Workers AI is enabled in my dashboard
✅ The EXACT same codebase works perfectly for my teammates on their machines

**What I've Tried:**
- Re-authenticated multiple times (`wrangler logout` / `login`)
- Added `"remote": true` to the AI binding config
- Verified all permissions with `wrangler whoami`
- Upgraded/reinstalled Wrangler

**The Weird Part:**
The 403 is specifically on the `/workers/subdomain/edge-preview` endpoint. My account clearly has Workers AI enabled (can see usage in dashboard), but this specific endpoint returns 403 during dev.

Does my account need some special entitlement/feature flag for edge-preview? Or has anyone else encountered this?

Running Wrangler 4.59.2 on Ubuntu 24.04, Node 24.
viscid mulch
#

?pings