|
名称 |
类型 |
描述 |
示例值 |
|---|---|---|---|
|
object |
结构体描述 |
||
| provider |
string |
大模型提供商 |
qwen moonshot baichuan yi zhipuai 360ai hunyuan stepfun spark openai claude anthropic doubao minimax gemini azure deepseek custom pai-eas bedrock vertex |
| address |
string |
服务地址 |
https://dashscope.aliyun.com |
| upstreamAuthMode |
string |
上游鉴权方式,区分 API Key 鉴权、无鉴权和透传下游鉴权。 |
api-key |
| authHeaderKey |
string |
向上游传递鉴权凭证时使用的请求头名称。 |
Authorization |
| enableHealthCheck |
boolean |
是否启用健康检查 |
true |
| paiEASServiceConfig |
object |
PAI-EAS 服务专属配置 |
|
| workspaceId |
string |
工作空间 ID |
cb89d4de30042df4459442589664e00d |
| serviceId |
string |
服务 ID |
svc-cvaeb0um1hkqp79k72v0 |
| serviceName |
string |
服务名称 |
auto-ai-service |
| endpointType |
string |
连接类型:私网(vpc)/公网(public) |
"public","private" |
| bedrockServiceConfig |
object |
Bedrock 服务专属配置 |
|
| endpointMode |
string |
Bedrock 服务端点模式,支持 runtime 和 mantle;省略时沿用 runtime。 |
runtime |
| awsRegion |
string |
AWS 区域 |
us-east-1 |
| awsAccessKey |
string |
AWS 访问密钥 |
AKIAIOSFODNN7EXAMPLE |
| awsSecretKey |
string |
AWS 密钥 |
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
| promptCacheEnable |
boolean |
是否为 Bedrock 上游启用提示词缓存。 |
true |
| promptCacheRetention |
string |
提示词缓存保留策略。 |
in_memory |
| bedrockPromptCachePointPositions |
object |
按提示词位置配置是否插入 Bedrock 缓存标记。 |
{"systemPrompt":true} |
|
boolean |
该提示词位置是否插入缓存标记。 |
true |
|
| promptCacheStrategy |
string |
Bedrock 提示词缓存的适用模型策略。 |
supported_models_only |
| ApiKeyGenerateMode |
string |
API 密钥的生成模式 |
Custom |
| apiKeyGenerateMode |
string |
API Key 来源;与旧字段同时传入时必须一致 |
Custom |
| apiKeyReferences |
array |
只读 KMS 引用名称摘要,不包含凭据值 |
|
|
string |
一个 API Key 凭证引用标识。 |
apig-qwen-api-key |
|
| configRevision |
string |
只读服务配置版本;条件更新使用 expectedConfigRevision |
7e4f52a9b0c34d16a268e913f5c2087b |
| defaultModelName |
string |
默认使用的模型名称 |
gpt-4 |
| enableOutlierDetection |
boolean |
是否启用异常值检测功能 |
true |
| claudeCodeMode |
boolean |
是否启用 Claude Code 兼容模式。 |
false |
| apiKeyFailover |
object |
API Key 失败摘除与恢复配置。 |
|
| enabled |
boolean |
是否启用 API Key 失败摘除。 |
false |
| failureThreshold |
integer |
触发 API Key 摘除的失败次数阈值。 |
3 |
| cooldownDuration |
integer |
API Key 被摘除后的冷却时长。 |
30000 |
| failoverOnStatus |
array |
触发 API Key 失败摘除的响应状态匹配规则集合。 |
|
|
string |
一个触发失败摘除的响应状态匹配规则。 |
429 |
|
| retryOnFailure |
object |
当前请求失败后的换 Key 重试配置。 |
|
| enabled |
boolean |
是否启用当前请求失败重试。 |
false |
| maxRetries |
integer |
当前请求最多重试次数。 |
2 |
| retryTimeout |
integer |
当前请求的失败重试超时配置。 |
30000 |
| retryOnStatus |
array |
触发当前请求重试的响应状态匹配规则集合。 |
|
|
string |
一个触发重试的响应状态匹配规则。 |
429 |
|
| vertexServiceConfig |
object |
Vertex AI 服务的配置信息 |
|
| vertexAuthKey |
string |
Vertex AI 的认证密钥 |
{\"type\":\"service_account\",\"project_id\":\"my-project\",\"private_key\":\"-----BEGIN PRIVATE KEY-----...\",\"client_email\":\"xxx@xxx.iam.gserviceaccount.com\",\"token_uri\":\"https://oauth2.googleapis.com/token\"} |
| vertexRegion |
string |
Vertex AI 服务所在的 Google Cloud 区域 |
us-central1 |
| vertexProjectId |
string |
Google Cloud 项目 ID |
my-project |
| vertexAuthServiceName |
string |
Vertex AI 使用的认证服务名称 |
google-oauth2 |
| geminiSafetySetting |
object |
Gemini 模型的安全过滤级别设置 |
|
|
string |
参数 |
{"BLOCK_NONE": "true"} |
|
| vertexTokenRefreshAhead |
integer |
在访问令牌过期前多少秒提前刷新 |
300 |
| vertexOpenAICompatible |
boolean |
是否使用 Vertex AI 的 OpenAI 兼容接口。 |
false |
| klingServiceConfig |
object |
KlingAI 服务专用的鉴权与令牌配置。 |
|
| klingAccessKey |
string |
KlingAI 访问密钥标识,示例使用脱敏值。 |
kling-access-key-**** |
| klingSecretKey |
string |
KlingAI 访问密钥,示例使用脱敏值。 |
kling-secret-key-**** |
| klingTokenRefreshAhead |
integer |
KlingAI 令牌的提前刷新配置。 |
120 |
| protocols |
array |
模型协议列表 |
|
|
string |
协议。 |
OpenAI/v1 |
|
| apiKeys |
array |
apiKey 列表 |
|
|
string |
一个上游 API Key 凭证。 |
sk-xxx |
|
| compatibleProtocols |
array |
服务支持的兼容协议列表 |
|
|
string |
参数 |
"openai", "anthropic" |
该文章对您有帮助吗?