Skip to content

MDL098 - No Model Registered for Schema Version

Description

The model layer was asked to validate against an schema_version for which no Pydantic model is registered in _MODEL_BY_VERSION (see validators/model.py). The engine fails fast rather than silently coercing to the default model — silent coercion would mask the misconfiguration and produce misleading downstream errors.

Category

Model Errors

Severity

error

Common Causes

  • The caller passed an schema_version string the engine doesn't know about (e.g. a typo, a future-version pin, or a CI environment that wasn't refreshed after a UNTP upgrade).
  • A custom build of dppvalidator removed a model registration without also removing the version from SCHEMA_REGISTRY.

How to Fix

  1. Check the registered versionsdppvalidator schema list prints every version _MODEL_BY_VERSION knows about. The error message also lists them under the available field.
  2. Pin a registered version when constructing the engine, or omit schema_version entirely to let auto-detection pick from the payload's @context.
  3. If you need a new version, follow the recipe in .claude/rules/untp-versioning.md (or the /untp-bump <X.Y.Z> slash command). Adding a version requires touching _MODEL_BY_VERSION, SCHEMA_REGISTRY, and a handful of related dispatch tables — see the rule for the full minimum touch list.

Example

Python
from dppvalidator.validators import ValidationEngine

# Wrong — "0.5.0" isn't registered.
engine = ValidationEngine(schema_version="0.5.0")
result = engine.validate(payload)
# result.errors[0].code == "MDL098"
# result.errors[0].context["requested_version"] == "0.5.0"

# Right — register one of the supported versions, or auto-detect.
engine = ValidationEngine(schema_version="0.7.0")

See Also