Skip to content

[Partner Nodes] fix(api-nodes): always require "duration" to be specified for the SoniloTextToMusic node#14484

Merged
alexisrolland merged 1 commit into
masterfrom
fix/api-nodes/Sonilo-TextToMusic
Jun 15, 2026
Merged

[Partner Nodes] fix(api-nodes): always require "duration" to be specified for the SoniloTextToMusic node#14484
alexisrolland merged 1 commit into
masterfrom
fix/api-nodes/Sonilo-TextToMusic

Conversation

@bigcat88

@bigcat88 bigcat88 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

They will change their API tomorrow and require this. (breaking change in their API)

API Node PR Checklist

Scope

  • Is API Node Change

Pricing & Billing

  • Need pricing update
  • No pricing update

If Need pricing update:

  • Metronome rate cards updated
  • Auto‑billing tests updated and passing

QA

  • QA done
  • QA not required

Comms

  • Informed Kosinkadink

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b108ebe7-ba36-4708-bad0-a721fa07a735

📥 Commits

Reviewing files that changed from the base of the PR and between 6f6fec6 and cced2fc.

📒 Files selected for processing (1)
  • comfy_api_nodes/nodes_sonilo.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • comfy_api_nodes/nodes_sonilo.py

📝 Walkthrough

Walkthrough

In SoniloTextToMusic, the duration input schema is updated: the default value changes from 0 to 30, the minimum is raised from 0 to 1, and the tooltip is revised to remove mention of the "set to 0 to infer duration" behavior. In execute, the method signature's duration default parameter changes from 0 to 1, prompt validation is extended with max_length=1000, and the conditional that previously omitted duration from the multipart form payload when its value was 0 is removed; duration is now always included in the request sent to the Sonilo /proxy/sonilo/t2m/generate endpoint.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: making 'duration' always required for the SoniloTextToMusic node, which aligns with the API update mentioned in the PR objectives.
Description check ✅ Passed The description relates to the changeset by explaining that Sonilo's API is changing to require the duration parameter, providing context for why the change is necessary.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
comfy_api_nodes/nodes_sonilo.py (1)

103-105: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Schema description still documents the old “duration = 0 infers length” behavior.

The node description now conflicts with the new required-duration semantics (min=1, always sent), which will mislead users.

Suggested fix
             description="Generate music from a text prompt using Sonilo's AI model. "
-            "Leave duration at 0 to let the model infer it from the prompt.",
+            "Specify the target duration in seconds (1-360).",

Also applies to: 114-117

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@comfy_api_nodes/nodes_sonilo.py` around lines 103 - 105, The schema
description in the Sonilo node still documents the outdated behavior where
duration could be set to 0 to let the model infer it. Update the description
text that states "Leave duration at 0 to let the model infer it from the prompt"
to reflect the new required-duration semantics where duration must be at least 1
and is always sent to the model. This description update needs to be made
wherever it appears in the node definition (including the main description and
any other related description fields) to ensure users understand the current
behavior correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@comfy_api_nodes/nodes_sonilo.py`:
- Around line 152-158: The execute method has a duration parameter that defaults
to 0, but the schema now enforces a minimum value of 1, causing a contract
violation when callers omit the duration argument. Change the default value of
the duration parameter from 0 to 1 (or the appropriate minimum required value)
in the execute method signature to ensure all callers (including non-UI and
legacy ones) comply with the schema requirements.

---

Outside diff comments:
In `@comfy_api_nodes/nodes_sonilo.py`:
- Around line 103-105: The schema description in the Sonilo node still documents
the outdated behavior where duration could be set to 0 to let the model infer
it. Update the description text that states "Leave duration at 0 to let the
model infer it from the prompt" to reflect the new required-duration semantics
where duration must be at least 1 and is always sent to the model. This
description update needs to be made wherever it appears in the node definition
(including the main description and any other related description fields) to
ensure users understand the current behavior correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: de34b512-b407-4c40-aece-f220932ed343

📥 Commits

Reviewing files that changed from the base of the PR and between 83a3f03 and 6f6fec6.

📒 Files selected for processing (1)
  • comfy_api_nodes/nodes_sonilo.py

Comment thread comfy_api_nodes/nodes_sonilo.py Outdated
…be specified

Signed-off-by: bigcat88 <bigcat88@icloud.com>
@bigcat88 bigcat88 force-pushed the fix/api-nodes/Sonilo-TextToMusic branch from 6f6fec6 to cced2fc Compare June 15, 2026 16:12
@alexisrolland alexisrolland merged commit 2f4c4e9 into master Jun 15, 2026
15 checks passed
@bigcat88 bigcat88 deleted the fix/api-nodes/Sonilo-TextToMusic branch June 15, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants