Skip to content

Commit bbabcc3

Browse files
committed
[AI Gateway] Rename Workers AI binding to AI binding per review feedback
1 parent 27df89c commit bbabcc3

File tree

4 files changed

+12
-19
lines changed

4 files changed

+12
-19
lines changed

src/content/docs/ai-gateway/features/unified-billing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ When your balance falls below the set threshold, AI Gateway will automatically a
4949

5050
## Use Unified Billing
5151

52-
Unified Billing works in two ways: through the Workers AI binding or through the HTTP API. Both deduct credits from your account automatically without requiring provider API keys.
52+
Unified Billing works in two ways: through the AI binding or through the HTTP API. Both deduct credits from your account automatically without requiring provider API keys.
5353

54-
### Workers AI binding
54+
### AI binding
5555

5656
Call any model listed in the [model catalog](https://developers.cloudflare.com/ai/models/) using `env.AI.run()`. This includes both Workers AI models and third-party models from providers like OpenAI, Anthropic, and Google.
5757

src/content/docs/ai-gateway/integrations/vercel-ai-sdk.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ sidebar:
55
order: 2
66
---
77

8-
import {
9-
Details,
10-
Tabs,
11-
TabItem
12-
} from "~/components";
8+
import { Details, Tabs, TabItem } from "~/components";
139
import CodeSnippets from "~/components/ai-gateway/code-examples.astro";
1410

1511
The [Vercel AI SDK](https://sdk.vercel.ai/) is a TypeScript library for building AI applications. The SDK supports many different AI providers, tools for streaming completions, and more.
@@ -21,11 +17,11 @@ To use Cloudflare AI Gateway with Vercel AI SDK, you will need to use the `ai-ga
2117
npm install ai-gateway-provider
2218
```
2319

24-
## Examples
20+
## Examples
2521

2622
<CodeSnippets forceClient="aisdk" />
2723

28-
### Workers AI binding with third-party models
24+
### AI binding with third-party models
2925

3026
If you are already using the [`workers-ai-provider`](https://www.npmjs.com/package/workers-ai-provider) package, you can route requests through AI Gateway to call third-party models without needing separate provider SDKs. Pass a `gateway` option with your gateway ID to `createWorkersAI`:
3127

@@ -50,18 +46,15 @@ export default {
5046
} satisfies ExportedHandler<Env>;
5147
```
5248

53-
This works with any [supported provider and model](/ai-gateway/providers/) available through AI Gateway.
49+
This works with any [supported provider and model](/ai-gateway/usage/providers/) available through AI Gateway.
5450

5551
### Fallback Providers
5652

5753
To specify model or provider fallbacks to handle request failures and ensure reliability, you can pass an array of models to the `model` option.
5854

5955
```js title=""
6056
const { text } = await generateText({
61-
model: aigateway([
62-
openai.chat("gpt-5.1"), anthropic("claude-sonnet-4-5")
63-
]),
64-
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
57+
model: aigateway([openai.chat("gpt-5.1"), anthropic("claude-sonnet-4-5")]),
58+
prompt: "Write a vegetarian lasagna recipe for 4 people.",
6559
});
6660
```
67-

src/content/docs/ai-gateway/integrations/worker-binding-methods.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ tags:
77
- AI
88
- Bindings
99
description: >-
10-
Reference for the Workers AI binding with AI Gateway. Call Workers AI and
10+
Reference for the AI binding with AI Gateway. Call Workers AI and
1111
third-party models with env.AI.run(), access log IDs, and use gateway methods
1212
for feedback, logging, URLs, and universal requests.
1313
---
1414

1515
import { Render, WranglerConfig } from "~/components";
1616

17-
The Workers AI binding (`env.AI`) lets you call AI models and access AI Gateway features directly from your Worker.
17+
The AI binding (`env.AI`) lets you call AI models and access AI Gateway features directly from your Worker.
1818

1919
For a step-by-step setup guide, refer to [Set up Workers AI with AI Gateway](/ai-gateway/integrations/aig-workers-ai-binding/).
2020

@@ -77,7 +77,7 @@ const resp = await env.AI.run(
7777
Third-party models require an AI Gateway and use [Unified Billing](/ai-gateway/features/unified-billing/). Cloudflare manages the provider credentials and deducts credits from your account. You do not need to supply your own API keys.
7878

7979
:::note
80-
[BYOK (Bring Your Own Keys)](/ai-gateway/configuration/bring-your-own-keys/) is not supported for third-party models called through the Workers AI binding. To use your own provider keys, use the [AI Gateway REST API](/ai-gateway/usage/providers/) or the [chat completions endpoint](/ai-gateway/usage/chat-completion/) instead.
80+
[BYOK (Bring Your Own Keys)](/ai-gateway/configuration/bring-your-own-keys/) is not supported for third-party models called through the AI binding. To use your own provider keys, use the [AI Gateway REST API](/ai-gateway/usage/providers/) or the [chat completions endpoint](/ai-gateway/usage/chat-completion/) instead.
8181
:::
8282

8383
Browse available models in the [model catalog](https://developers.cloudflare.com/ai/models/).

src/content/docs/ai-gateway/usage/providers/workersai.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Render, TypeScriptExample } from "~/components";
1212
Use AI Gateway for analytics, caching, and security on requests to [Workers AI](/workers-ai/). Workers AI integrates seamlessly with AI Gateway, allowing you to execute AI inference via API requests or through an environment binding for Workers scripts. The binding simplifies the process by routing requests through your AI Gateway with minimal setup.
1313

1414
:::note
15-
You can also access third-party models through AI Gateway using the Workers AI binding. Refer to the [binding reference](/ai-gateway/integrations/worker-binding-methods/#envairun) for details.
15+
You can also access third-party models through AI Gateway using the AI binding. Refer to the [binding reference](/ai-gateway/integrations/worker-binding-methods/#envairun) for details.
1616
:::
1717

1818
## Prerequisites

0 commit comments

Comments
 (0)