S02 · LLM Integration
Declared state: complete for now.
This is the repository plan and evidence, not a live health reading. A task marked done may still depend on credentials, devices, deployment or a newer acceptance test.
Dependencies
No dependencies are declared in the catalog.
Tasks and gates
02.F1 · Fast failover on first-token stall, not on request timeout (TODO K5a).
Tier F · done · Verification: exempt-test
Gate: `test_brain_llm.py`, `test_resilience.py`
- unverified-import · undated ·
docs/SYSTEMS-DETAILS.md:937
02.F2 · Tool-tier and thinking-tier routing. *gate:* `test_model_tiers.py`
Tier F · done · Verification: exempt-test
Gate: `test_model_tiers.py`
- unverified-import · undated ·
docs/SYSTEMS-DETAILS.md:939
02.F3 · Provider health is *learned*, not just configured: a provider that failed twice in five
Tier F · done · Verification: planned-test
Gate: new `test_provider_cooldown.py` 28/28, twelve plants.
- unverified-import · undated ·
docs/SYSTEMS-DETAILS.md:940
02.R1 · Per-tier cost accounting in `metrics` — tokens and money per intent class, in the HUD.
Tier R · done · Verification: hermetic-test
Gate: `test_metrics.py` [02.R1] (78)
- recorded-note · 2026-09-14 ·
docs/SYSTEMS-DETAILS.md:954
02.R2 · Prompt-cache discipline: the stable prefix (persona, rules) is byte-identical across
Tier R · done · Verification: planned-test
Gate: new `test_prompt_prefix_stable.py` (13)
- recorded-note · 2026-09-14 ·
docs/SYSTEMS-DETAILS.md:975
02.R3 · Streaming correctness under failover — no duplicated or truncated sentence when the
Tier R · done · Verification: hermetic-test
Gate: `test_streaming.py` [02.R3] (22)
- recorded-note · 2026-09-14 ·
docs/SYSTEMS-DETAILS.md:990
02.E1 · A full outage of primary + first fallback is inaudible in the voice path: the owner
Tier E · in-progress · Verification: hermetic-test
Gate: `test_resilience.py` chaos case, plus one live drill
- hermetic-green · undated ·
bench/test_outage_audible.py
02.R4 · A model that is still reasoning is a slow model: the turn fails over when nothing has been SPOKEN (and no tool call started) within the first-word budget, not merely when the socket goes quiet.
Tier R · done · Verification: hermetic-test
Gate: `test_llm_failover_speed.py` [5]-[6] - a stream of reasoning chunks with no spoken word fails over inside the budget on stream() and stream_with_tools(); the last chain entry is never cut for thinking.
- hermetic-green · 2026-10-17 ·
bench/test_llm_failover_speed.py
HUD screen contracts
- LLM Integration · /systems/S02
All subsystems · Source: docs/systems-plan.json.