Merge pull request #4304 from adenhq/fix/init-config
Release / Create Release (push) Waiting to run

model selection + max_tokens in quickstart
This commit is contained in:
Timothy @aden
2026-02-09 20:11:55 -08:00
committed by GitHub
10 changed files with 373 additions and 151 deletions
@@ -1,33 +1,8 @@
"""Runtime configuration."""
import json
from dataclasses import dataclass, field
from pathlib import Path
def _load_preferred_model() -> str:
"""Load preferred model from ~/.hive/configuration.json."""
config_path = Path.home() / ".hive" / "configuration.json"
if config_path.exists():
try:
with open(config_path) as f:
config = json.load(f)
llm = config.get("llm", {})
if llm.get("provider") and llm.get("model"):
return f"{llm['provider']}/{llm['model']}"
except Exception:
pass
return "anthropic/claude-sonnet-4-20250514"
@dataclass
class RuntimeConfig:
model: str = field(default_factory=_load_preferred_model)
temperature: float = 0.7
max_tokens: int = 40000
api_key: str | None = None
api_base: str | None = None
from dataclasses import dataclass
from framework.config import RuntimeConfig
default_config = RuntimeConfig()