@@ -319,6 +319,54 @@ Or if you already have an API key, you can select **Manually enter API Key** and
319319
320320---
321321
322+ ### Cloudflare AI Gateway
323+
324+ Cloudflare AI Gateway lets you proxy requests to AI providers through Cloudflare's infrastructure with caching, rate limiting, and analytics.
325+
326+ 1 . Head over to the [ Cloudflare dashboard] ( https://dash.cloudflare.com/ ) , navigate to ** AI** > ** AI Gateway** , and create a new gateway.
327+
328+ 2 . Set your Account ID and Gateway name as environment variables:
329+
330+ ``` bash
331+ CLOUDFLARE_ACCOUNT_ID=your-account-id CLOUDFLARE_GATEWAY_NAME=your-gateway-name opencode
332+ ```
333+
334+ Or add them to your bash profile:
335+
336+ ``` bash title="~/.bash_profile"
337+ export CLOUDFLARE_ACCOUNT_ID=your-account-id
338+ export CLOUDFLARE_GATEWAY_NAME=your-gateway-name
339+ ```
340+
341+ 3 . If your gateway has authentication enabled, also set your API token:
342+
343+ ``` bash title="~/.bash_profile"
344+ export CLOUDFLARE_API_TOKEN=your-api-token
345+ ```
346+
347+ 4 . Many Cloudflare AI Gateway models are preloaded by default, run the ` /models ` command to select the one you want.
348+
349+ ``` txt
350+ /models
351+ ```
352+
353+ You can also add additional models through your opencode config.
354+
355+ ``` json title="opencode.json" {6}
356+ {
357+ "$schema" : " https://opencode.ai/config.json" ,
358+ "provider" : {
359+ "cloudflare-ai-gateway" : {
360+ "models" : {
361+ "some-other-model" : {}
362+ }
363+ }
364+ }
365+ }
366+ ```
367+
368+ ---
369+
322370### Cortecs
323371
3243721 . Head over to the [ Cortecs console] ( https://cortecs.ai/ ) , create an account, and generate an API key.
0 commit comments