fix(models): preserve preset rename compatibility

This commit is contained in:
Xubin Ren committed 2026-08-16 11:50:56 +08:00
1 parent a956fe1d60
commit 0a6ee1c539
20 files changed
+307 -46

No files matched your search

+11 -1
View File
@@ -113,12 +113,22 @@ class WebUISettingsServices:
config: WebUISettingsConfig
oauth_flows: WebUIOAuthFlowRegistry
rename_model_preset: Callable[[str, str], int] | None = None
refresh_runtime_config: Callable[[], None] | None = None
@classmethod
def create(cls, config_path: Path) -> WebUISettingsServices:
def create(
cls,
config_path: Path,
*,
rename_model_preset: Callable[[str, str], int] | None = None,
refresh_runtime_config: Callable[[], None] | None = None,
) -> WebUISettingsServices:
return cls(
config=WebUISettingsConfig(config_path),
oauth_flows=WebUIOAuthFlowRegistry(),
rename_model_preset=rename_model_preset,
refresh_runtime_config=refresh_runtime_config,
)
def read(