Fix cover/remaster/extend failing with HTTP 422 (null params.title)#6
Open
leftjeff wants to merge 1 commit into
Open
Fix cover/remaster/extend failing with HTTP 422 (null params.title)#6leftjeff wants to merge 1 commit into
leftjeff wants to merge 1 commit into
Conversation
Suno's /api/generate/v2-web/ now rejects requests whose `params.title`
is null with:
HTTP 422 Unprocessable Entity
{"detail":"[{'type':'string_type','loc':['body','params','title'],
'msg':'Input should be a valid string'}]"}
cover(), remaster() and extend all built a GenerateRequest without ever
setting `title`, so it serialized as null and every one of those commands
failed.
Fix: always send a string title. Resolution order (new shared
SunoClient::resolve_title helper):
1. explicit --title flag (added to cover/remaster/extend)
2. the source clip's own title (matches the web app's behaviour)
3. a generic fallback ("Cover"/"Remaster"/"Extend")
Verified end-to-end: `suno cover <clip> --tags "..."` now generates and
downloads instead of returning schema_drift.
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Problem
Suno's
/api/generate/v2-web/endpoint now requiresparams.titleto be a non-null string.cover,remaster, andextendall build aGenerateRequestwithout ever settingtitle, so it serializes asnulland every one of those commands fails:The CLI surfaces this as
schema_drift.generate(custom/inspiration) is unaffected because it already sets a title from--title.Fix
Always send a string title. Added a shared
SunoClient::resolve_titlehelper with this resolution order:--titleflag (newly added tocover,remaster, andextend)get_clips, matching what the web app does when you cover/remaster"Cover"/"Remaster"/"Extend")No behavior change for callers who don't care about the title; covers now inherit the original's title by default.
Verification
Previously returned
schema_drift; now generates and downloads normally. Builds clean oncargo build --release.🤖 Generated with Claude Code