{
  "_documentation": {
    "pin_only_fallback": "EMERGENCY ONLY — default false. When true, the router pins on the first turn and reuses that model for all subsequent turns, skipping turn_envelope, triage, HyDRA, and sub-routing. Use when shadow quality retention regresses (>5% vs baseline) or as a manual operator fallback. See docs/routing-roadmap.md §1 and GitHub #83. Automated trigger wiring is SP-162."
  },
  "frugality": {
    "lambda_cost": 0.5,
    "lambda_latency": 0.1,
    "lambda_verbosity": 0.15
  },
  "loop_escalation": {
    "threshold": 3
  },
  "pricing": {
    "staleness_days": 14
  },
  "local": {
    "min_memory_gb_full": 16,
    "min_memory_gb_classification": 8,
    "battery_threshold_pct": 20
  },
  "hydra": {
    "artifact_cache_path": ".pi-smart-router/models/",
    "encoder": "minilm",
    "hydra_heads": "learned_projection",
    "_hydra_heads_documentation": {
      "learned_projection": "Default — SP-115 384×3 linear projection on MiniLM/Granite embeddings (config/hydra-projection-weights.json). Approximates HyDRA K sigmoid heads; keep until calibration Top-1 error exceeds ~10%.",
      "modernbert_k4": "ModernBERT-base [CLS] with K=4 independent sigmoid heads (config/modernbert-k4-heads.json). Migrating from SP-115: train K=4 head weights offline, set hydra_heads to modernbert_k4, and remove or ignore hydra-projection-weights.json. The fourth debugging dimension is predicted for HyDRA fidelity but excluded from the catalog-decoupled shortfall gate (reasoning, code_gen, tool_use only). See docs/routing-roadmap.md §2 P3 and GitHub #81."
    }
  },
  "low_intensity": {
    "weights": {
      "prompt_shortness": 0.08,
      "token_shortness": 0.08,
      "cyclomatic_low": 0.06,
      "trivial_signal": 0.1,
      "complex_inverse": 0.08,
      "triage_verdict": 0.1,
      "turn_type": 0.08,
      "no_tool_context": 0.06,
      "message_shallow": 0.06,
      "prose_ratio": 0.06,
      "requirement_low": 0.12,
      "cluster_signal": 0.12
    },
    "high_threshold": 0.65,
    "low_threshold": 0.35,
    "p_success_alpha": 0.5
  },
  "saar": {
    "planning_turn_buffer": 2,
    "prefix_cache_weight": 0.2,
    "idle_timeout_seconds": 300,
    "switch_threshold": 0.5
  },
  "planning_delegate": {
    "enabled": true,
    "compressed_context": {
      "max_messages": 12,
      "max_tokens": 16384,
      "exclude_execution_history": true
    },
    "global_timeout_ms": 120000,
    "sub_call_timeout_ms": 30000,
    "_timeouts_documentation": {
      "global_timeout_ms": "Global cap (ms) for the whole delegate stage; mirrors llm-use WORKER_GLOBAL_TIMEOUT. Default 120000 (SP-213, #120).",
      "sub_call_timeout_ms": "Per-call cap (ms) for each delegate sub-call worker; mirrors llm-use WORKER_CALL_TIMEOUT. Default 30000 (SP-213, #120)."
    }
  },
  "local_zero": {
    "enabled": true,
    "max_tool_use_requirement": 0.25,
    "_documentation": {
      "enabled": "When false, skip local_zero entirely (fall through to triage cloud / HyDRA). Default true — does not disable local for trivial traffic.",
      "max_tool_use_requirement": "Ceiling (0–1) on cheap predicted tool_use for local_zero dispatch. Effective limit is min(local model tool_use capability, this value). Default 0.25 keeps format/lint local while skipping agentic git/bash/edit/explore/delete/repo cues (SP-177, #98)."
    }
  },
  "pin_only_fallback": false
}
