fix(mm): pop base/type/format when creating unknown model config

This commit is contained in:
psychedelicious
2025-10-08 16:53:49 +11:00
parent 347a33f77c
commit 55d7d2e396

View File

@@ -1,3 +1,4 @@
from copy import deepcopy
from typing import Any, Literal, Self
from pydantic import Field
@@ -32,6 +33,11 @@ class Unknown_Config(Config_Base):
if not app_config.allow_unknown_models:
raise NotAMatchError("unknown models are not allowed by configuration")
cloned_override_fields = deepcopy(override_fields)
cloned_override_fields.pop("base", None)
cloned_override_fields.pop("type", None)
cloned_override_fields.pop("format", None)
return cls(
**override_fields,
# Override the type/format/base to ensure it's marked as unknown.