fix(gmicloud): alias prompt to text/lyrics for GMI audio models - #265
Open
jeronimodeleon wants to merge 1 commit into
Open
fix(gmicloud): alias prompt to text/lyrics for GMI audio models#265jeronimodeleon wants to merge 1 commit into
jeronimodeleon wants to merge 1 commit into
Conversation
GMI Cloud's TTS endpoint requires a `text` payload field and its music endpoint requires `lyrics`, but the SDK's param allowlist only ever carried `prompt` for those families, so every audio submit 400'd with "Required parameter is missing" before reaching GMI. Alias `prompt` to `text`/`lyrics` per family so audio steps take the same `prompt=` every other modality already uses, and add it to the allowlist so it isn't stripped. Voice-clone (`gmi-audio-clone`) is untouched -- its own family surface, and out of the reproduced scope in #251.
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.
Summary
Every GMI Cloud audio model (TTS and music) via
genblaze-gmicloud'sGMICloudAudioProviderwas unreachable — every request 400'd with "Required parameter is missing" because the SDK's own param allowlist stripped the API's requiredtext(TTS) /lyrics(music) fields before the request went out, and there was no alias from the canonicalpromptparam (the one every other modality uses) onto them.Changes
libs/connectors/gmicloud/genblaze_gmicloud/models/audio.py: added a_TTSParamSurface(_AUDIO_BASE.with_aliases(prompt="text")) used by thegmi-audio-ttsfamily, and chained.with_aliases(prompt="lyrics")onto_MUSICfor thegmi-audio-musicfamily.with_aliases()auto-adds the alias target to the allowlist, sotext/lyricsare no longer stripped. Updated the module docstring to match.libs/connectors/gmicloud/tests/test_catalog_decoupling.py: registry-level regression tests confirmingtext/lyricsare allow-listed and aliased frompromptfor the TTS/music families.libs/connectors/gmicloud/tests/test_gmicloud_audio_provider.py: end-to-end regression tests confirmingprompt=reachesprepare_payload()and the outgoing HTTP body astext(TTS) /lyrics(music), withpromptitself absent from the final payload.docs/reference/model-matrix.md: updated the affected rows' "Allowed params" column (this file is generator-owned bytools/gen_model_matrix.py; hand-patched here to match exactly what the generator would emit, since this sandbox lacks the API-key env vars the generator needs to enumerate every connector without wiping unrelated sections).CHANGELOG.md:[Unreleased]entry under### genblaze-gmicloud.Deliberately out of scope: the
gmi-audio-clone(MiniMax Voice-Clone) family was left untouched. The issue's own root-cause analysis and suggested fix are scoped togmi-audio-tts/gmi-audio-musiconly (its title literally says "the TTS/music param allowlists"); voice-clone was mentioned in the issue's affected-models table without a reproduced failure. Rather than guess at an unconfirmed payload contract, I filed a scoped follow-up: #257.Test plan
make testpasses (verified this session — full suite, 19 packages, 0 failures)make lintpasses for the touched connector (ruff check/ruff format --check libs/connectors/gmicloud/)make typecheck— not run this session (scoped tolibs/core, unaffected by this change; connector typecheck is optional per the release-check gate)New regression tests (
test_catalog_decoupling.py,test_gmicloud_audio_provider.py) were confirmed to fail against the pre-fix code (KeyError: 'text'/'lyrics') and pass after the fix, per TDD.This PR went through a triangulated 3-lens review (correctness/tests, security/invariants, architecture/DRY) against the committed diff before push:
gmi-audio-clonemay share the same defect but wasn't in the issue's confirmed reproduction; resolved by filing Confirm whether gmi-audio-clone (MiniMax Voice-Clone) also needs a prompt->text alias #257 rather than shipping an unverified alias.model_registry.py, and the same clone-family scoping note) — not regressions from this diff.ParamSurface.with_aliases()per-family composition here matches the existingvideo.pyconvention (e.g._VIDEO_BASE/_PIXVERSE), adds zero per-request overhead, and is appropriately minimal.Related
Refs #251 (intentionally not using a closing keyword — see the "Deliberately out of scope" note above; leaving the issue's closure to a maintainer's judgment call given the voice-clone open question)
Refs #257 (follow-up: confirm whether
gmi-audio-cloneneeds the same aliasing)