Skip to content

Commit bd200a0

Browse files
Update fallbacks.mdx (#17891)
* Update fallbacks.mdx added info on new fallback step response header `cf-aig-step` * URL added * URL added --------- Co-authored-by: daisyfaithauma <[email protected]>
1 parent 7301f6d commit bd200a0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ pcx_content_type: configuration
33
title: Fallbacks
44
sidebar:
55
order: 2
6-
76
---
87

9-
import { Render } from "~/components"
8+
import { Render } from "~/components";
109

1110
Specify model or provider fallback with your [Universal endpoint](/ai-gateway/providers/universal/) to specify what to do if a request fails.
1211

@@ -25,8 +24,17 @@ graph TD
2524
D --> E[Return Response]
2625
```
2726

28-
<br/>
27+
<br />
2928

3029
You can add as many fallbacks as you need, just by adding another object in the array.
3130

3231
<Render file="universal-gateway-example" />
32+
33+
## Response header(cf-aig-step)
34+
35+
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.
36+
37+
- `cf-aig-step:0` – The first (primary) model was used successfully.
38+
- `cf-aig-step:1` – The request fell back to the second model.
39+
- `cf-aig-step:2` – The request fell back to the third model.
40+
- Subsequent steps – Each fallback increments the step number by 1.

0 commit comments

Comments
 (0)