All Products
Search
Document Center

API Gateway:AiFallbackConfig

Last Updated:Apr 09, 2026

Parameter

Type

Description

Example

object

Defines the AI fallback configuration, which specifies an alternative service to handle a request if the primary service fails.

onlyRedirectUpstreamCode

boolean

Determines whether fallback is triggered solely by the upstream service's status code. If true, fallback occurs only if the upstream service returns an error code. If false, other conditions, such as timeouts, can also trigger the fallback.

serviceConfigs

array

A list of fallback service configurations.

object

Defines the configuration for a single fallback service.

serviceId

string

The unique ID of the fallback service.

name

string

The name of the fallback service.

targetModelName

string

The name of the model to use for the fallback request.

passThroughModelName

boolean

Determines whether to pass the original model name to the fallback service. If true, the model name from the original request is used. If false, the value of targetModelName is used instead.