diff --git a/horde_sdk/ai_horde_api/apimodels/base.py b/horde_sdk/ai_horde_api/apimodels/base.py index 894e505..050b32c 100644 --- a/horde_sdk/ai_horde_api/apimodels/base.py +++ b/horde_sdk/ai_horde_api/apimodels/base.py @@ -199,7 +199,9 @@ class ImageGenerateParamMixin(HordeAPIDataObject): """ model_config = ( - ConfigDict(frozen=True) if not os.getenv("TESTS_ONGOING") else ConfigDict(frozen=True, extra="forbid") + ConfigDict(frozen=True, extra="allow") + if not os.getenv("TESTS_ONGOING") + else ConfigDict(frozen=True, extra="forbid") ) sampler_name: KNOWN_SAMPLERS | str = KNOWN_SAMPLERS.k_lms diff --git a/horde_sdk/generic_api/apimodels.py b/horde_sdk/generic_api/apimodels.py index 8d1cab7..9aea272 100644 --- a/horde_sdk/generic_api/apimodels.py +++ b/horde_sdk/generic_api/apimodels.py @@ -58,6 +58,7 @@ class HordeAPIDataObject(BaseModel): ConfigDict( frozen=True, use_attribute_docstrings=True, + extra="allow", ) if not os.getenv("TESTS_ONGOING") else ConfigDict( @@ -98,7 +99,9 @@ class HordeResponseBaseModel(HordeResponse, BaseModel): """Base class for all Horde API response data models (leveraging pydantic).""" model_config = ( - ConfigDict(frozen=True) if not os.getenv("TESTS_ONGOING") else ConfigDict(frozen=True, extra="forbid") + ConfigDict(frozen=True, extra="allow") + if not os.getenv("TESTS_ONGOING") + else ConfigDict(frozen=True, extra="forbid") )