Skip to content
Proposals/Route OpenAI and Anthropic models through Cloudf
proposalteamP5Worth a lookOpenCode

Route OpenAI and Anthropic models through Cloudflare AI Gateway passthroughs

OpenCode v1.18.19 adds native OpenAI/Anthropic passthroughs for Cloudflare AI Gateway, tighter Codex↔ChatGPT rate limits, fixed /connect auth display, safer pricing/cost math, and web search on OpenCode Go—use these to centralize model traffic and cut provider friction.

Why this loop

This release makes Cloudflare AI Gateway a first-class path for OpenAI and Anthropic instead of ad-hoc proxies, so teams can standardize logging, controls, and model IDs in one place. Codex rate limits now track ChatGPT subscription limits more closely, reducing surprise throttling for subscription-backed workflows. /connect correctly lists authenticated providers, so reconnect and onboarding stop hiding working accounts. Malformed pricing no longer breaks usage cost calculation, and oversized OpenAI websocket payloads fall back instead of failing hard—both stabilize cost visibility and long sessions. OpenCode Go gains web search, and ChatGPT workspace compute residency is forwarded to Codex, which matters for residency-sensitive orgs. Qwen no longer sends unsupported built-in sampling defaults. Workflow gain: point gateway-backed models at the new passthroughs, re-auth via /connect, align Codex with subscription limits, and turn on Go web search where research agents need it.

Proposed actions

  1. In OpenCode model config, switch OpenAI and Anthropic routes that should traverse Cloudflare AI Gateway to the native gateway passthrough model entries added in v1.18.19 (replace any custom base-URL hacks with the built-in passthroughs).
  2. Run `/connect` in OpenCode and confirm every authenticated provider you rely on appears; re-authenticate any missing provider and save so account connection uses the updated default Console URL.
  3. For ChatGPT-subscription Codex usage, set rate-limit / pacing config to the v1.18.19 Codex limits that match ChatGPT subscription quotas, and enable forwarding of ChatGPT workspace compute residency on those Codex requests.
  4. If you use Qwen, remove any workflow reliance on OpenCode’s old built-in Qwen sampling defaults; send only sampling parameters the provider accepts.
  5. For agents on the OpenCode Go provider, enable web search in the provider/tool settings and re-run a retrieval-style prompt to verify search-backed responses.

Agent prompt

Paste into your agent or query via MCP (`get_agent_prompt`) — free, no extra AI cost

Paste into Claude Code / CLAUDE.md task

# DevAgentRadar → Claude Code

You are helping me adopt a real coding-assistant change. Work only from the facts below. Do not invent features.

## Context
Assistant: OpenCode
Proposal: Route OpenAI and Anthropic models through Cloudflare AI Gateway passthroughs
Summary: OpenCode v1.18.19 adds native OpenAI/Anthropic passthroughs for Cloudflare AI Gateway, tighter Codex↔ChatGPT rate limits, fixed /connect auth display, safer pricing/cost math, and web search on OpenCode Go—use these to centralize model traffic and cut provider friction.
Primary source: https://github.com/anomalyco/opencode/releases/tag/v1.18.19

## Why it matters
This release makes Cloudflare AI Gateway a first-class path for OpenAI and Anthropic instead of ad-hoc proxies, so teams can standardize logging, controls, and model IDs in one place. Codex rate limits now track ChatGPT subscription limits more closely, reducing surprise throttling for subscription-backed workflows. /connect correctly lists authenticated providers, so reconnect and onboarding stop hiding working accounts. Malformed pricing no longer breaks usage cost calculation, and oversized OpenAI websocket payloads fall back instead of failing hard—both stabilize cost visibility and long sessions. OpenCode Go gains web search, and ChatGPT workspace compute residency is forwarded to Codex, which matters for residency-sensitive orgs. Qwen no longer sends unsupported built-in sampling defaults. Workflow gain: point gateway-backed models at the new passthroughs, re-auth via /connect, align Codex with subscription limits, and turn on Go web search where research agents need it.

## Suggested actions
1. In OpenCode model config, switch OpenAI and Anthropic routes that should traverse Cloudflare AI Gateway to the native gateway passthrough model entries added in v1.18.19 (replace any custom base-URL hacks with the built-in passthroughs).
2. Run `/connect` in OpenCode and confirm every authenticated provider you rely on appears; re-authenticate any missing provider and save so account connection uses the updated default Console URL.
3. For ChatGPT-subscription Codex usage, set rate-limit / pacing config to the v1.18.19 Codex limits that match ChatGPT subscription quotas, and enable forwarding of ChatGPT workspace compute residency on those Codex requests.
4. If you use Qwen, remove any workflow reliance on OpenCode’s old built-in Qwen sampling defaults; send only sampling parameters the provider accepts.
5. For agents on the OpenCode Go provider, enable web search in the provider/tool settings and re-run a retrieval-style prompt to verify search-backed responses.


## Your job
1. Restate the change in one sentence.
2. Propose a minimal plan for my repo (or a throwaway pilot).
3. Implement only what I approve; prefer small diffs and tests.
4. Call out risks (permissions, breaking APIs, cost).

Start by confirming you understood the proposal.
modelpricingRelease source ↗

Your loop

This browser · no sign-in · not shared as “you”

Your decision stays on this device. A public tally appears after a few votes.

Originating release signal

OpenCodev1.18.19Aug 20, 2026

v1.18.19

Added native OpenAI and Anthropic passthroughs for Cloudflare AI Gateway models. · Matched Codex rate limits more closely to ChatGPT subscription limits. (@GameOn223) · Removed built-in Qwen sampling defaults that could send unsupported settings. · Properly show authenticated providers in `/connect`. (@OpeOginni) · Ignore malformed model pricing instead of breaking usage cost calculation. · Fall back when OpenAI websocket requests exceed message size limits. · Forward ChatGPT workspace compute residency to Codex requests. · Updated the default Console URL used by account connection flows. · +12 more changes

Verified excerpt — the source's own words
## Core

### Improvements

- Added native OpenAI and Anthropic passthroughs for Cloudflare AI Gateway models.
- Matched Codex rate limits more closely to ChatGPT subscription limits. (@GameOn223)

### Bugfixes

- Removed built-in Qwen sampling defaults that could send unsupported settings.
- Properly show authenticated providers in `/connect`. (@OpeOginni)
- Ignore malformed model pricing instead of breaking usage cost calculation.
- Fall back when OpenAI websocket requests exceed message size limits.
- Forward ChatGPT workspace compute residency to Codex requests.
- Updated the default Console URL used by account connection flows.
- Enabled web search when using the OpenCode Go provider.
- Preserved compatibility with existing v1 databases.

## Desktop

### Bugfixes

- Kept saved server details editable in the server dialog.

**Thank you to 4 community contributors:**
- @TechyAditya:
  - fix(skills): Update global config path in documentation (#42337)
- @GameOn223:
  - tweak: match codex limits for openai models exactly when using chatgpt subscription (#39082)
- @OpeOginni:
  - fix(opencode): properly show authed providers on /connect command (#39915)
- @bhuvan2134686:

Excerpt ends here — this release continues at the source ↗.

Primary source ↗