feat: music generation capability over suno-api compatible gateways - #14
Open
amos-aios wants to merge 1 commit into
Open
feat: music generation capability over suno-api compatible gateways#14amos-aios wants to merge 1 commit into
amos-aios wants to merge 1 commit into
Conversation
Capability::MusicGen + ProviderKind::CloudMusicGen. The backend speaks the gcui-art/suno-api contract (the community de-facto standard): POST /api/generate (standard) or /api/custom_generate (lyrics/style/ title switch to Custom Mode) → poll GET /api/get?ids= until a clip streams → download the mp3 into a managed artifact, carrying the clip's title/tags as the response label. Auth is the Suno session cookie in the Cookie header; gateways holding their own SUNO_COOKIE work with no key here. 6 tests: body/clip-state mapping, capability+model guards, and two live mock-gateway lifecycles (poll progression, cookie attached, download-to-artifact with title·tags). 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.
What
Adds a
music_gencapability over any gcui-art/suno-api compatible gateway — the community de-facto standard contract for Suno (deploy to Vercel/Docker or self-host).Capability::MusicGen(music_gen, aliasesmusic/ttm/singing)ProviderKind::CloudMusicGen(kind = "cloud_music_gen"): submit → poll clips → download, mirroringCloudVideoGenProvider's task shape:POST /api/generate(standard) orPOST /api/custom_generatewhenlyrics/style/titleparams are set (Custom Mode; style rides under bothtagsandstyle)GET /api/get?ids=polled until a clipstreamings (5s default,poll_interval_secsoverride, 120-poll backstop);completeaccepted as a synonym; unknown statuses keep pollingaudio_urldownloads into a managedmofa_music_*.mp3artifact; the clip'stitle · tagsride back as the responsetextlabelCookieheader (api_key, env fallbackSUNO_COOKIE); gateways holding their own cookie work keyless here — availability staysConfiguredand invoke surfaces any auth error honestly.config.example.tomldocuments the setup.Testing
6 tests in
cloud_music_gen: submit-body mapping (standard vs Custom vs instrumental), clip-state mapping (pending/ready/failed, finished-without-URL is a failure not a hang), capability/model guards, and two live mock-gateway lifecycles — poll progression with cookie auth asserted, and a full run downloading real mp3 bytes into an artifact with thetitle · tagslabel. Full engine workspace suite green.🤖 Generated with Claude Code