fix(config): reconcile presets with settings reload

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Xubin Ren
2026-05-12 20:06:22 +08:00
committed by Xubin Ren
co-authored by Cursor
parent c450d6fd3f
commit b61c6304c3
4 changed files with 122 additions and 10 deletions
+9 -2
View File
@@ -143,7 +143,14 @@ def build_provider_snapshot(
)
def load_provider_snapshot(config_path: Path | None = None) -> ProviderSnapshot:
def load_provider_snapshot(
config_path: Path | None = None,
*,
preset_name: str | None = None,
) -> ProviderSnapshot:
from nanobot.config.loader import load_config, resolve_config_env_vars
return build_provider_snapshot(resolve_config_env_vars(load_config(config_path)))
return build_provider_snapshot(
resolve_config_env_vars(load_config(config_path)),
preset_name=preset_name,
)