Skip to content

feat: add node_replacements server feature flag#12362

Merged
Kosinkadink merged 1 commit intojk/node-replace-apifrom
jk/node-replace-feature-flag
Feb 10, 2026
Merged

feat: add node_replacements server feature flag#12362
Kosinkadink merged 1 commit intojk/node-replace-apifrom
jk/node-replace-feature-flag

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Feb 9, 2026

Summary

Adds "node_replacements": True to SERVER_FEATURE_FLAGS so the frontend can detect whether the backend supports the node replacement API before calling /api/node_replacements.

Changes

  • Added "node_replacements": True to SERVER_FEATURE_FLAGS in comfy_api/feature_flags.py

Context

The frontend uses api.serverSupportsFeature("node_replacements") to gate calls to the replacement endpoint. Without this flag the frontend would call an endpoint that may not exist on older backends.

Companion frontend PR: Comfy-Org/ComfyUI_frontend#8750

Copy link
Member

@Kosinkadink Kosinkadink left a comment

Choose a reason for hiding this comment

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

seems good, merging

@Kosinkadink Kosinkadink merged commit 8d0da49 into jk/node-replace-api Feb 10, 2026
6 checks passed
@Kosinkadink Kosinkadink deleted the jk/node-replace-feature-flag branch February 10, 2026 22:53
DrJKL added a commit to Comfy-Org/ComfyUI_frontend that referenced this pull request Feb 17, 2026
## Summary

Gates the node replacement store's `load()` call behind the
`node_replacements` server feature flag, so the frontend only calls
`/api/node_replacements` when the backend advertises support.

## Changes

- Added `NODE_REPLACEMENTS = 'node_replacements'` to `ServerFeatureFlag`
enum
- Added `nodeReplacementsEnabled` getter to `useFeatureFlags()`
- Added `api.serverSupportsFeature('node_replacements')` guard in
`useNodeReplacementStore.load()`

## Context

Without this guard, the frontend would attempt to fetch node
replacements from backends that don't support the endpoint, causing 404
errors.

Companion backend PR: Comfy-Org/ComfyUI#12362

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8750-feat-gate-node-replacement-loading-on-server-feature-flag-3026d73d365081ec9246d77ad88f5bdc)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Jin Yi <jin12cc@gmail.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: Claude <noreply@anthropic.com>
github-actions bot pushed a commit to Comfy-Org/ComfyUI_frontend that referenced this pull request Feb 17, 2026
## Summary

Gates the node replacement store's `load()` call behind the
`node_replacements` server feature flag, so the frontend only calls
`/api/node_replacements` when the backend advertises support.

## Changes

- Added `NODE_REPLACEMENTS = 'node_replacements'` to `ServerFeatureFlag`
enum
- Added `nodeReplacementsEnabled` getter to `useFeatureFlags()`
- Added `api.serverSupportsFeature('node_replacements')` guard in
`useNodeReplacementStore.load()`

## Context

Without this guard, the frontend would attempt to fetch node
replacements from backends that don't support the endpoint, causing 404
errors.

Companion backend PR: Comfy-Org/ComfyUI#12362

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8750-feat-gate-node-replacement-loading-on-server-feature-flag-3026d73d365081ec9246d77ad88f5bdc)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Jin Yi <jin12cc@gmail.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: Claude <noreply@anthropic.com>
github-actions bot pushed a commit to Comfy-Org/ComfyUI_frontend that referenced this pull request Feb 17, 2026
## Summary

Gates the node replacement store's `load()` call behind the
`node_replacements` server feature flag, so the frontend only calls
`/api/node_replacements` when the backend advertises support.

## Changes

- Added `NODE_REPLACEMENTS = 'node_replacements'` to `ServerFeatureFlag`
enum
- Added `nodeReplacementsEnabled` getter to `useFeatureFlags()`
- Added `api.serverSupportsFeature('node_replacements')` guard in
`useNodeReplacementStore.load()`

## Context

Without this guard, the frontend would attempt to fetch node
replacements from backends that don't support the endpoint, causing 404
errors.

Companion backend PR: Comfy-Org/ComfyUI#12362

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8750-feat-gate-node-replacement-loading-on-server-feature-flag-3026d73d365081ec9246d77ad88f5bdc)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Jin Yi <jin12cc@gmail.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants