Description
On the cloudflare-ai-gateway provider, every model that isn't OpenAI or Anthropic fails with Bad Request: Invalid provider — Google, xAI, Alibaba, DeepSeek, Moonshot.
The loader routes anything that isn't openai/, anthropic/, or workers-ai/ through ai-gateway-provider's unified (compat) route, which posts to the gateway's universal compat endpoint. That endpoint only fronts a few upstreams, so the rest come back "Invalid provider". Cloudflare's catalog-aware REST API (/accounts/{id}/ai/v1/chat/completions) does serve them.
Plugins
None.
OpenCode version
1.18.22
Steps to reproduce
- Configure the
cloudflare-ai-gateway provider (CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN, CLOUDFLARE_GATEWAY_ID). - Run:
opencode run "hello" --model cloudflare-ai-gateway/xai/grok-4.5 - It fails with
Bad Request: Invalid provider. Same for any google/*, alibaba/*, deepseek/*, moonshotai/* model. openai/* and anthropic/* work.
Operating System
macOS 26.5.2
Terminal
Zed
Description
On the
cloudflare-ai-gatewayprovider, every model that isn't OpenAI or Anthropic fails withBad Request: Invalid provider— Google, xAI, Alibaba, DeepSeek, Moonshot.The loader routes anything that isn't
openai/,anthropic/, orworkers-ai/throughai-gateway-provider's unified (compat) route, which posts to the gateway's universal compat endpoint. That endpoint only fronts a few upstreams, so the rest come back "Invalid provider". Cloudflare's catalog-aware REST API (/accounts/{id}/ai/v1/chat/completions) does serve them.Plugins
None.
OpenCode version
1.18.22
Steps to reproduce
cloudflare-ai-gatewayprovider (CLOUDFLARE_ACCOUNT_ID,CLOUDFLARE_API_TOKEN,CLOUDFLARE_GATEWAY_ID).opencode run "hello" --model cloudflare-ai-gateway/xai/grok-4.5Bad Request: Invalid provider. Same for anygoogle/*,alibaba/*,deepseek/*,moonshotai/*model.openai/*andanthropic/*work.Operating System
macOS 26.5.2
Terminal
Zed