refactor: remove deprecated memory_window, harden wizard display

This commit is contained in:
Xubin Ren
2026-03-20 09:44:06 +00:00
committed by Xubin Ren
parent c3a4b16e76
commit f44c4f9e3c
6 changed files with 44 additions and 74 deletions

View File

@@ -38,14 +38,7 @@ class AgentDefaults(Base):
context_window_tokens: int = 65_536
temperature: float = 0.1
max_tool_iterations: int = 40
# Deprecated compatibility field: accepted from old configs but ignored at runtime.
memory_window: int | None = Field(default=None, exclude=True)
reasoning_effort: str | None = None # low / medium / high — enables LLM thinking mode
@property
def should_warn_deprecated_memory_window(self) -> bool:
"""Return True when old memoryWindow is present without contextWindowTokens."""
return self.memory_window is not None and "context_window_tokens" not in self.model_fields_set
reasoning_effort: str | None = None # low / medium / high - enables LLM thinking mode
class AgentsConfig(Base):