iflytek/astron-agent · error · CustomException
WORKFLOW_EXECUTION_ERROR
WORKFLOW_EXECUTION_ERROR
Error message
Flow output mode not configured for flow_id: {self.flowId} What it means
WORKFLOW_EXECUTION_ERROR from flow_node.req_flow_api_with_see: before invoking a sub-flow via API, the node reads FlowOutputMode from the variable pool's system params; if it is None the node cannot know how the sub-flow returns its output and aborts. It means the flow's output-mode parameter was never set in the execution context for this flow_id.
Solutions
- Open the flow configuration and explicitly set its output mode (e.g. streaming vs. message-collection) and re-publish.
- If invoking programmatically, set variable_pool.system_params[ParamKey.FlowOutputMode] before calling the flow node.
- Update old flow definitions by re-saving them so the output-mode field gets a default.
- Add validation at flow publish time to reject flows missing output mode, turning this into an earlier schema error.
Example fix
# before: invoking flow without output mode await flow_node.async_execute(variable_pool) # after: ensure the param exists from engine.params import ParamKey variable_pool.system_params[ParamKey.FlowOutputMode] = FlowOutputMode.MESSAGE_COLLECTION await flow_node.async_execute(variable_pool)
Defensive patterns
Strategy: validation
Validate before calling
output_mode = variable_pool.system_params.get(ParamKey.FlowOutputMode, node_id=flow_node.node_id)
if output_mode is None:
raise ValueError("FlowOutputMode must be set before invoking a flow node") Try / catch
try:
output = await flow_node.async_execute(...)
except CustomException as e:
if "Flow output mode not configured" in str(e.cause_error):
logger.error("set the flow's output mode in config and re-publish") Prevention
- Always configure output mode when creating/publishing a flow
- Set FlowOutputMode explicitly in programmatic/test invocations of flow nodes
- Add publish-time schema validation requiring the output-mode field
When it happens
Trigger: Calling a sub-flow node when the parent execution did not populate ParamKey.FlowOutputMode in variable_pool.system_params — e.g. direct/debug invocation of the flow, a missing default when the flow was published without output-mode configuration, or programmatic invocation that skipped parameter injection.
Common situations: API/debug runs that bypass the normal publish pipeline; older flow definitions created before the output-mode setting existed; manual construction of system_params in tests or scripts omitting the key.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/93290839539871a9.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/nodes/flow/flow_node.py:199
This method establishes a streaming connection to the target workflow
and processes the response in real-time, handling different output modes
and streaming content to dependent nodes when necessary.
:param url: SSE endpoint URL for the workflow API
:param inputs: Input parameters for the target workflow
:param variable_pool: Variable pool for workflow context
:param span: Tracing span for observability
:param msg_or_end_node_deps: Message dependencies for streaming output
:param event_log_node_trace: Optional node trace logging
:return: Tuple containing (outputs_dict, token_usage_dict)
:raises CustomException: When workflow execution fails or times out
"""
# Get the output mode configuration for the flow
output_mode = variable_pool.system_params.get(
ParamKey.FlowOutputMode, node_id=self.node_id
)
if output_mode is None:
raise CustomException(
err_code=CodeEnum.WORKFLOW_EXECUTION_ERROR,
cause_error=f"Flow output mode not configured for flow_id: {self.flowId}",
)
# Assemble request headers and body
headers, req_body = await self._assemble_request(
url, inputs, variable_pool, span, event_log_node_trace
)
# Initialize response containers
outputs = {}
token_usage = {}
try:
# Initialize content accumulators for streaming response
result_content = ""
result_reasoning_content = ""
View on GitHub (pinned to 5e758547a8)