openclaw - ✅(Solved) Fix Comfy plugin: models.providers.comfy schema rejects image/video/music workflow config keys [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62158Fetched 2026-04-08 03:08:17
View on GitHub
Comments
2
Participants
3
Timeline
2
Reactions
0
Timeline (top)
commented ×2

The bundled comfy plugin (new in 2026.4.5) expects workflow configuration at models.providers.comfy.<capability> (e.g., models.providers.comfy.image.workflowPath), but the config schema for models.providers enforces the standard LLM provider shape — requiring models[] array and api from a fixed enum. Plugin-specific keys like image, video, and music are rejected as unrecognized.

Error Message

  1. Placing config under plugins.entries.comfy.config.image passes validation but the plugin doesn't read from there — runtime error:

Root Cause

The bundled comfy plugin (new in 2026.4.5) expects workflow configuration at models.providers.comfy.<capability> (e.g., models.providers.comfy.image.workflowPath), but the config schema for models.providers enforces the standard LLM provider shape — requiring models[] array and api from a fixed enum. Plugin-specific keys like image, video, and music are rejected as unrecognized.

PR fix notes

PR #63058: fix(comfy): read config from plugins.entries instead of models.providers

Description (problem / solution / changelog)

Summary

  • Move comfy plugin config reads from models.providers.comfy to plugins.entries.comfy.config, the standard plugin config path
  • ModelProviderSchema uses .strict() and requires a models array, so any comfy-specific keys (mode, image, video, music) caused hard validation errors that blocked config loading entirely
  • Add resolveComfyApiKey helper that checks plugin config apiKey, then COMFY_API_KEY, then COMFY_CLOUD_API_KEY env vars, removing the dependency on core resolveProviderConfig (which only looks at models.providers)
  • Update all docs, error messages, and test fixtures to use the new config path

Closes #61915, #62158, #62388, #62567

Test plan

  • Verify plugins.entries.comfy.config.image with workflowPath and promptNodeId passes schema validation
  • Verify COMFY_API_KEY and COMFY_CLOUD_API_KEY env vars are picked up for cloud mode
  • Verify inline apiKey in plugin config works for cloud mode
  • Run pnpm test extensions/comfy/ to confirm all unit tests pass

🤖 Generated with Claude Code

Changed files

  • docs/help/testing.md (modified, +1/-1)
  • docs/providers/comfy.md (modified, +38/-32)
  • docs/tools/music-generation.md (modified, +1/-1)
  • extensions/comfy/image-generation-provider.test.ts (modified, +3/-3)
  • extensions/comfy/music-generation-provider.test.ts (modified, +10/-8)
  • extensions/comfy/video-generation-provider.test.ts (modified, +3/-3)
  • extensions/comfy/workflow-runtime.ts (modified, +35/-18)

Code Example

openclaw config set 'models.providers.comfy' \
  '{"baseUrl":"http://127.0.0.1:8188","image":{"workflowPath":"/path/to/workflow.json","promptNodeId":"4","promptInputName":"text","outputNodeId":"12"}}' \
  --strict-json

---

models.providers.comfy.models: Invalid input: expected array, received undefined
models.providers.comfy: Unrecognized key: "image"

---

[tools] image_generate failed: models.providers.comfy.<capability>.workflow or workflowPath is required
RAW_BUFFERClick to expand / collapse

Summary

The bundled comfy plugin (new in 2026.4.5) expects workflow configuration at models.providers.comfy.<capability> (e.g., models.providers.comfy.image.workflowPath), but the config schema for models.providers enforces the standard LLM provider shape — requiring models[] array and api from a fixed enum. Plugin-specific keys like image, video, and music are rejected as unrecognized.

Steps to Reproduce

  1. Install OpenClaw 2026.4.5 with a local ComfyUI instance
  2. Set COMFYUI_SERVER_ADDRESS=http://127.0.0.1:8188 — plugin loads, image_generate tool appears
  3. Attempt to configure the workflow:
openclaw config set 'models.providers.comfy' \
  '{"baseUrl":"http://127.0.0.1:8188","image":{"workflowPath":"/path/to/workflow.json","promptNodeId":"4","promptInputName":"text","outputNodeId":"12"}}' \
  --strict-json

Result:

models.providers.comfy.models: Invalid input: expected array, received undefined
models.providers.comfy: Unrecognized key: "image"
  1. Editing openclaw.json directly also fails — startup validator rejects the same keys.
  2. Placing config under plugins.entries.comfy.config.image passes validation but the plugin doesn't read from there — runtime error:
[tools] image_generate failed: models.providers.comfy.<capability>.workflow or workflowPath is required

Expected Behavior

The config schema should accept plugin-defined keys under models.providers.comfy, matching what the plugin reads at runtime.

Environment

  • OpenClaw 2026.4.5 (3e72c03), macOS arm64
  • ComfyUI local on port 8188, Flux Schnell workflow

extent analysis

TL;DR

Update the config schema for models.providers to accept plugin-specific keys under models.providers.comfy.

Guidance

  • Verify the current config schema for models.providers to identify the exact constraints causing the rejection of plugin-specific keys.
  • Consider updating the openclaw.json configuration file to use a temporary workaround, such as using a different key that is accepted by the current schema.
  • Investigate the possibility of adding a custom schema or validator for the comfy plugin to accommodate its specific configuration requirements.
  • Check the documentation for the comfy plugin and OpenClaw 2026.4.5 to see if there are any known issues or workarounds for this problem.

Example

No code snippet is provided as the issue is related to configuration and schema validation.

Notes

The provided information suggests that the issue is related to a mismatch between the expected configuration schema and the actual configuration required by the comfy plugin. The solution may involve updating the schema or using a custom validator.

Recommendation

Apply a workaround by updating the openclaw.json configuration file to use a different key that is accepted by the current schema, until the config schema for models.providers can be updated to accept plugin-specific keys.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING