GeezerVison is showing github.com — Provider timeouts (chunkTimeout/headerTimeout) are ignored for cloudflare-ai-gateway models · Issue #51545 · anomalyco/opencode
Provider timeouts (chunkTimeout/headerTimeout) are ignored for cloudflare-ai-gateway models #51545
Description
Description
headerTimeout, chunkTimeout and timeout provider options don't apply to cloudflare-ai-gateway models. The gateway loader in provider.ts ignores the SDK built by resolveSDK (getModel(_sdk, ...)), which is where the timeout fetch wrapper lives, and ai-gateway-provider calls the global fetch. A stream that stalls after headers is never aborted, so the session hangs instead of retrying on SSE read timed out.
We hit this running opencode github run in CI: the run hung until the job timeout killed it.
OpenCode version
1.18.32, and current dev
Steps to reproduce
- Configure
{"provider":{"cloudflare-ai-gateway":{"options":{"chunkTimeout":10000}}}}.
- Use a
cloudflare-ai-gateway/... model whose upstream sends headers and then stalls the SSE body.
- The request never times out.
Activity
github-actions commented on Sep 26, 2026
This issue might be a duplicate of an existing issue. Please check:
- #46692: provider
chunkTimeout and timeout options are ignored on the v2 packages/llm path, leaving stalled streams without a client-side timeout; this may overlap with the Cloudflare gateway path reported here.
Metadata
Metadata
Development
No branches or pull requestsIssue actions