Skip to content

Experimental remote binding does not respect account_id from config #10188

@Thomascogez

Description

@Thomascogez

What versions & operating system are you using?

System:
OS: macOS 15.3.2
CPU: (10) arm64 Apple M2 Pro
Memory: 130.83 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.4.1 - ~/.nvm/versions/node/v24.4.1/bin/node
npm: 11.4.2 - ~/.nvm/versions/node/v24.4.1/bin/npm
bun: 1.2.19 - ~/.bun/bin/bun
Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
npmPackages:
wrangler: ^4.27.0 => 4.27.0

Please provide a link to a minimal reproduction

No response

Describe the Bug

Hey ! I'm working on a project called cf-script, where it rely on getPlatformProxy function. I saw that experimental remote service binding got implemented (awesome btw !).
So i implemented it and I encountered two problems

  • env provided in getPlatformProxy is not propagated to remote binding (from what i see it could come from here
    const config = readConfig({ config: configPath });
    , where env is not passed to readConfig
  • I also in my wrangler.json have an "account_id" that seem to not be respected the remote binding are using my default account id

for example I have
wrangler.json

{
	"main": "src/index.ts",
	"name": "worker-name",
	"compatibility_date": "2025-07-01",
	"account_id": "**32409e13d0372a1103f368b45122dc97**", <- second account 
	"r2_buckets": [
		{
			"binding": "BUCKET",
			"bucket_name": "my-cool-bucket",
			"experimental_remote": true
		}
	],
}

and when i try to use my r2 i encountered this error

Error on remote worker: APIError: A request to the Cloudflare API (/accounts/0218984b80d2f636f800f11e006b7eb3/workers/scripts/xxx/edge-preview) failed. <- Main account id

I'd be happy to give minimal reproduction if needed, and also contribute !

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions