From 46d1a6448a09831b16c06bdd069e1171719a1a11 Mon Sep 17 00:00:00 2001 From: chengyongru <2755839590@qq.com> Date: Sun, 22 Mar 2026 21:23:54 +0800 Subject: [PATCH] fix(schema): restore lost changes from cherry-pick conflict resolution - Restore enable attribute to ExecToolConfig - Remove deprecated memory_window field (was removed in f44c4f9 but brought back by cherry-pick) - Restore exclude=True on openai_codex and github_copilot oauth providers --- nanobot/config/schema.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/nanobot/config/schema.py b/nanobot/config/schema.py index b45958c55..0d38ad860 100644 --- a/nanobot/config/schema.py +++ b/nanobot/config/schema.py @@ -38,15 +38,8 @@ 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 - class AgentsConfig(Base): """Agent configuration.""" @@ -86,8 +79,8 @@ class ProvidersConfig(Base): volcengine_coding_plan: ProviderConfig = Field(default_factory=ProviderConfig) # VolcEngine Coding Plan byteplus: ProviderConfig = Field(default_factory=ProviderConfig) # BytePlus (VolcEngine international) byteplus_coding_plan: ProviderConfig = Field(default_factory=ProviderConfig) # BytePlus Coding Plan - openai_codex: ProviderConfig = Field(default_factory=ProviderConfig) # OpenAI Codex (OAuth) - github_copilot: ProviderConfig = Field(default_factory=ProviderConfig) # Github Copilot (OAuth) + openai_codex: ProviderConfig = Field(default_factory=ProviderConfig, exclude=True) # OpenAI Codex (OAuth) + github_copilot: ProviderConfig = Field(default_factory=ProviderConfig, exclude=True) # Github Copilot (OAuth) class HeartbeatConfig(Base): @@ -126,6 +119,7 @@ class WebToolsConfig(Base): class ExecToolConfig(Base): """Shell exec tool configuration.""" + enable: bool = True timeout: int = 60 path_append: str = ""