{"record":{"id":"bd8c3bf9d12ba426","repo":"OpenBMB/ChatDev","slug":"node-node-id-is-not-a-literal-node","errorCode":null,"errorMessage":"Node {node.id} is not a literal node","messagePattern":"Node (.+?) is not a literal node","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"runtime/node/executor/literal_executor.py","lineNumber":16,"sourceCode":"\"\"\"Literal node executor.\"\"\"\n\nfrom typing import List\n\nfrom entity.configs import Node\nfrom entity.configs.node.literal import LiteralNodeConfig\nfrom entity.messages import Message\nfrom runtime.node.executor.base import NodeExecutor\n\n\nclass LiteralNodeExecutor(NodeExecutor):\n    \"\"\"Emit the configured literal message whenever triggered.\"\"\"\n\n    def execute(self, node: Node, inputs: List[Message]) -> List[Message]:\n        if node.node_type != \"literal\":\n            raise ValueError(f\"Node {node.id} is not a literal node\")\n\n        config = node.as_config(LiteralNodeConfig)\n        if config is None:\n            raise ValueError(f\"Node {node.id} missing literal configuration\")\n\n        self._ensure_not_cancelled()\n        return [self._build_message(\n            role=config.role,\n            content=config.content,\n            source=node.id,\n            preserve_role=True,\n        )]\n\n","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/runtime/node/executor/literal_executor.py#L1-L30","documentation":"LiteralNodeExecutor.execute asserts node.node_type == 'literal'; receiving any other node indicates incorrect executor-to-node routing or a malformed node object.","triggerScenarios":"Directly invoking LiteralNodeExecutor with a non-literal node, or executor factory misconfiguration.","commonSituations":"Unit tests constructing nodes without the right type; workflow files edited by hand corrupting node_type; refactors of type routing.","solutions":["Ensure node_type is 'literal' for nodes handled by this executor","Use create_executor instead of instantiating executors directly","Fix corrupted workflow definitions"],"exampleFix":"# before\nnode.node_type = 'text'\n\n# after\nnode.node_type = 'literal'","handlingStrategy":"type-guard","validationCode":"assert node.node_type == 'literal'","typeGuard":"def is_literal_node(node) -> bool:\n    return node.node_type == 'literal'","tryCatchPattern":null,"preventionTips":["Route executors through the factory"],"tags":["literal-node","validation","routing"],"backgroundTag":"node-type-mismatch","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}