From c9dc49251269450edf9098fc79db83940c9402f4 Mon Sep 17 00:00:00 2001 From: Warren B Date: Thu, 3 Sep 2026 01:26:50 +0100 Subject: [PATCH] model_specs: fix declarations that accept or reject the wrong requests Each change alters which requests validate, and each was checked against the parser that reads the option. - midashenglm_gen.seed: min -1 -> 0. session.cpp:176 reads the seed through runtime::parse_u32_option, and parse_u32_value (framework/runtime/ options.cpp:36-39) throws on any leading minus. A spec-legal -1 was a guaranteed runtime error, and the "-1 selects a random seed" description went with it. - heartmula.lyrics, heartmula.tags: required false -> true. heartmula/session.cpp throws "HeartMuLa requires non-empty tags" and "HeartMuLa requires non-empty lyrics", so the engine already rejected the requests the spec described as valid. - irodori_tts.text_chunk_mode: values widened to include "default" and "tag_aware". The session takes the shared override (irodori_tts/session.cpp:453-454 -> text::parse_text_chunk_mode_override), and framework/text/chunking.cpp:572-586 accepts default, word_budget, tag_aware, japanese and endline. Two working modes were undeclared. - granite5asr.language: removed. The session never reads a language option; it hard-codes "en" (granite5asr/session.cpp:137, 174, 252, 270, 277), so the declaration invited a value that could not have an effect. - firered_audio session option helper_graph_arena_mb: removed. The only key that exists is fireredtts3.helper_graph_arena_mb (fireredtts3/session.cpp: 251), and FireRedAudio validates session options strictly, so passing the declared name failed the request outright. --- model_specs/firered_audio.json | 8 -------- model_specs/granite5asr.json | 7 ------- model_specs/heartmula.json | 4 ++-- model_specs/irodori_tts.json | 2 ++ model_specs/midashenglm_gen.json | 4 ++-- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/model_specs/firered_audio.json b/model_specs/firered_audio.json index 7e54daf4b..32f05f856 100644 --- a/model_specs/firered_audio.json +++ b/model_specs/firered_audio.json @@ -182,14 +182,6 @@ "min": 1, "default": 1024 }, - { - "name": "helper_graph_arena_mb", - "type": "int", - "description": "Helper graph arena size in MiB; default 256.", - "required": false, - "min": 1, - "default": 256 - }, { "name": "weight_context_mb", "type": "int", diff --git a/model_specs/granite5asr.json b/model_specs/granite5asr.json index f576999fb..ae85c315d 100644 --- a/model_specs/granite5asr.json +++ b/model_specs/granite5asr.json @@ -22,13 +22,6 @@ }, "options": { "request": [ - { - "name": "language", - "type": "string", - "description": "Recognition language (currently English).", - "required": false, - "default": "en" - }, { "name": "audio_chunk_mode", "type": "enum", diff --git a/model_specs/heartmula.json b/model_specs/heartmula.json index 0392f868e..d6f87fdec 100644 --- a/model_specs/heartmula.json +++ b/model_specs/heartmula.json @@ -26,13 +26,13 @@ "name": "lyrics", "type": "string", "description": "Lyrics text.", - "required": false + "required": true }, { "name": "tags", "type": "string", "description": "Comma-separated music tags.", - "required": false + "required": true }, { "name": "duration_sec", diff --git a/model_specs/irodori_tts.json b/model_specs/irodori_tts.json index 4da584fe6..ccebb6390 100644 --- a/model_specs/irodori_tts.json +++ b/model_specs/irodori_tts.json @@ -74,6 +74,8 @@ "type": "enum", "description": "Text chunking mode; default endline.", "values": [ + "default", + "tag_aware", "japanese", "endline" ], diff --git a/model_specs/midashenglm_gen.json b/model_specs/midashenglm_gen.json index 5704bf86f..0f92dbec0 100644 --- a/model_specs/midashenglm_gen.json +++ b/model_specs/midashenglm_gen.json @@ -67,9 +67,9 @@ { "name": "seed", "type": "int", - "description": "Generation seed; -1 selects a random seed.", + "description": "Generation seed; parsed as an unsigned 32-bit value, so negative seeds are rejected.", "required": false, - "min": -1, + "min": 0, "max": 2147483647, "default": 0 }