diff --git a/nanobot/config/schema.py b/nanobot/config/schema.py index 8b8a0a297..c8556ec9f 100644 --- a/nanobot/config/schema.py +++ b/nanobot/config/schema.py @@ -93,8 +93,8 @@ class ModelPresetConfig(Base): model: str provider: str = "auto" - max_tokens: int = 32_000 - context_window_tokens: int = 262_144 + max_tokens: int = 8192 + context_window_tokens: int = 65_536 temperature: float = 0.1 reasoning_effort: str | None = None @@ -116,8 +116,8 @@ class AgentDefaults(Base): provider: str = ( "auto" # Provider name (e.g. "anthropic", "openrouter") or "auto" for auto-detection ) - max_tokens: int = 32_000 - context_window_tokens: int = 262_144 + max_tokens: int = 8192 + context_window_tokens: int = 65_536 context_block_limit: int | None = None temperature: float = 0.1 fallback_models: list[FallbackCandidate] = Field(default_factory=list) diff --git a/tests/cli/test_restart_command.py b/tests/cli/test_restart_command.py index 9748ff55c..f61e18923 100644 --- a/tests/cli/test_restart_command.py +++ b/tests/cli/test_restart_command.py @@ -176,7 +176,7 @@ class TestRestartCommand: assert response is not None assert "Model: test-model" in response.content assert "Tokens: 0 in / 0 out" in response.content - assert "Context: 20k/262k (7% of input budget)" in response.content + assert "Context: 20k/65k (31% of input budget)" in response.content assert "Session: 3 messages" in response.content assert "Uptime: 2m 5s" in response.content assert "Tasks: 0 active" in response.content @@ -240,7 +240,7 @@ class TestRestartCommand: assert response is not None assert "Tokens: 1200 in / 34 out" in response.content - assert "Context: 1k/262k (0% of input budget)" in response.content + assert "Context: 1k/65k (1% of input budget)" in response.content assert "Tasks: 0 active" in response.content @pytest.mark.asyncio diff --git a/tests/config/test_config_migration.py b/tests/config/test_config_migration.py index 9e28ff660..b27926ec0 100644 --- a/tests/config/test_config_migration.py +++ b/tests/config/test_config_migration.py @@ -34,7 +34,7 @@ def test_load_config_keeps_max_tokens_and_ignores_legacy_memory_window(tmp_path) config = load_config(config_path) assert config.agents.defaults.max_tokens == 1234 - assert config.agents.defaults.context_window_tokens == 262_144 + assert config.agents.defaults.context_window_tokens == 65_536 assert not hasattr(config.agents.defaults, "memory_window") @@ -60,7 +60,7 @@ def test_save_config_writes_context_window_tokens_but_not_memory_window(tmp_path defaults = saved["agents"]["defaults"] assert defaults["maxTokens"] == 2222 - assert defaults["contextWindowTokens"] == 262_144 + assert defaults["contextWindowTokens"] == 65_536 assert "memoryWindow" not in defaults