iflytek/astron-agent · error · CustomException
KNOWLEDGE_PARAM_ERROR
KNOWLEDGE_PARAM_ERROR
Error message
docIds is empty
What it means
The knowledge-pro node requires a non-empty docIds list when repoType is CBG_RAG, because CBG RAG operates over an explicit set of documents. _check_cbg_rag_param raises a CustomException with KNOWLEDGE_PARAM_ERROR if docIds is an empty list for that repo type.
Solutions
- Provide at least one document ID in the node's docIds field
- If repoType shouldn't be CBG_RAG, switch repoType to a type that doesn't require docIds (e.g. a knowledge-base-scoped type)
- Verify the upstream variable feeding docIds actually resolves to a non-empty list at runtime
Example fix
// before
{"repoType": "cbg_rag", "docIds": []}
// after
{"repoType": "cbg_rag", "docIds": ["doc-123", "doc-456"]} Defensive patterns
Strategy: validation
Validate before calling
if node_config["repoType"] == "cbg_rag" and not node_config.get("docIds"):
raise ValueError("docIds is required when repoType is cbg_rag") Try / catch
try:
result = await node.async_execute(variable_pool, span)
except CustomException as e:
if e.err_code == CodeEnum.KNOWLEDGE_PARAM_ERROR:
# surface a user-facing config fix in the editor
... Prevention
- Make docIds required in the node form UI when CBG_RAG is selected
- Check that docIds come from a non-empty upstream variable before running
- Add workflow pre-run validation for repo/doc configuration
When it happens
Trigger: Configuring a knowledge-pro node with repoType == 'cbg_rag' (RepoTypeEnum.CBG_RAG.value) while the docIds field is [] and calling execute.
Common situations: User picked the CBG RAG repository type in the workflow editor but never selected any documents; document IDs were bound to an upstream variable that resolved to empty; a template/JSON import omitted docIds.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- mcpServerId and mcpServerUrl cannot both be empty
- toolName cannot be empty
- WORKFLOW_VERSION_PUBLISH_FAILED
- 8008
- 8008
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/606542bf3c331652.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/nodes/knowledge_pro/knowledge_pro_node.py:95
def run_f(self) -> WorkflowNodeExecutionStatus:
"""
Get the failure execution status.
:return: FAILED status for failed execution
"""
return WorkflowNodeExecutionStatus.FAILED
async def _check_cbg_rag_param(self) -> None:
"""
Validate CBG RAG parameters.
Ensures that docIds is not empty when using CBG_RAG repository type,
as document IDs are required for CBG RAG operations.
:raises CustomException: If docIds is empty for CBG_RAG repository type
"""
if self.repoType == RepoTypeEnum.CBG_RAG.value and self.docIds == []:
raise CustomException(
err_code=CodeEnum.KNOWLEDGE_PARAM_ERROR, err_msg="docIds is empty"
)
async def execute(
self, variable_pool: VariablePool, span: Span, **kwargs: Any
) -> NodeRunResult:
"""
Execute the Knowledge Pro node operation.
Performs RAG operations by querying knowledge repositories and generating
responses using the configured LLM provider. Supports streaming responses
and handles various error conditions.
:param variable_pool: Pool of variables for the workflow execution
:param span: Tracing span for observability
:param kwargs: Additional keyword arguments including msg_or_end_node_deps
:return: NodeRunResult containing execution status and outputs
"""View on GitHub (pinned to 5e758547a8)