From 56bc3d6059fcf9712e22ecbcf58c3bc0f85ac1c3 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 2 Feb 2026 08:43:10 -0600 Subject: [PATCH] fix: Move music vibe from tags to prompt for Sonauto API Sonauto only accepts specific predefined tags. The custom frontend music vibes (Hip-Hop, Boy Band, etc.) were being rejected with 422. Now using fixed tags ["love song", "valentine"] and including the music vibe in the prompt text instead. Co-Authored-By: Claude Opus 4.5 --- backend/tasks/workers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/tasks/workers.py b/backend/tasks/workers.py index 377b63c..9cae323 100644 --- a/backend/tasks/workers.py +++ b/backend/tasks/workers.py @@ -227,11 +227,12 @@ def send_to_sonauto(self, session_id: str): return {"error": "not_found"} payload = { - "tags": [submission.music_vibe], + "tags": ["love song", "valentine"], "prompt": ( - f"Create a heartfelt Valentine's Day love song celebrating the special bond " - f"between {submission.owner_name} and their beloved {submission.pet_type} " - f"{submission.pet_name}. Make it warm, genuine, and mention both names in the lyrics." + f"Create a heartfelt Valentine's Day love song in a {submission.music_vibe} style " + f"celebrating the special bond between {submission.owner_name} and their beloved " + f"{submission.pet_type} {submission.pet_name}. Make it warm, genuine, and mention " + f"both names in the lyrics." ), "instrumental": False, "output_format": "mp3",