Skip to content

sub_recipe task should escape command parameter for correct yaml syntax. #3802

@towry

Description

@towry

Describe the bug

I am trying the recipe workflow.

  • main.yaml: the main recipe that has two sub recipe.
  • news.yaml: sub recipe for fetching news with perplexity api.
  • analyze.yaml: sub recipe to analyze the news.

The steps is:

  1. Call the fetch_news sub-recipe tool to get raw news data
  2. Pass the raw news data to the analyze sub-recipe tool
  3. Collect the prediction results from the analysis

The workflow fails at 2, when pass the raw news data to the analyze sub recipe tool, with error Unsupported format, see source code.

The reason I believe is because the raw data is markdown format, and the sub task request payload is yaml format, so the request is like this:

─── execute_task | sub_recipe ──────────────────────────
tasks:
    -
        id: 81c4f578-c642-43b5-af51-5deab1ecb319
        payload:
            sub_recipe:
                command_parameters:
                    raw_data: string with markdown format
                name: analyze
                recipe_path: recipes/analyze.yaml
        task_type: sub_recipe

Since the value of raw_data is markdown string, causing this payload become invalid yaml.

To Reproduce

  • Create 3 recipe file, the main recipe should instruct the correct workflow as described above.
  • news sub recipe should be instructed to output markdown content.
  • anaylze recipe should be able to recieve the raw_data parameter.

Expected behavior
The pipeline workflow should work.

Screenshots
If applicable, add screenshots to help explain your problem.

Please provide following information:

  • OS & Arch: macos 15.3.1
  • Interface: cli
  • Version: v1.0.4
  • Extensions enabled: developer
  • Provider & Model: z-ai/glm-4.5

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions