OpenBMB/ChatDev · error · ConfigError
expected skill entry mapping or string
Error message
expected skill entry mapping or string
What it means
Inside the allow list, each item must be either a string or a Mapping (parsed via AgentSkillSelectionConfig); anything else (int, bool, null, nested list) raises ConfigError('expected skill entry mapping or string') at '<path>[idx]'.
Source
Thrown at entity/configs/node/skills.py:175
def _coerce_allow_entries(value: Any, *, field_path: str) -> List[str]:
if value is None:
return []
if not isinstance(value, list):
raise ConfigError("expected list of skill entries", field_path)
result: List[str] = []
for idx, item in enumerate(value):
item_path = f"{field_path}[{idx}]"
if isinstance(item, str):
normalized = item.strip()
if normalized:
result.append(normalized)
continue
if isinstance(item, Mapping):
entry = AgentSkillSelectionConfig.from_dict(item, path=item_path)
result.append(entry.name)
continue
raise ConfigError("expected skill entry mapping or string", item_path)
return result
View on GitHub (pinned to 4fb2db0ea9)
Solutions
- Quote names that look like numbers/booleans: - '42'
- Remove null or nested-list entries
- Ensure templating always emits strings or mappings per element
Example fix
# before allow: - 42 # after allow: - '42'
Defensive patterns
Strategy: validation
Validate before calling
for i, item in enumerate(allow_list):
assert isinstance(item, (str, dict)), f'entry {i} must be string or mapping' Type guard
def is_valid_allow_item(v) -> bool:
return isinstance(v, (str, dict)) Try / catch
try:
SkillsConfig.from_dict(d, path='skills')
except ConfigError as e:
if 'mapping or string' in str(e):
d['allow'] = [str(x) for x in d['allow']]
SkillsConfig.from_dict(d, path='skills') Prevention
- Quote numeric-looking skill names in YAML
- Filter nulls from generated allow lists
When it happens
Trigger: allow: [1, true, null, [a]] — any non-string/non-mapping list element.
Common situations: YAML unquoted numbers/booleans intended as names (e.g. 42 as a skill name); nulls from sparse data; nested lists from templating bugs.
Related errors
- expected list of skill entries
- model.name must be a non-empty string
- model.input_mode must be 'prompt' or 'messages'
- tooling must be a list
- memories must be a list
AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/aadf9c3a3bf09c47.
Report an issue: GitHub.