model_specs: fix declarations that accept or reject the wrong requests - #405
Closed
CryptVenture wants to merge 1 commit into
Closed
model_specs: fix declarations that accept or reject the wrong requests#405CryptVenture wants to merge 1 commit into
CryptVenture wants to merge 1 commit into
Conversation
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.
CryptVenture
force-pushed
the
pr/spec-contract-fixes
branch
from
September 3, 2026 00:26
ddd693b to
c9dc492
Compare
Contributor
Author
|
Closing for now to stay inside the 3-concurrent-PR policy (see the discussion on #422). Nothing is wrong with the change and CI is green on it; I will reopen it as review slots free. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #372 as requested. This PR holds only the changes that alter which requests validate; the description-only fixes, the VoxCPM1 defaults, the ASR/aligner/codec declarations and the MiniMax declarations are separate PRs.
Each change is listed with the exact parser that reads the option.
The changes
midashenglm_gen.seed:min-1 → 0.src/models/midashenglm_gen/session.cpp:176reads the seed throughruntime::parse_u32_option, andparse_u32_value(src/framework/runtime/options.cpp:36-39) throws"seed must be an unsigned integer"on any leading minus. A spec-legal-1was therefore a guaranteed runtime error, and the "-1 selects a random seed" description promised behaviour that could not happen.heartmula.lyrics,heartmula.tags:requiredfalse → true.src/models/heartmula/session.cppthrows"HeartMuLa requires non-empty tags"and"HeartMuLa requires non-empty lyrics". The engine already rejected what the spec described as valid, so a client could not learn the constraint until the request failed.irodori_tts.text_chunk_mode:defaultandtag_awareadded to the enum. The session takes the shared override (src/models/irodori_tts/session.cpp:453-454→text::parse_text_chunk_mode_override), andsrc/framework/text/chunking.cpp:572-586acceptsdefault,word_budget,tag_aware,japanese,endline. Two working modes were undeclared and so unreachable from a spec-driven client.granite5asr.language: removed. The session never reads a language option — it hard-codes"en"(src/community_models/granite5asr/session.cpp:137, 174, 252, 270, 277). The declaration invited a value that could not have an effect.firered_audiosession optionhelper_graph_arena_mb: removed. The only key that exists isfireredtts3.helper_graph_arena_mb(src/models/fireredtts3/session.cpp:251). FireRedAudio validates session options strictly, so sending the declared name failed the request outright.Validation
Verified by reading the parser that consumes each option, with the file and line above. None of these five families has a package installed on this machine, so they were not exercised end to end; the sibling ASR PR carries a live request check for the one family that is installed here.
Scope
Five spec files, 6 insertions / 19 deletions. The generated WebUI bundle is deliberately excluded:
catalog.tsinlinesmodel_specs/*.jsonat frontend build time and the bundle is not byte-reproducible, so regenerating it in every PR of this split would make the PRs conflict with each other. Happy to send one bundle-regeneration PR once the series lands.