Workflow API call, in streaming mode, expects the presence of event_data["data"]["execution_metadata"] in the message with event 'workflow_finished' #1637

Closed
opened 2026-02-21 17:36:05 -05:00 by yindo · 0 comments
Owner

Originally created by @chuanzhubin-aiopx on GitHub (Mar 28, 2024).

Originally assigned to: @takatost on GitHub.

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.0-preview-workflow.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

            elif event_data.get("event") == "workflow_finished":
                # status (string) 执行状态 running / succeeded / failed / stopped
                if event_data["data"]["status"] == "succeeded":
                    print(">|", end='\n')
                    print(event_data["data"]["outputs"]['text'])
                    print(event_data["data"]["execution_metadata"])

Expected execution_metadata present, but not found

✔️ Expected Behavior

Workflow API call, in streaming mode, expects the presence of event_data["data"]["execution_metadata"] in the message with event 'workflow_finished'

execution_metadata (json) 元数据
total_tokens (int) optional 总使用 tokens
total_price (decimal) optional 总费用
currency (string) optional 货币,如 USD / RMB

Actual Behavior

Field missing

Originally created by @chuanzhubin-aiopx on GitHub (Mar 28, 2024). Originally assigned to: @takatost on GitHub. ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.6.0-preview-workflow.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ```python elif event_data.get("event") == "workflow_finished": # status (string) 执行状态 running / succeeded / failed / stopped if event_data["data"]["status"] == "succeeded": print(">|", end='\n') print(event_data["data"]["outputs"]['text']) print(event_data["data"]["execution_metadata"]) ``` Expected execution_metadata present, but not found ### ✔️ Expected Behavior Workflow API call, in streaming mode, expects the presence of `event_data["data"]["execution_metadata"]` in the message with event 'workflow_finished' >execution_metadata (json) 元数据 >total_tokens (int) optional 总使用 tokens >total_price (decimal) optional 总费用 >currency (string) optional 货币,如 USD / RMB ### ❌ Actual Behavior Field missing
yindo added the 🐞 bug label 2026-02-21 17:36:05 -05:00
yindo closed this issue 2026-02-21 17:36:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1637