Files
6krrt/deploy/llm-router-seed.timer
adlee-was-taken 2a6b48449c fix: restore energy data, surface empty scoring axes, and sample across time
Asking whether the service was running current code turned up three problems
it was not.

1. energy_observations was EMPTY. Recreating the DB for the base_model_id
   schema change dropped every reference-workload row, so cost_score and
   eco_score had silently fallen back to the neutral 0.5. The 7-distinct-model
   routing result reported earlier was therefore proficiency ALONE, not
   proficiency plus measured cost/eco. Re-swept.

2. The units would not have survived a reboot. Lingering was never enabled,
   so the user manager stops at logout. Enabled, and moved into the documented
   install steps rather than a footnote.

3. glm-5.2-flex had no proficiency at all, from a real bug. Propagation copied
   from the row whose id equals base_model_id -- glm-5.2 -- which is canary and
   never evaluated. Matching was also on family alone, so a '-fast' row could
   inherit its reasoning-ENABLED sibling's scores. Inheritance now requires
   matching (base_model_id, reasoning_mode, context_variant), and a flex row
   with no evaluated equivalent is measured directly instead of scoring blank.

/health now reports scoring coverage and warns when an axis has no data. An
empty axis is not an error -- every candidate takes 0.5 and routing still
works -- which is exactly what makes it dangerous: a 0.4 weight can contribute
nothing while health says "ok". It has now happened twice, so it is surfaced
rather than inferred.

Adds llm-router-seed.timer. Attribution reproduces within about 30 minutes
(0.3-1.1x on a spot-check) but not across hours: between two sweeps
deepseek-v4-flash moved ~50x and qwen3.6-35b ~7x the other way, enough to
invert their cost ranking. More samples inside one sweep measures one moment
more precisely; coverage across time is what actually helps. load_candidates
already medians over all seed_reference rows, so a periodic small sweep turns
that into a median-across-time for free.

Until several sweeps accumulate, the cost and eco ordering is provisional --
a single sweep's ranking is one sample of a moving quantity.

Tests 153 -> 156.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018xTPER7K8fNyKiuqNvTCTa
2026-08-17 18:21:26 -04:00

11 lines
159 B
SYSTEMD

[Unit]
Description=Sample the reference workload every few hours
[Timer]
OnBootSec=15min
OnUnitActiveSec=6h
Persistent=true
[Install]
WantedBy=timers.target