Skip to content

Commit 27fab60

Browse files
[AIG]universal endpoint new path (#21950)
* universal endpoint new path * added redirect * fixed invalid links * invalid links * invalid links * removed index page * fixed links * Update __redirects * link * moved universal up * reordered sidebar
1 parent e58c18b commit 27fab60

File tree

16 files changed

+60
-52
lines changed

16 files changed

+60
-52
lines changed

public/__redirects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
/ai-gateway/integration/aig-workers-ai-binding/ /ai-gateway/integrations/aig-workers-ai-binding/ 301
147147
/ai-gateway/integration/ /ai-gateway/integrations/ 301
148148
/ai-gateway/providers/open-router/ /ai-gateway/providers/openrouter/ 301
149+
/ai-gateway/providers/universal/ /ai-gateway/universal/ 301
149150
/ai-gateway/configuration/websockets-api/ /ai-gateway/websockets-api/ 301
150151
/ai-gateway/configuration/websockets-api/non-realtime-api/ /ai-gateway/websockets-api/non-realtime-api/ 301
151152
/ai-gateway/configuration/websockets-api/realtime-api/ /ai-gateway/websockets-api/realtime-api/ 301

src/content/changelog/ai-gateway/2025-01-26-worker-binding-methods.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ With the new AI Gateway binding methods, you can now:
1616

1717
- Send feedback and update metadata with `patchLog`.
1818
- Retrieve detailed log information using `getLog`.
19-
- Execute [universal requests](/ai-gateway/providers/universal/) to any AI Gateway provider with `run`.
19+
- Execute [universal requests](/ai-gateway/universal/) to any AI Gateway provider with `run`.
2020

2121
For example, to send feedback and update metadata using `patchLog`:
2222

src/content/changelog/ai-gateway/2025-02-05-aig-request-handling.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ date: 2025-02-06T11:00:00Z
88

99
AI Gateway adds additional ways to handle requests - [Request Timeouts](/ai-gateway/configuration/request-handling/#request-timeouts) and [Request Retries](/ai-gateway/configuration/request-handling/#request-retries), making it easier to keep your applications responsive and reliable.
1010

11-
Timeouts and retries can be used on both the [Universal Endpoint](/ai-gateway/providers/universal) or directly to a [supported provider](/ai-gateway/providers/).
11+
Timeouts and retries can be used on both the [Universal Endpoint](/ai-gateway/universal/) or directly to a [supported provider](/ai-gateway/providers/).
1212

1313
**Request timeouts**
14-
A [request timeout](/ai-gateway/configuration/request-handling/#request-timeouts) allows you to trigger [fallbacks](/ai-gateway/configuration/fallbacks/) or a retry if a provider takes too long to respond.
14+
A [request timeout](/ai-gateway/configuration/request-handling/#request-timeouts) allows you to trigger [fallbacks](/ai-gateway/configuration/fallbacks/) or a retry if a provider takes too long to respond.
1515

1616
To set a request timeout directly to a provider, add a `cf-aig-request-timeout` header.
1717

@@ -22,10 +22,12 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/workers-ai/@
2222
--header 'cf-aig-request-timeout: 5000'
2323
--data '{"prompt": "What is Cloudflare?"}'
2424
```
25+
2526
**Request retries**
2627
A [request retry](/ai-gateway/configuration/request-handling/#request-retries) automatically retries failed requests, so you can recover from temporary issues without intervening.
2728

2829
To set up request retries directly to a provider, add the following headers:
30+
2931
- cf-aig-max-attempts (number)
3032
- cf-aig-retry-delay (number)
31-
- cf-aig-backoff ("constant" | "linear" | "exponential)
33+
- cf-aig-backoff ("constant" | "linear" | "exponential)

src/content/docs/ai-gateway/changelog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Changelog
44
release_notes_file_name:
55
- ai-gateway
66
sidebar:
7-
order: 9
7+
order: 15
88
---
99

1010
import { ProductReleaseNotes } from "~/components";

src/content/docs/ai-gateway/configuration/fallbacks.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import { Render } from "~/components";
99

10-
Specify model or provider fallbacks with your [Universal endpoint](/ai-gateway/providers/universal/) to handle request failures and ensure reliability.
10+
Specify model or provider fallbacks with your [Universal endpoint](/ai-gateway/universal/) to handle request failures and ensure reliability.
1111

1212
Cloudflare can trigger your fallback provider in response to [request errors](#request-failures) or [predetermined request timeouts](/ai-gateway/configuration/request-handling#request-timeouts). The [response header `cf-aig-step`](#response-headercf-aig-step) indicates which step successfully processed the request.
1313

@@ -38,7 +38,7 @@ You can add as many fallbacks as you need, just by adding another object in the
3838

3939
## Response header(cf-aig-step)
4040

41-
When using the [Universal endpoint](/ai-gateway/providers/universal/) with fallbacks, the response header `cf-aig-step` indicates which model successfully processed the request by returning the step number. This header provides visibility into whether a fallback was triggered and which model ultimately processed the response.
41+
When using the [Universal endpoint](/ai-gateway/universal/) with fallbacks, the response header `cf-aig-step` indicates which model successfully processed the request by returning the step number. This header provides visibility into whether a fallback was triggered and which model ultimately processed the response.
4242

4343
- `cf-aig-step:0` – The first (primary) model was used successfully.
4444
- `cf-aig-step:1` – The request fell back to the second model.

src/content/docs/ai-gateway/configuration/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Configuration
44
sidebar:
55
group:
66
hideIndex: true
7-
order: 5
7+
order: 4
88
---
99

1010
import { DirectoryListing } from "~/components";

src/content/docs/ai-gateway/configuration/request-handling.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ A timeout is set in milliseconds. Additionally, the timeout is based on when the
2828

2929
#### Universal Endpoint
3030

31-
If set on a [Universal Endpoint](/ai-gateway/providers/universal/), a request timeout specifies the timeout duration for requests and triggers a fallback.
31+
If set on a [Universal Endpoint](/ai-gateway/universal/), a request timeout specifies the timeout duration for requests and triggers a fallback.
3232

3333
For a Universal Endpoint, configure the timeout value by setting a `requestTimeout` property within the provider-specific `config` object. Each provider can have a different `requestTimeout` value for granular customization.
3434

@@ -123,7 +123,7 @@ On the final retry attempt, your gateway will wait until the request completes,
123123

124124
#### Universal endpoint
125125

126-
If set on a [Universal Endpoint](/ai-gateway/providers/universal/), a request retry will automatically retry failed requests up to five times before triggering any configured fallbacks.
126+
If set on a [Universal Endpoint](/ai-gateway/universal/), a request retry will automatically retry failed requests up to five times before triggering any configured fallbacks.
127127

128128
For a Universal Endpoint, configure the retry settings with the following properties in the provider-specific `config`:
129129

@@ -196,7 +196,7 @@ curl 'https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}' \
196196

197197
#### Direct provider
198198

199-
If set on a [provider](/ai-gateway/providers/) request, a request retry will automatically retry failed requests up to five times. On the final retry attempt, your gateway will wait until the request completes, regardless of how long it takes.
199+
If set on a [provider](/ai-gateway/universal/) request, a request retry will automatically retry failed requests up to five times. On the final retry attempt, your gateway will wait until the request completes, regardless of how long it takes.
200200

201201
For a provider-specific endpoint, configure the retry settings by adding different header values:
202202

src/content/docs/ai-gateway/glossary.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ AI Gateway supports a variety of headers to help you configure, customize, and m
1616
Settings in AI Gateway can be configured at three levels: **Provider**, **Request**, and **Gateway**. Since the same settings can be configured in multiple locations, the following hierarchy determines which value is applied:
1717

1818
1. **Provider-level headers**:
19-
Relevant only when using the [Universal Endpoint](/ai-gateway/providers/universal/), these headers take precedence over all other configurations.
19+
Relevant only when using the [Universal Endpoint](/ai-gateway/universal/), these headers take precedence over all other configurations.
2020
2. **Request-level headers**:
2121
Apply if no provider-level headers are set.
2222
3. **Gateway-level settings**:

src/content/docs/ai-gateway/guardrails/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Guardrails
33
pcx_content_type: navigation
44
order: 1
55
sidebar:
6-
order: 8
6+
order: 6
77
group:
88
badge: Beta
99
---

src/content/docs/ai-gateway/integrations/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ title: Integrations
44
sidebar:
55
group:
66
hideIndex: true
7-
order: 12
7+
order: 7
88
---

0 commit comments

Comments
 (0)