OpenBMB/ChatDev · error · ValueError

Node {node.id} is not a literal node

Error message

Node {node.id} is not a literal node

What it means

LiteralNodeExecutor.execute asserts node.node_type == 'literal'; receiving any other node indicates incorrect executor-to-node routing or a malformed node object.

Source

Thrown at runtime/node/executor/literal_executor.py:16

"""Literal node executor."""

from typing import List

from entity.configs import Node
from entity.configs.node.literal import LiteralNodeConfig
from entity.messages import Message
from runtime.node.executor.base import NodeExecutor


class LiteralNodeExecutor(NodeExecutor):
    """Emit the configured literal message whenever triggered."""

    def execute(self, node: Node, inputs: List[Message]) -> List[Message]:
        if node.node_type != "literal":
            raise ValueError(f"Node {node.id} is not a literal node")

        config = node.as_config(LiteralNodeConfig)
        if config is None:
            raise ValueError(f"Node {node.id} missing literal configuration")

        self._ensure_not_cancelled()
        return [self._build_message(
            role=config.role,
            content=config.content,
            source=node.id,
            preserve_role=True,
        )]

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Ensure node_type is 'literal' for nodes handled by this executor
  2. Use create_executor instead of instantiating executors directly
  3. Fix corrupted workflow definitions

Example fix

# before
node.node_type = 'text'

# after
node.node_type = 'literal'
Defensive patterns

Strategy: type-guard

Validate before calling

assert node.node_type == 'literal'

Type guard

def is_literal_node(node) -> bool:
    return node.node_type == 'literal'

Prevention

When it happens

Trigger: Directly invoking LiteralNodeExecutor with a non-literal node, or executor factory misconfiguration.

Common situations: Unit tests constructing nodes without the right type; workflow files edited by hand corrupting node_type; refactors of type routing.

Related errors


AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27). Data as JSON: /api/errors/bd8c3bf9d12ba426. Report an issue: GitHub.