This commit is contained in:
Billy
2025-03-21 17:46:18 +11:00
parent 3938736bd8
commit d8450033ea
2 changed files with 3 additions and 2 deletions

View File

@@ -402,7 +402,7 @@ class ModelConfigBase(ABC, BaseModel):
cls.cast_overrides(overrides)
fields.update(overrides)
type = fields.get("base") or cls.model_fields["type"].default
type = fields.get("type") or cls.model_fields["type"].default
base = fields.get("base") or cls.model_fields["base"].default
fields["path"] = mod.path.as_posix()

View File

@@ -164,7 +164,8 @@ def test_regression_against_model_probe(datadir: Path, override_model_loading):
pass
if legacy_config and new_config:
assert legacy_config == new_config
assert type(legacy_config) is type(new_config)
assert legacy_config.model_dump_json() == new_config.model_dump_json()
elif legacy_config:
assert type(legacy_config) in ModelConfigBase._USING_LEGACY_PROBE