refactor(agent): snapshot generation without provider mutation

This commit is contained in:
chengyongru authored and Xubin Ren committed 2026-07-10 17:54:34 +08:00
1 parent bd94fefd1a
commit cb03d2c748
5 files changed
+33 -7

No files matched your search

+1 -1
View File
@@ -34,12 +34,12 @@ def build_static_preset_snapshot(
name: str,
preset: ModelPresetConfig,
) -> ProviderSnapshot:
provider.generation = preset.to_generation_settings()
return ProviderSnapshot(
provider=provider,
model=preset.model,
context_window_tokens=preset.context_window_tokens,
signature=("model_preset", name, preset.model_dump_json()),
generation=preset.to_generation_settings(),
)