HttpApiDeployConfig

更新时间:
复制为 MD 格式
名称类型描述示例值
object

AI API 相关配置。

environmentIdstring

环境 ID。

env-xxx
backendScenestring

发布场景。

SingleService
autoDeployboolean

是否自动部署。

true
gatewayIdstring

网关实例 ID。

gw-xx
routeBackendBackend

后端服务信息。

gatewayInfoGatewayInfo

网关信息。

mockHttpApiMockContract

Mock 配置。

gatewayTypestring

网关类型

API
customDomainIdsarray

用户自定义域名 ID 列表。

string

域名 ID。

d-xxx
serviceConfigsarray<object>

服务配置列表。

object

已有服务配置。

serviceIdstring

服务 ID。

svc-xxx
weightlong

服务权重。

100
modelNamePatternstring

模型名称匹配规则

qwen-*
modelNamestring

模型名称

qwen-max
intentCodestring

意图编码

INQUIRY
matchHttpApiBackendMatchConditions

匹配条件。

policyConfigsarray<object>

策略配置列表。

object

策略配置列表。

typestring

策略类型。

AiFallback
enableboolean

是否启用。

true
aiFallbackConfigobject

AiFallback 策略配置

serviceConfigsarray<object>

服务配置列表

object

服务配置列表。

serviceIdstring

服务 id

svc-******
targetModelNamestring

目标模型名称

gpt-4/llama3-70b
aiSecurityGuardConfigobject

循环规则。

serviceAddressstring

服务地址,用于指定后端服务的网络位置

https://api.example.com/v1
checkRequestboolean

是否启用请求校验

true
checkResponseboolean

是否启用响应校验

true
checkRequestImageboolean

是否启用请求中的图像内容校验

true
checkResponseImageboolean

是否启用响应中的图像内容校验

true
requestCheckServicestring

用于请求校验的外部服务地址或配置

https://checker.example.com/validate-request
responseCheckServicestring

用于响应校验的外部服务地址或配置

https://checker.example.com/validate-response
requestImageCheckServicestring

用于请求中图像内容校验的外部服务地址或配置

https://image-checker.example.com/scan
responseImageCheckServicestring

用于响应中图像内容校验的外部服务地址或配置

https://image-checker.example.com/scan-response
riskAlertLevelstring

风险告警级别,用于标识内容或行为的风险等级

low/medium/high
riskConfigarray<object>

循环规则。

object

循环规则。

typestring

策略类型。

K8S
levelstring

冲突等级,类型 string。取值:

  • Critical

  • Warning

  • Informational

Critical
consumerRulesobject

循环规则。

patternstring

当 type=relativeMonthly 时,用于指定每月第几周:

  • first:第一周

  • second:第二周

  • third:第三周

  • fourth:第四周

  • last:最后一周

first
matchTypestring

查询匹配类型

  • term:精确匹配
  • regex:正则匹配
  • phrase:短语匹配,默认方式
  • wildcard:模糊匹配
term
bufferLimitinteger

缓冲区大小上限(字节)

50
consumerRequestCheckServicearray<object>

消费者请求校验服务

object
namestring

名称

API
requestCheckServicestring

请求校验服务

https://checker.example.com/validate
requestImageCheckServicestring

请求图像校验服务

https://image-check.example.com/scan
matchTypestring

匹配类型

exact/prefix
modalityTypestring

模态类型

text/image
consumerResponseCheckServicearray<object>

消费者响应校验服务

object
namestring

名称

AI_API
responseCheckServicestring

响应校验服务

https://checker.example.com/validate-response
responseImageCheckServicestring

响应图像校验服务

https://image-check.example.com/scan-response
matchTypestring

查询匹配类型

  • term:精确匹配
  • regex:正则匹配
  • phrase:短语匹配,默认方式
  • wildcard:模糊匹配
term
modalityTypestring

模态类型

text/image
consumerRiskLevelarray<object>

消费者风险等级

object
namestring

参数名称

APIG-UI
matchTypestring

查询匹配类型

  • term:精确匹配
  • regex:正则匹配
  • phrase:短语匹配,默认方式
  • wildcard:模糊匹配
term
typestring

后端服务场景:

  • Single: 单服务。
  • GrayByWeight: 按比例路由灰度。
  • GrayByLabel: 按标签路由灰度。
  • Mock: Mock 路由。
  • Redirect: 重定向路由。
K8S
levelstring

冲突等级,类型 string。取值:

  • Critical

  • Warning

  • Informational

Critical
aiTokenRateLimitConfigobject

AI 令牌速率限制配置

rulesarray<object>

校验或处理规则列表

object

校验或处理规则列表

limitTypestring

限流类型

request/token
matchKeystring

匹配键

user_id/api_path
matchTypestring

查询匹配类型

  • term:精确匹配
  • regex:正则匹配
  • phrase:短语匹配,默认方式
  • wildcard:模糊匹配
term
matchValuestring

匹配值

user123
limitModestring

限流模式

local
limitValueinteger

限流值

100
globalRulesarray<object>

全局规则

object

全局规则

limitTypestring

限流类型

request
matchKeystring

匹配键

user_id
matchTypestring

查询匹配类型

  • term:精确匹配
  • regex:正则匹配
  • phrase:短语匹配,默认方式
  • wildcard:模糊匹配
term
matchValuestring

匹配值

user123
limitModestring

限流模式

local
limitValueinteger

限流值

100
enableGlobalRulesboolean

是否启用全局规则

true
customDomainInfosarray<object>

用户自定义域名内容列表。

object

用户自定义域名内容列表。

domainIdstring

域名 ID。

d-cshee6dlhtgk******
namestring

域名名称。

hello-server.com
protocolstring

协议。

HTTP
subDomainsarray<object>

二级域名内容列表。

object

网络类型。

domainIdstring

域名 ID。

d-csmn42um******
namestring

域名名称。

test
protocolstring

协议。

HTTP
networkTypestring

网络类型。

Intranet