All Products
Search
Document Center

API Gateway:AiFallbackConfig

Last Updated:Apr 08, 2026

Parameter

Type

Description

Example

object

Defines the AI fallback configuration. When the primary model fails, these settings redirect the request to a secondary service.

onlyRedirectUpstreamCode

boolean

Specifies whether to trigger fallback only when the upstream service returns an error code. Optional.

serviceConfigs

array

An array of fallback service configurations. Each object specifies the target service to use during fallback.

object

A single fallback service configuration.

serviceId

string

The unique identifier of the fallback service. Required.

name

string

A user-defined name for this configuration, used for identification. Optional.

targetModelName

string

The name of the target AI model in the fallback service.

passThroughModelName

boolean

If true, passes the model name from the original client request to the fallback service, ignoring the targetModelName parameter. Optional.