feat: refresh model sync and MiMo speech metadata (#91)

This commit is contained in:
Johnson-LYS
2026-08-31 14:35:53 +08:00
committed by GitHub
parent 9f331d3f78
commit e7848667b6
10 changed files with 518 additions and 14 deletions

View File

@@ -18,6 +18,107 @@
},
"additionalProperties": false,
"definitions": {
"modelOrigin": {
"type": "object",
"required": ["vendor", "canonicalModelId"],
"properties": {
"vendor": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
"description": "规范化原厂商 ID如 xiaomi、openai、alibaba、minimax不得填写当前算力 Provider ID。"
},
"canonicalModelId": {
"type": "string",
"minLength": 1,
"description": "原厂模型的稳定识别 ID用于适配器匹配、诊断和日志不替代实际路由使用的 modelName/apiModelId。"
},
"family": {
"type": "string",
"minLength": 1,
"description": "跨小版本稳定的模型家族,如 mimo-asr同一协议下的后续模型版本可复用该家族语义。"
}
},
"additionalProperties": false
},
"speechVoice": {
"type": "object",
"required": ["id", "label"],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "传给上游语音接口的稳定音色 ID。"
},
"label": {
"type": "string",
"minLength": 1,
"description": "面向用户展示的音色名称。"
}
},
"additionalProperties": false
},
"speechModelProfile": {
"type": "object",
"required": ["protocol", "protocolVersion", "modes"],
"properties": {
"protocol": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
"description": "稳定语音协议族,如 xiaomi-mimo-chat-asr模型常规迭代不得改变此值。"
},
"protocolVersion": {
"type": "string",
"pattern": "^[1-9][0-9]*$",
"description": "协议不兼容版本号;只有请求、认证、响应或流式状态机发生不兼容变化时才递增。"
},
"modes": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "string", "enum": ["batch", "streaming"] },
"description": "模型协议支持的调用模式batch整段和/或 streaming流式。"
},
"inputFormats": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1 },
"description": "ASR 上游接受的音频格式,如 wav、mp3、webm格式名使用适配器可识别的规范值。"
},
"outputFormats": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1 },
"description": "TTS 上游可返回的音频格式,如 pcm16le、wav、mp3运行时需与适配器和播放器能力求交集。"
},
"sampleRates": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "integer", "minimum": 1 },
"description": "支持的采样率Hz运行时不得假设固定采样率需完成能力协商。"
},
"defaultVoice": {
"type": "string",
"minLength": 1,
"description": "TTS 推荐默认音色 ID声明 voices 时必须能在 voices 中找到同 ID 条目。"
},
"voices": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/definitions/speechVoice" },
"description": "TTS 可选音色列表,统一为稳定 id 与用户可读 label。"
},
"languageHints": {
"type": "boolean",
"description": "ASR 协议是否接受语言提示参数;不是模型支持语言范围清单。"
}
},
"additionalProperties": false
},
"modelSpec": {
"type": "object",
"required": ["id", "spec"],
@@ -158,9 +259,11 @@
},
"extra": {
"type": "object",
"description": "模型内在附加配置(如 apiModelId 全名、推理预算等)。不含价格,也不得声明 Provider/接入面的 reasoning effort 能力。",
"description": "模型内在开放扩展modelOrigin 描述真实原厂身份speech 描述可跨小版本复用的语音协议;不含价格,也不得声明 Provider/接入面的 reasoning effort 能力。",
"not": { "required": ["reasoning"] },
"properties": {
"modelOrigin": { "$ref": "#/definitions/modelOrigin" },
"speech": { "$ref": "#/definitions/speechModelProfile" },
"thinkingOnly": {
"type": "boolean",
"description": "模型强制思考、无法关闭(如 GLM-5.3 系列 thinking.type 仅接受 enabled。true 时客户端把 off 从可选档位移除,并把内部 suppressThinking 降级为 auto避免发出必然被上游拒绝的关闭参数。只描述模型固有属性不声明接入面支持哪些深度档位——后者只能写在 provider model 的 extra.reasoning 中。"