Skip to content

Commit 965c751

Browse files
authored
docs: update Cloudflare provider setup to reflect /connect prompt flow (anomalyco#20589)
1 parent 24bdd3c commit 965c751

1 file changed

Lines changed: 43 additions & 26 deletions

File tree

packages/web/src/content/docs/providers.mdx

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -490,37 +490,42 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try
490490

491491
Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, and more through a unified endpoint. With [Unified Billing](https://developers.cloudflare.com/ai-gateway/features/unified-billing/) you don't need separate API keys for each provider.
492492

493-
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **AI** > **AI Gateway**, and create a new gateway.
493+
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **AI** > **AI Gateway**, and create a new gateway. Note your **Account ID** and **Gateway ID**.
494494

495-
2. Set your Account ID and Gateway ID as environment variables.
495+
2. Run the `/connect` command and search for **Cloudflare AI Gateway**.
496496

497-
```bash title="~/.bash_profile"
498-
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
499-
export CLOUDFLARE_GATEWAY_ID=your-gateway-id
497+
```txt
498+
/connect
500499
```
501500

502-
3. Run the `/connect` command and search for **Cloudflare AI Gateway**.
501+
3. Enter your **Account ID** when prompted.
503502

504503
```txt
505-
/connect
504+
┌ Enter your Cloudflare Account ID
505+
506+
507+
└ enter
506508
```
507509

508-
4. Enter your Cloudflare API token.
510+
4. Enter your **Gateway ID** when prompted.
509511

510512
```txt
511-
API key
513+
Enter your Cloudflare AI Gateway ID
512514
513515
514516
└ enter
515517
```
516518

517-
Or set it as an environment variable.
519+
5. Enter your **Cloudflare API token**.
518520

519-
```bash title="~/.bash_profile"
520-
export CLOUDFLARE_API_TOKEN=your-api-token
521+
```txt
522+
┌ Gateway API token
523+
524+
525+
└ enter
521526
```
522527

523-
5. Run the `/models` command to select a model.
528+
6. Run the `/models` command to select a model.
524529

525530
```txt
526531
/models
@@ -542,39 +547,44 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI,
542547
}
543548
```
544549

550+
Alternatively, you can set environment variables instead of using `/connect`.
551+
552+
```bash title="~/.bash_profile"
553+
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
554+
export CLOUDFLARE_GATEWAY_ID=your-gateway-id
555+
export CLOUDFLARE_API_TOKEN=your-api-token
556+
```
557+
545558
---
546559

547560
### Cloudflare Workers AI
548561

549562
Cloudflare Workers AI lets you run AI models on Cloudflare's global network directly via REST API, with no separate provider accounts needed for supported models.
550563

551-
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **Workers AI**, and select **Use REST API** to get your Account ID and create an API token.
552-
553-
2. Set your Account ID as an environment variable.
564+
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **Workers AI**, and select **Use REST API** to get your **Account ID** and create an API token.
554565

555-
```bash title="~/.bash_profile"
556-
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
557-
```
558-
559-
3. Run the `/connect` command and search for **Cloudflare Workers AI**.
566+
2. Run the `/connect` command and search for **Cloudflare Workers AI**.
560567

561568
```txt
562569
/connect
563570
```
564571

565-
4. Enter your Cloudflare API token.
572+
3. Enter your **Account ID** when prompted.
566573

567574
```txt
568-
API key
575+
Enter your Cloudflare Account ID
569576
570577
571578
└ enter
572579
```
573580

574-
Or set it as an environment variable.
581+
4. Enter your **Cloudflare API key**.
575582

576-
```bash title="~/.bash_profile"
577-
export CLOUDFLARE_API_KEY=your-api-token
583+
```txt
584+
┌ API key
585+
586+
587+
└ enter
578588
```
579589

580590
5. Run the `/models` command to select a model.
@@ -583,6 +593,13 @@ Cloudflare Workers AI lets you run AI models on Cloudflare's global network dire
583593
/models
584594
```
585595

596+
Alternatively, you can set environment variables instead of using `/connect`.
597+
598+
```bash title="~/.bash_profile"
599+
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
600+
export CLOUDFLARE_API_KEY=your-api-token
601+
```
602+
586603
---
587604

588605
### Cortecs

0 commit comments

Comments
 (0)