BerriAI/litellm · error · ValueError
unknown mapper name {name!r}; known: {known}
Error message
unknown mapper name {name!r}; known: {known} What it means
Error "unknown mapper name {name!r}; known: {known}" thrown in BerriAI/litellm.
Source
Thrown at litellm/integrations/otel/mappers/__init__.py:47
_TOOL_DEFINITION_MAPPERS: Final[dict[str, Callable[[int], AttributeMapper]]] = {
"genai": GenAIMapper,
"legacy": LegacyMapper,
"openinference": OpenInferenceMapper,
}
_PLAIN_MAPPERS: Final[dict[str, Callable[[], AttributeMapper]]] = {
"langfuse": LangfuseMapper,
"weave": WeaveMapper,
"langtrace": LangtraceMapper,
}
def resolve_mappers(names: Iterable[str]) -> list[AttributeMapper]:
"""Resolve mapper names to instances. Unknown names raise ``ValueError``."""
ordered: Final = tuple(names)
for name in ordered:
if name not in _TOOL_DEFINITION_MAPPERS and name not in _PLAIN_MAPPERS:
known = sorted((*_TOOL_DEFINITION_MAPPERS, *_PLAIN_MAPPERS))
raise ValueError(f"unknown mapper name {name!r}; known: {known}")
# Distinct vocabularies each write the tool family under their own keys, so
# the ceiling is split by how many of them are configured. Repeating a name
# rewrites the same keys, so only distinct ones count.
budget: Final = tool_attr_budget(len({*ordered} & _TOOL_DEFINITION_MAPPERS.keys()))
return [
_TOOL_DEFINITION_MAPPERS[name](budget) if name in _TOOL_DEFINITION_MAPPERS else _PLAIN_MAPPERS[name]()
for name in ordered
]
__all__ = [
"AttrValue",
"AttributeMap",
"AttributeMapper",
"GenAIMapper",
"LangfuseMapper",
"LangtraceMapper",
"LegacyMapper",View on GitHub (pinned to 6c2dcb801b)
Solutions
- Use one of the known mapper names listed in the error.
When it happens
Trigger: Thrown at litellm/integrations/otel/mappers/__init__.py:47 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/ac598a45047aa82a.
Report an issue: GitHub.