Require full reasoning params when adding nodes#407
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d3572a488
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| missing_reasoning_fields.append(field) | ||
| elif isinstance(value, str) and not value.strip(): | ||
| missing_reasoning_fields.append(field) | ||
| elif isinstance(value, (list, dict)) and not value: | ||
| missing_reasoning_fields.append(field) |
There was a problem hiding this comment.
Allow empty context/toolset for reasoning nodes
The new validation treats any empty list/dict/blank string as “missing” for all required reasoning fields, so toolset: [] or context: {} now causes add_reasoning_node to reject nodes that intentionally have no tools or no context. This is a regression because the executor already tolerates toolset being empty (it resolves to no tools) and can build prompts without context; workflows that previously created tool-free or context-free reasoning nodes will now fail validation even though they still execute correctly.
Useful? React with 👍 / 👎.
Motivation
Description
velvetflow/planner/params_tools.pyto marksystem_prompt,task_prompt,context,expected_output_format, andtoolsetas required in_reasoning_params_schema.add_reasoning_nodeinvelvetflow/planner/structure.pyto detect empty or missing reasoning fields and return a structured validation error listingmissing_fields,required_fields, andrequired_out_params_schema(which must matchexpected_output_format).out_params_schemamust align withexpected_output_format.Testing
Codex Task