附录
更新时间:2026-09-07
Model对象定义
AiGwBackendBillingConfigDTO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| inputTokenPrice | Double | 输入 Token 单价,允许为 0 表示该维度免费 |
| outputTokenPrice | Double | 输出 Token 单价,允许为 0 表示该维度免费 |
| cacheTokenPrice | Double | 缓存 Token 单价,允许为 0 表示该维度免费 |
| priceUnit | String | 单价计量单位:PER_1K(每千 Token)/PER_1M(每百万 Token) |
AiGwBackendConnectionPoolConfigDTO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| enabled | Boolean | 连接池开关,关闭时使用系统默认的连接超时策略,且 tcpKeepalive 配置不生效 |
| idleTimeout | int | 空闲连接超时时间,单位为秒,取值不小于 1,连接池开关开启时必填 |
| connectTimeout | int | 连接建立超时时间,单位为秒,取值不小于 1,连接池开关开启时必填 |
| tcpKeepalive | AiGwBackendTcpKeepaliveConfigDTO | TCP keepalive 配置,连接池开关开启时必填 |
AiGwBackendDnsServerDTO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| ip | String | DNS 服务器 IP 地址 |
| port | int | DNS 服务器端口,取值 1~63355,不传默认 53 |
AiGwBackendGetReq
| 参数名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| backendId | String | 是 | 后端 ID |
AiGwBackendListReq
| 参数名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| keyword | String | 否 | 搜索关键字,与 keywordType 配合使用 |
| keywordType | String | 否 | 搜索关键字对应的字段名 |
| pageNo | int | 否 | 页码,从 1 开始,不传默认 1 |
| pageSize | int | 否 | 每页数据项数目,取值 1~1000,不传默认 1000 |
| order | String | 否 | 排序方法:asc/desc |
| orderBy | String | 否 | 排序字段 |
| orders | List<OrderModel> | 否 | 多字段排序条件,与 order、orderBy 二选一 |
| filters | List<FilterModel> | 否 | 过滤条件列表 |
| instanceId | String | 是 | 网关实例 ID |
| name | String | 否 | 后端名称,模糊匹配 |
| aiModel | String | 否 | AI 大模型接口协议:openai/anthropic/raw |
| modelProtocol | String | 否 | Model 服务协议:OPENAI_COMPATIBLE/ANTHROPIC_COMPATIBLE/QIANFAN/CUSTOM_HTTP/CUSTOM_WEBSOCKET/DOUBAO/BAILIAN/ORIGINAL |
| backendType | String | 否 | 后端类型:aiModel(AI 大模型)/ip(固定 IP)/domain(域名)/agent(Agent 服务) |
| apiId | String | 否 | 路由 ID,按该路由已绑定的后端过滤 |
AiGwBackendTcpKeepaliveConfigDTO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| enabled | Boolean | TCP keepalive 开关,仅连接池开关开启时生效,关闭或不传时不启用 keepalive |
| time | int | 连接空闲多久后发送探测,单位为秒,取值不小于 1 |
| interval | int | 两次探测之间的间隔,单位为秒,取值不小于 1 |
| probes | int | 探测无响应后的重试次数,取值不小于 1 |
AiGwBackendTlsConfigDTO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| mode | String | TLS 模式:DISABLE(关闭 TLS)/SIMPLE(单向 TLS) |
| sni | String | SNI 域名,TLS 模式为 SIMPLE 时必填 |
AiGwBackendUO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| backendId | String | 后端 ID |
| name | String | 后端名称 |
| instanceId | String | 网关实例 ID |
| instanceName | String | 网关实例名称 |
| backendType | String | 后端类型:aiModel(AI 大模型)/ip(固定 IP)/domain(域名)/agent(Agent 服务) |
| backendTypeName | String | 后端类型名称,用于界面展示 |
| aiModel | String | AI 大模型接口协议:openai/anthropic/raw,仅后端类型为 aiModel 时返回 |
| aiModelName | String | AI 大模型接口协议名称,仅后端类型为 aiModel 时返回 |
| provider | String | 模型供应商,仅后端类型为 aiModel 时返回 |
| backendServiceEndpoint | String | 服务地址,格式为 host:port,AI 大模型可再带路径 |
| backendDnsServers | List<AiGwBackendDnsServerDTO> | 后端专用 DNS 服务器列表,未配置时为空 |
| backendApiKeys | List<String> | 访问后端使用的 API Key 列表,未配置时为空 |
| billingConfig | AiGwBackendBillingConfigDTO | Token 计费配置,用于计算调用该后端产生的 Token 费用,未配置计费时为空 |
| tlsConfig | AiGwBackendTlsConfigDTO | 访问后端时的 TLS 配置,未启用 TLS 时 mode 为 DISABLE |
| connectionPool | AiGwBackendConnectionPoolConfigDTO | 访问后端时的连接池配置,未开启时 enabled 为 false 并返回系统默认超时值 |
AiGwListEnumAiModelItemUO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| baseUrl | String | 模型服务预置地址,含 http:// 或 https:// |
| aiModel | String | AI 大模型接口协议:openai/anthropic/raw |
| backendServiceEndpoint | String | 由 baseUrl 去掉协议前缀得到的服务地址,格式为 host[:port][/path],可直接作为创建后端的 backendServiceEndpoint 传入,不补全默认端口 |
| tlsConfigMode | String | 由 baseUrl 协议推导的 TLS 模式:https 为 SIMPLE(单向 TLS),http 为 DISABLE(关闭 TLS) |
| sni | String | SNI 域名,取 baseUrl 中的主机名,不含端口与路径,tlsConfigMode 为 DISABLE 时为空 |
AiGwListEnumAiModelUO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| provider | String | 模型供应商标识,创建后端时作为 provider 传入 |
| showName | String | 模型供应商名称,用于界面展示 |
| aiModels | List<AiGwListEnumAiModelItemUO> | 该供应商支持的接口协议及预置服务地址列表 |
AiGwListEnumBackendTypeUO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| key | String | 后端类型标识:aiModel/ip/domain/agent,创建后端时作为 backendType 传入 |
| name | String | 后端类型名称,用于界面展示 |
| items | List<AiGwListEnumAiModelUO> | AI 大模型供应商及接口协议列表,仅后端类型为 AI 大模型时返回,其余类型为空 |
CreateAiGwBackendReq
| 参数名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| instanceId | String | 是 | 网关实例 ID |
| name | String | 是 | 后端名称 |
| backendType | String | 是 | 后端类型:aiModel(AI 大模型)/ip(固定 IP)/domain(域名)/agent(Agent 服务) |
| aiModel | String | 否 | AI 大模型接口协议:openai/anthropic/raw,仅后端类型为 aiModel 时生效,不传按 openai 处理 |
| provider | String | 否 | 模型供应商,取值为 custom 或 DescribeBackendTypes 返回的供应商标识,仅后端类型为 aiModel 时生效且必填 |
| backendServiceEndpoint | String | 是 | 服务地址,格式为 host[:port],AI 大模型可再带路径,不含 http:// 与 https://;省略端口时按 tlsConfig.mode 补全为 80 或 443 |
| backendDnsServers | List<AiGwBackendDnsServerDTO> | 否 | 后端专用 DNS 服务器列表,最多 5 个,不传表示使用系统默认 DNS |
| backendApiKeys | List<String> | 否 | 访问后端使用的 API Key 列表,后端类型为 aiModel 时除「provider 为 custom 且 aiModel 为 raw」外必填 |
| billingConfig | AiGwBackendBillingConfigDTO | 否 | Token 计费配置,用于计算调用该后端产生的 Token 费用,不传表示不配置计费 |
| tlsConfig | AiGwBackendTlsConfigDTO | 否 | 访问后端时的 TLS 配置,不传表示不启用 TLS |
| connectionPool | AiGwBackendConnectionPoolConfigDTO | 否 | 访问后端时的连接池配置,不传表示使用系统默认的连接超时策略 |
CreateAiGwBackendResp
| 参数名称 | 类型 | 描述 |
|---|---|---|
| backendId | String | 后端 ID |
DeleteAiGwBackendReq
| 参数名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| backendIds | List<String> | 是 | 待删除的后端 ID 列表 |
FilterModel
| 参数名称 | 类型 | 描述 |
|---|---|---|
| keyword | Object | 过滤关键词,取值类型随 keywordType 变化 |
| keywordType | String | 过滤关键词对应的字段名 |
| subKeywordType | String | 过滤关键词对应的子字段名 |
ListAiGwBackendUO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| backendId | String | 后端 ID |
| name | String | 后端名称 |
| apiCount | int | 关联的 API 数量 |
| backendType | String | 后端类型:aiModel(AI 大模型)/ip(固定 IP)/domain(域名)/agent(Agent 服务) |
| backendTypeName | String | 后端类型名称,用于界面展示 |
| aiModel | String | AI 大模型接口协议:openai/anthropic/raw,仅后端类型为 aiModel 时返回 |
| provider | String | 模型供应商,仅后端类型为 aiModel 时返回 |
| updateTime | String | 更新时间,UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ |
OrderModel
| 参数名称 | 类型 | 描述 |
|---|---|---|
| order | String | 排序方法:asc/desc |
| orderBy | String | 排序字段 |
PageResultRespListAiGwBackendUO
| 参数名称 | 类型 | 描述 |
|---|---|---|
| orderBy | String | 排序字段 |
| order | String | 排序方法:asc/desc |
| pageNo | int | 页码 |
| pageSize | int | 每页数据项数目 |
| totalCount | long | 符合条件的数据项总数 |
| result | List<ListAiGwBackendUO> | 当前页的后端列表 |
UpdateAiGwBackendReq
| 参数名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| backendId | String | 是 | 后端 ID |
| name | String | 是 | 后端名称 |
| backendType | String | 否 | 后端类型:aiModel(AI 大模型)/ip(固定 IP)/domain(域名)/agent(Agent 服务),不传表示只更新名称 |
| aiModel | String | 否 | AI 大模型接口协议:openai/anthropic/raw,仅后端类型为 aiModel 时生效,不传按 openai 处理 |
| provider | String | 否 | 模型供应商,取值为 custom 或 DescribeBackendTypes 返回的供应商标识,仅后端类型为 aiModel 时生效且必填 |
| backendServiceEndpoint | String | 否 | 服务地址,格式为 host[:port],AI 大模型可再带路径,不含 http:// 与 https://;省略端口时按本次请求的 tlsConfig.mode 补全为 80 或 443 |
| backendDnsServers | List<AiGwBackendDnsServerDTO> | 否 | 后端专用 DNS 服务器列表,最多 5 个,不传表示使用系统默认 DNS |
| backendApiKeys | List<String> | 否 | 访问后端使用的 API Key 列表,后端类型为 aiModel 时除「provider 为 custom 且 aiModel 为 raw」外必填 |
| billingConfig | AiGwBackendBillingConfigDTO | 否 | Token 计费配置,不传表示不修改原有计费配置,传空对象表示清除计费配置 |
| tlsConfig | AiGwBackendTlsConfigDTO | 否 | 访问后端时的 TLS 配置,不传表示不启用 TLS |
| connectionPool | AiGwBackendConnectionPoolConfigDTO | 否 | 访问后端时的连接池配置,不传表示使用系统默认的连接超时策略 |
类型编码定义
评价此篇文章
