mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-10-19 20:31:58 +00:00
fix: Improve provider update error handling and add VRM provider settings validation (#887)
Bump Version / Bump Version Workflow (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
Bump Version / Bump Version Workflow (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
* fix: improve error handling for provider updates Distinguishes failures of active providers from inactive ones. Propagates errors only for enabled providers, allowing execution to continue if a non-active provider fails, which avoids unnecessary interruptions and improves robustness. * fix: add provider settings validation for forecast requests Prevents potential runtime errors by checking if provider settings are configured before accessing forecast credentials. Raises a clear error when settings are missing to help with debugging misconfigurations. * refactor(load): move provider settings to top-level fields Transitions load provider settings from a nested "provider_settings" object with provider-specific keys to dedicated top-level fields.\n\nRemoves the legacy "provider_settings" mapping and updates migration logic to ensure backward compatibility with existing configurations. * docs: update version numbers and documantation --------- Co-authored-by: Normann <github@koldrack.com>
This commit is contained in:
co-authored by
Normann
parent
2ca9c930e5
commit
04420e66ab
@@ -28,21 +28,6 @@ def load_providers() -> list[str]:
|
||||
]
|
||||
|
||||
|
||||
class LoadCommonProviderSettings(SettingsBaseModel):
|
||||
"""Load Prediction Provider Configuration."""
|
||||
|
||||
LoadAkkudoktor: Optional[LoadAkkudoktorCommonSettings] = Field(
|
||||
default=None,
|
||||
json_schema_extra={"description": "LoadAkkudoktor settings", "examples": [None]},
|
||||
)
|
||||
LoadVrm: Optional[LoadVrmCommonSettings] = Field(
|
||||
default=None, json_schema_extra={"description": "LoadVrm settings", "examples": [None]}
|
||||
)
|
||||
LoadImport: Optional[LoadImportCommonSettings] = Field(
|
||||
default=None, json_schema_extra={"description": "LoadImport settings", "examples": [None]}
|
||||
)
|
||||
|
||||
|
||||
class LoadCommonSettings(SettingsBaseModel):
|
||||
"""Load Prediction Configuration."""
|
||||
|
||||
@@ -54,19 +39,19 @@ class LoadCommonSettings(SettingsBaseModel):
|
||||
},
|
||||
)
|
||||
|
||||
provider_settings: LoadCommonProviderSettings = Field(
|
||||
default_factory=LoadCommonProviderSettings,
|
||||
json_schema_extra={
|
||||
"description": "Provider settings",
|
||||
"examples": [
|
||||
# Example 1: Empty/default settings (all providers None)
|
||||
{
|
||||
"LoadAkkudoktor": None,
|
||||
"LoadVrm": None,
|
||||
"LoadImport": None,
|
||||
},
|
||||
],
|
||||
},
|
||||
loadakkudoktor: LoadAkkudoktorCommonSettings = Field(
|
||||
default_factory=LoadAkkudoktorCommonSettings,
|
||||
json_schema_extra={"description": "LoadAkkudoktor provider settings."},
|
||||
)
|
||||
|
||||
loadvrm: LoadVrmCommonSettings = Field(
|
||||
default_factory=LoadVrmCommonSettings,
|
||||
json_schema_extra={"description": "LoadVrm provider settings."},
|
||||
)
|
||||
|
||||
loadimport: LoadImportCommonSettings = Field(
|
||||
default_factory=LoadImportCommonSettings,
|
||||
json_schema_extra={"description": "LoadImport provider settings."},
|
||||
)
|
||||
|
||||
@computed_field # type: ignore[prop-decorator]
|
||||
|
||||
Reference in New Issue
Block a user