Skip to content

feat: Add RemoteComboOptions for rich remote-populated combo inputs#13432

Open
bigcat88 wants to merge 1 commit intomasterfrom
dev/Combo-RemoteOptions
Open

feat: Add RemoteComboOptions for rich remote-populated combo inputs#13432
bigcat88 wants to merge 1 commit intomasterfrom
dev/Combo-RemoteOptions

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 commented Apr 16, 2026

Adds a new way to populate combo inputs from a remote endpoint with image/video/audio previews, per-field search, and progressive pagination. Aimed at API nodes where the set of choices is dynamic and too large to hardcode, like ElevenLabs voice libraries (11K+ community voices with audio samples), Kling element libraries, or user-trained profile lists.

The existing remote=RemoteOptions(...) path only gives you a flat list of strings in a standard dropdown; the new remote_combo=RemoteComboOptions(...) adds the rich widget on top.

The surface is two new classes in comfy_api/latest/_io.py:

  • RemoteItemSchema describes how to map each raw API response object to a dropdown item. All fields use dot-path notation (labels.gender, task_result.elements.0.name). label_field and description_field additionally accept template strings with {field} placeholders, so you can build composite labels without a helper endpoint.
  • RemoteComboOptions is the widget spec you hand to Combo.Input(remote_combo=...). It takes a route, the item_schema, and optional knobs: page_size for progressive pagination, refresh for client-side cache TTL, use_comfy_api to route through the comfy-api proxy with auth, auto_select for fallback selection, response_key for responses that wrap the array under a key, and timeout / max_retries for network tuning.

Two response shapes are supported. Without page_size, the endpoint returns an array, or an array at response_key. With page_size, it returns {"items": [...], "has_more": bool} and the frontend fetches page by page as GET <route>?page=N&page_size=M, starting at page 0. Endpoints that use cursor tokens, 1-based pages, or limit/offset need a small shim.

When use_comfy_api=True, the frontend prepends the configured comfy-api base URL to route and injects auth headers. When it's False, the route is used as-is with no auth.


PR to Frontend repo: Comfy-Org/ComfyUI_frontend#11310
Temporary PR with new API Nodes to test current PR: #13433

Signed-off-by: bigcat88 <bigcat88@icloud.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

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: 04419e5d-7c19-49de-a085-cc367811efe2

📥 Commits

Reviewing files that changed from the base of the PR and between e9a2d1e and fdf9290.

📒 Files selected for processing (3)
  • comfy_api/latest/_io.py
  • execution.py
  • tests-unit/comfy_api_test/remote_combo_options_test.py

📝 Walkthrough

Walkthrough

This pull request introduces structured configuration support for remote combo widgets. Two new classes—RemoteItemSchema and RemoteComboOptions—define how remote API objects map to dropdown items and configure remote combo behavior, including preview rendering, search indexing, pagination, and auto-selection. The Combo.Input class is extended with a remote_combo parameter, accompanied by validation to prevent conflicts with existing remote and options parameters. The validation layer in execution.py is updated to skip membership checks for remote-populated combos. Comprehensive unit tests verify validation rules and serialization behaviors.

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding RemoteComboOptions for rich remote-populated combo inputs.
Description check ✅ Passed The description clearly relates to the changeset, explaining the purpose, functionality, and use cases for RemoteComboOptions.

✏️ 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.

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.

1 participant