OpenBMB/ChatDev · error · DesignError
No node types registered; cannot validate workflow
Error message
No node types registered; cannot validate workflow
What it means
Raised by the POST /api/tools/local endpoint when the request body's filename field is empty or only whitespace after stripping. It is a 400 Bad Request from FastAPI's HTTPException, meaning the client omitted the required filename for creating a local function-calling tool file.
Source
Thrown at check/check.py:26
from check.check_workflow import check_workflow_structure
from entity.config_loader import prepare_design_mapping
from entity.configs import DesignConfig, ConfigError
from schema_registry import iter_node_schemas
from utils.io_utils import read_yaml
ensure_schema_registry_populated()
class DesignError(RuntimeError):
"""Raised when a workflow design cannot be loaded or validated."""
def _allowed_node_types() -> set[str]:
names = set(iter_node_schemas().keys())
if not names:
raise DesignError("No node types registered; cannot validate workflow")
return names
def _ensure_supported(graph: Dict[str, Any]) -> None:
"""Ensure the MVP constraints are satisfied for the provided graph."""
for node in graph.get("nodes", []) or []:
nid = node.get("id")
ntype = node.get("type")
allowed = _allowed_node_types()
if ntype not in allowed:
raise DesignError(
f"Unsupported node type '{ntype}' for node '{nid}'. Only {allowed} nodes are supported."
)
if ntype == "agent":
agent_cfg = node.get("config") or {}
if not isinstance(agent_cfg, dict):
raise DesignError(f"Agent node '{nid}' config must be an object")
for legacy_key in ["memory"]:View on GitHub (pinned to 4fb2db0ea9)
Solutions
- Supply a non-empty filename in the JSON body, e.g. {"filename": "my_tool"}.
- Trim client-side and disable the submit button until the name field is filled.
- If the field is optional in your flow, generate a default name like f"tool_{uuid4().hex[:8]}".
Example fix
// before
fetch('/api/tools/local', {method:'POST', body: JSON.stringify({filename: nameInput.value})})
// after
const name = nameInput.value.trim();
if (!name) throw new Error('filename required');
fetch('/api/tools/local', {method:'POST', body: JSON.stringify({filename: name, content: code})}) Defensive patterns
Strategy: validation
Validate before calling
const name = (req.body.filename ?? '').trim();
if (!name) return res.status(400).send('filename required'); Try / catch
catch (e) { if (e.status === 400 && e.detail === 'filename is required') { /* prompt user for name */ } } Prevention
- Require non-empty filename in the form before enabling submit
- Trim input client-side
When it happens
Trigger: POST /api/tools/local with {"filename": ""} or {"filename": " "} (whitespace only) or omitting the field entirely if the Pydantic model defaults it to an empty string.
Common situations: Frontend forms submitting before the user typed a name; scripts that build the payload from an empty variable; JSON typos like "file_name" causing the default empty value to be used.
Related errors
- Unsupported node type '{ntype}' for node '{nid}'. Only {allo
- '{legacy_key}' is deprecated. Use the new graph-level memory
- Design file not found: {config_path}
- Agent node '{nid}' config must be an object
- YAML root must be a mapping
AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/b5ed6e3607b43724.
Report an issue: GitHub.