Answer: Pass fetch to route OpenCode's outbound HTTP requests through a custom handler such as a Service Binding, using a fetch function that inspects the request hostname and forwards matching requests to the binding. Status: Confirmed Entry: tool/opencode/integrations/cloudflare-route-outbound-requests Revision: 1 Digest: sha256:38a98a01c766d53e (changes whenever the content changes) Timeline: Created: 2026-11-13T13:29:02Z Last changed: 2026-11-13T13:29:02Z Last verified: 2026-11-20T13:44:50Z Next check: 2026-11-21T13:44:50Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of method | Pass fetch | [1] | 2026-11-20 routed requests | OpenCode Console config, model requests, web fetch and search, well-known config, and remote MCP servers | [1] | 2026-11-20 handler example | Service Binding | [1] | 2026-11-20 Code Mode fetch | globalThis.fetch | [1] | 2026-11-20 example hostname | console.example.com | [1] | 2026-11-20 Sources: [1] opencode. "Cloudflare | OpenCode". https://opencode.ai/docs/build/sdk/cloudflare/ Role: primary. Accessed: 2026-11-20T13:44:50Z Quote: "Route outbound requests Pass fetch to route OpenCode’s outbound HTTP requests" (Supports: method) Quote: "OpenCode Console config, model requests, web fetch and search, well-known config, and remote MCP servers" (Supports: routed requests) Quote: "through a custom handler such as a Service Binding" (Supports: handler example) Quote: "Agent code in Code Mode continues to use globalThis.fetch ." (Supports: Code Mode fetch) Quote: "new URL(request.url).hostname === "console.example.com"" (Supports: example hostname) Snapshot SHA-256: 5e138c3369bbdbe3846f298aaa0070f658aae025cc15dc8cd3fda6d8fbd26c71 (captured 2026-11-13T03:56:03Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T13:29:02Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:50Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:50Z Last attempt: 2026-11-20T13:44:50Z Notes and limitations: Extracted automatically from a single official source (section "Route outbound requests"). Related: https://latestn.com/tool/opencode/integrations/configure-console-provider-in-codex How do I configure opencode Console as a model provider in Codex? https://latestn.com/tool/opencode/integrations/configure-opencode-provider How do I configure OpenCode Zen or OpenCode Go as the provider in Hermes? https://latestn.com/tool/opencode/integrations/connect-identity-provider How do I connect Okta or Microsoft Entra ID to opencode directory sync? https://latestn.com/tool/opencode/integrations/client-headers-requests How do I pass authentication headers or a custom fetch to the opencode client? https://latestn.com/tool/opencode/integrations/close-host-resources How do I release or close an opencode host's resources? https://latestn.com/tool/opencode/integrations/cloudflare-durable-object-sdk How do I use the opencode SDK inside a Cloudflare Durable Object? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T13:29:02Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/cloudflare-route-outbound-requests/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/integrations/cloudflare-route-outbound-requests POST: https://latestn.com/dispute/tool/opencode/integrations/cloudflare-route-outbound-requests with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/cloudflare-route-outbound-requests?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I route outbound requests with the opencode Cloudflare SDK? Revision 1, last verified 2026-11-20T13:44:50Z. https://latestn.com/tool/opencode/integrations/cloudflare-route-outbound-requests (accessed 2026-11-21T09:54:35Z). @misc{LatestN_tool_opencode_integrations_cloudflare_route_outbound_requests_r1, title = {How do I route outbound requests with the opencode Cloudflare SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/cloudflare-route-outbound-requests}}, note = {Revision 1; digest sha256:38a98a01c766d53e; last verified 2026-11-20T13:44:50Z; accessed 2026-11-21T09:54:35Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/integrations/cloudflare-route-outbound-requests