OpenBMB/ChatDev · error · ValueError

Node {node.id} missing literal configuration

Error message

Node {node.id} missing literal configuration

What it means

The node is typed 'literal' but has no LiteralNodeConfig payload, so there is no role/content to emit.

Source

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

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. Add a LiteralNodeConfig with role and content to the node
  2. Validate the workflow graph before execution
  3. Regenerate workflows with the current builder APIs after version upgrades

Example fix

# before
Node(id='n1', node_type='literal')

# after
Node(id='n1', node_type='literal', config={'role': 'assistant', 'content': 'Done'})
Defensive patterns

Strategy: validation

Validate before calling

assert node.as_config(LiteralNodeConfig) is not None

Type guard

def has_literal_config(node) -> bool:
    return node.as_config(LiteralNodeConfig) is not None

Prevention

When it happens

Trigger: node.as_config(LiteralNodeConfig) returns None — config dict missing or shape-incompatible.

Common situations: Workflow builder skipped config for literal nodes; schema drift after upgrades; YAML/JSON workflow missing the config key.

Related errors


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