fix(nodejs-client): default omitted workflow run inputs to empty objects

Open
#47,213 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@fanjiahe is already working on this.

Since Nov 25, 2026.

  • #47214 by @fanjiahe — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

Start in sdks/nodejs-client/src/client/workflow.ts, in run() and runById(), and look at how the object-form payload is forwarded. Compare with the fix in #45122 for chat and completion, which defaults omitted inputs to {}. Done when an omitted inputs is sent as {} for both methods. Pull request #47214 is already open against this, so check it before starting.

Written by the indexing model from the issue text.

Description

Bug

run() and runById() in sdks/nodejs-client/src/client/workflow.ts send the request without inputs when the caller omits it, but the server requires WorkflowRunPayload.inputs. The call fails server-side validation.

Reproduce

Call client.workflow.run(...) / runById(...) with an object-form payload that omits inputs.

Expected

Omitted inputs defaults to {} like the other optional fields.

Actual

The request is sent without inputs and rejected.

Note

Same pattern as #45122, which fixed this for chat and completion — the workflow path was missed.

Dominant language
Python
Stars
162k
Forks
25.6k
Avg merge
15h 9m
Merged PRs (30d)
606

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from langgenius/dify

All issues in langgenius/dify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.