[Partner Nodes] fix(api-nodes): always require "duration" to be specified for the SoniloTextToMusic node#14484
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughIn 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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 winSchema 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
📒 Files selected for processing (1)
comfy_api_nodes/nodes_sonilo.py
…be specified Signed-off-by: bigcat88 <bigcat88@icloud.com>
6f6fec6 to
cced2fc
Compare
They will change their API tomorrow and require this. (breaking change in their API)
API Node PR Checklist
Scope
Pricing & Billing
If Need pricing update:
QA
Comms