workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

Setting account_id in wrangler config does not work for ai binding

Open TimoWilhelm opened this issue 6 months ago • 1 comments

What versions & operating system are you using?

wrangler 4.19.2

Please provide a link to a minimal reproduction

https://github.com/TimoWilhelm/mre-wrangler-account-id

Describe the Bug

I'm running multiple workers parallel locally in mixed mode with AI binding and I'm getting the following message:

error: InferenceUpstreamError: Error: More than one account available but unable to select one in non-interactive mode.
Please set the appropriate account_id in your Wrangler configuration file or assign it to the CLOUDFLARE_ACCOUNT_ID environment variable.

However, setting in account_id in my wrangler config doesn't seem to work, only the setting CLOUDFLARE_ACCOUNT_ID as an env var for every process works for me. Setting it in the wrangler configs would be much nicer for my use case.

Please provide any relevant error logs

No response

TimoWilhelm avatar Jun 12 '25 09:06 TimoWilhelm

Potentially related to https://jira.cfdata.org/browse/DEVX-1857, which is planned for after release

penalosa avatar Jun 13 '25 14:06 penalosa

@TimoWilhelm thanks for the issue 🙂

I've opened #10259 to hopefully address this issue, however I cannot confirm whether if fixes your specific issue since the minimal reproduction you shared seems not to be available anymore, is there any chance you could give the PR's prerelease package a try and let me know if it solves your issue? 🙂🙏

dario-piotrowicz avatar Aug 06 '25 23:08 dario-piotrowicz

Hi @dario-piotrowicz, sorry seems like the MRE repo was deleted I put it back up.

TimoWilhelm avatar Aug 07 '25 07:08 TimoWilhelm

ok thanks 😄 🙏

dario-piotrowicz avatar Aug 07 '25 09:08 dario-piotrowicz