chore: default context window to 200k
This commit is contained in:
@@ -993,7 +993,7 @@ def _try_auto_fill_context_window(model: BaseModel, new_model_name: str) -> None
|
||||
|
||||
current_context = getattr(model, "context_window_tokens", None)
|
||||
|
||||
# Check if current value is the default (65536)
|
||||
# Check if current value is the default
|
||||
# We only auto-fill if the user hasn't changed it from default
|
||||
from nanobot.config.schema import AgentDefaults
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ class ModelPresetConfig(Base):
|
||||
model: str
|
||||
provider: str = "auto"
|
||||
max_tokens: int = 8192
|
||||
context_window_tokens: int = 65_536
|
||||
context_window_tokens: int = 200_000
|
||||
temperature: float = 0.1
|
||||
reasoning_effort: str | None = None
|
||||
|
||||
@@ -123,7 +123,7 @@ class AgentDefaults(Base):
|
||||
"auto" # Provider name (e.g. "anthropic", "openrouter") or "auto" for auto-detection
|
||||
)
|
||||
max_tokens: int = 8192
|
||||
context_window_tokens: int = 65_536
|
||||
context_window_tokens: int = 200_000
|
||||
context_block_limit: int | None = None
|
||||
temperature: float = 0.1
|
||||
fallback_models: list[FallbackCandidate] = Field(default_factory=list)
|
||||
|
||||
@@ -33,9 +33,9 @@ Concrete scenarios showing when and how to use the my tool effectively.
|
||||
### Large codebase analysis
|
||||
```
|
||||
→ my(action="check")
|
||||
→ context_window_tokens: 65536
|
||||
→ context_window_tokens: 200000
|
||||
→ my(action="set", key="context_window_tokens", value=131072)
|
||||
→ "Set context_window_tokens = 131072 (was 65536)"
|
||||
→ "Set context_window_tokens = 131072 (was 200000)"
|
||||
→ "I've expanded my context window to handle this large codebase."
|
||||
```
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ _IMAGE_GENERATION_ASPECT_RATIOS = {
|
||||
"2:3",
|
||||
"21:9",
|
||||
}
|
||||
_CONTEXT_WINDOW_TOKEN_OPTIONS = {65_536, 262_144}
|
||||
_CONTEXT_WINDOW_TOKEN_OPTIONS = {65_536, 200_000, 262_144}
|
||||
_MODEL_CONFIGURATION_SLUG_RE = re.compile(r"[^a-z0-9_-]+")
|
||||
_ENV_REF_RE = re.compile(r"\$\{([A-Za-z_][A-Za-z0-9_]*)\}")
|
||||
|
||||
@@ -606,7 +606,7 @@ def _parse_context_window_tokens(value: str | None) -> int | None:
|
||||
except ValueError:
|
||||
raise WebUISettingsError("context_window_tokens must be an integer") from None
|
||||
if parsed not in _CONTEXT_WINDOW_TOKEN_OPTIONS:
|
||||
raise WebUISettingsError("context_window_tokens must be 65536 or 262144")
|
||||
raise WebUISettingsError("context_window_tokens must be 65536, 200000, or 262144")
|
||||
return parsed
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user