AI网关新增xAI格式TTS端点与过滤弃用模型开关
CI / test (push) Successful in 32s
Release / release (push) Successful in 54s

- POST /ai/v1/tts:xAI 官方 TTS 格式转换层(text/voice_id→input/voice),复用 Speech 编排,model 缺省 xai.grok-tts;实测 output_format/speed 透传生效
- 「过滤弃用模型」开关(GET/PUT /api/v1/ai-settings,settings 表持久化):开启后已宣布弃用(未退役)模型从列表与路由排除;同步入库与退役提醒不受影响
- AI 网关文档更名 docs/AI网关.md,补 tts 矩阵段与开关说明;README 引用同步
- CHANGELOG 0.5.0(0.4.0 已发版冻结);DASH_VERSION v0.5.0
This commit is contained in:
2026-07-14 09:49:28 +08:00
parent 0a86b5a291
commit b4ef98a25e
17 changed files with 626 additions and 7 deletions
+123
View File
@@ -213,6 +213,33 @@
}
}
},
"/ai/v1/tts": {
"post": {
"tags": [
"AI 网关"
],
"summary": "xAI 官方格式文本转语音端点",
"parameters": [
{
"description": "xAI TTS 请求体(text/language 必填,voice_id 缺省 eve;model 为网关扩展,缺省 xai.grok-tts;未列字段原样透传)",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/oci-portal_internal_aiwire.TtsRequest"
}
}
],
"responses": {
"200": {
"description": "音频字节(Content-Type 透传上游,默认 audio/mpeg)",
"schema": {
"type": "file"
}
}
}
}
},
"/api/v1/about": {
"get": {
"security": [
@@ -698,6 +725,57 @@
}
}
},
"/api/v1/ai-settings": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"tags": [
"AI 管理"
],
"summary": "AI 网关全局设置",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/internal_api.aiSettingsResponse"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"tags": [
"AI 管理"
],
"summary": "更新 AI 网关全局设置",
"parameters": [
{
"description": "开启后已宣布弃用(即使未退役)的模型从列表与路由中排除",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/internal_api.aiSettingsResponse"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/internal_api.aiSettingsResponse"
}
}
}
}
},
"/api/v1/auth/credentials": {
"get": {
"security": [
@@ -5886,6 +5964,14 @@
}
}
},
"internal_api.aiSettingsResponse": {
"type": "object",
"properties": {
"filterDeprecated": {
"type": "boolean"
}
}
},
"internal_api.attachBootVolumeRequest": {
"type": "object",
"required": [
@@ -7682,6 +7768,43 @@
}
}
},
"oci-portal_internal_aiwire.TtsOutputFormat": {
"type": "object",
"properties": {
"bit_rate": {
"type": "integer"
},
"codec": {
"type": "string"
},
"sample_rate": {
"type": "integer"
}
}
},
"oci-portal_internal_aiwire.TtsRequest": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"model": {
"type": "string"
},
"output_format": {
"$ref": "#/definitions/oci-portal_internal_aiwire.TtsOutputFormat"
},
"speed": {
"type": "number"
},
"text": {
"type": "string"
},
"voice_id": {
"type": "string"
}
}
},
"oci-portal_internal_aiwire.Usage": {
"type": "object",
"properties": {