Description
V2 still requires CLOUDFLARE_ACCOUNT_ID when a Workers AI credential already contains configuration.accountId. The catalog URL contains ${CLOUDFLARE_ACCOUNT_ID}; the native OpenAI-compatible mapping does not substitute the saved account ID before endpoint validation. Initialization fails before any Cloudflare request.
The same failure occurs with providers.cloudflare-workers-ai.settings.accountId and legacy credential metadata. Setting the service environment variable works around it. Related closed proposals: #41615 and #40907.
Plugins
Built-in Cloudflare Workers AI provider.
OpenCode version
Observed on opencode2 v0.0.0-beta-19425; reproduced with a resolver regression test on current v2.
Steps to reproduce
- Connect Workers AI with an API token and saved account ID, or configure
providers.cloudflare-workers-ai.settings.accountId.
- Leave
CLOUDFLARE_ACCOUNT_ID unset in the server environment.
- Select
cloudflare-workers-ai/@cf/deepseek-ai/deepseek-v4-flash-0731 and send a message.
- Observe
CLOUDFLARE_ACCOUNT_ID is required to resolve the provider endpoint despite the saved account setting.
Screenshot and/or share link
Reproduced in a local automated resolver test; no session shared.
Operating System
macOS 26.6.2, arm64.
Terminal
Noninteractive CLI reproduction.
Description
V2 still requires
CLOUDFLARE_ACCOUNT_IDwhen a Workers AI credential already containsconfiguration.accountId. The catalog URL contains${CLOUDFLARE_ACCOUNT_ID}; the native OpenAI-compatible mapping does not substitute the saved account ID before endpoint validation. Initialization fails before any Cloudflare request.The same failure occurs with
providers.cloudflare-workers-ai.settings.accountIdand legacy credential metadata. Setting the service environment variable works around it. Related closed proposals: #41615 and #40907.Plugins
Built-in Cloudflare Workers AI provider.
OpenCode version
Observed on
opencode2 v0.0.0-beta-19425; reproduced with a resolver regression test on currentv2.Steps to reproduce
providers.cloudflare-workers-ai.settings.accountId.CLOUDFLARE_ACCOUNT_IDunset in the server environment.cloudflare-workers-ai/@cf/deepseek-ai/deepseek-v4-flash-0731and send a message.CLOUDFLARE_ACCOUNT_ID is required to resolve the provider endpointdespite the saved account setting.Screenshot and/or share link
Reproduced in a local automated resolver test; no session shared.
Operating System
macOS 26.6.2, arm64.
Terminal
Noninteractive CLI reproduction.