fix(config): delete the model-routing chain — nothing has called it since April #119

Merged
mathias merged 1 commits from fix/116-dead-model-routing into main 2026-09-16 22:24:47 +00:00
Owner

Closes #116.

The issue understated it

#116 said the deployed service does not read config/models.yaml. True — and nothing reads it at all. The loader written to read it is dead too.

The whole chain:

Artifact Status
config/models.yaml data with no consumer
internal/config/models.go — LoadModels, ModelFor only callers are in models_test.go
internal/config/config.go — ModelsFile field assigned from SUPERVISOR_MODELS_FILE, never read
.env.example — SUPERVISOR_MODELS_FILE configures the path to the file nobody opens

Deleting the YAML alone would have left a loader pointing at a missing file — one decoy replaced by another. So all four go.

What kept it invisible

This subsystem had three passing tests.

That is the finding worth keeping. Green assertions proving a function nobody calls works correctly are worse than no tests, because coverage is exactly the signal someone uses to decide code is alive. A grep for "is this used?" finds models_test.go and stops.

This repo's own docs/superpowers/specs/2026-04-20-model-orchestration-design.md said it in April — "the model routing config exists but is dead weight" — and it survived five more months.

The models it named were wrong too

Two of six no longer exist: iguana/qwen3-coder-next (retired in infra#416) and koala/qwen3-coder-30b (gone earlier — infra's llm-consumers.yaml documents that exact name as the dead entry which broke agentsquad's LiteLLM grant). Nobody noticed because being unread is the only reason it never failed.

Where routing actually lives

Env, on the deployed ingestion service:

INGEST_LLM_MODEL=koala/qwen35-9b-fast
BRAIN_LLM_PRIMARY_MODEL=google/gemma-4-31B-it
BRAIN_LLM_FALLBACK_MODEL=gemma4:31b
BRAIN_LLM_TERTIARY_MODEL=gemini-flash-latest

Not one name from the deleted file appears. Editing it to change routing would have changed nothing, silently.

Verification

go build ./...    clean
task check        EXIT=0, 0 FAIL

Reversible

Everything is one git revert away, and the file's content is in the issue body if it ever needs reconstructing.

What I did not do

Did not add the option-B startup check (fail when a chained model is absent from LiteLLM's /v1/models). With no consumer left there is nothing to validate — if routing config returns to this repo, that gate should come with it. infra's tests/canary-tiers-vs-catalogue_test.sh is the working example.


Created via git-mcp on behalf of @mathias

Closes #116. ## The issue understated it #116 said the deployed service does not read `config/models.yaml`. True — and **nothing reads it at all**. The loader written to read it is dead too. The whole chain: | Artifact | Status | |---|---| | `config/models.yaml` | data with no consumer | | `internal/config/models.go` — `LoadModels`, `ModelFor` | only callers are in `models_test.go` | | `internal/config/config.go` — `ModelsFile` field | assigned from `SUPERVISOR_MODELS_FILE`, never read | | `.env.example` — `SUPERVISOR_MODELS_FILE` | configures the path to the file nobody opens | Deleting the YAML alone would have left a loader pointing at a missing file — one decoy replaced by another. So all four go. ## What kept it invisible **This subsystem had three passing tests.** That is the finding worth keeping. Green assertions proving a function nobody calls works correctly are *worse* than no tests, because coverage is exactly the signal someone uses to decide code is alive. A grep for "is this used?" finds `models_test.go` and stops. This repo's own `docs/superpowers/specs/2026-04-20-model-orchestration-design.md` said it in April — *"the model routing config exists but is dead weight"* — and it survived five more months. ## The models it named were wrong too Two of six no longer exist: `iguana/qwen3-coder-next` (retired in infra#416) and `koala/qwen3-coder-30b` (gone earlier — infra's `llm-consumers.yaml` documents that exact name as the dead entry which broke agentsquad's LiteLLM grant). Nobody noticed because being unread is the only reason it never failed. ## Where routing actually lives Env, on the deployed `ingestion` service: ``` INGEST_LLM_MODEL=koala/qwen35-9b-fast BRAIN_LLM_PRIMARY_MODEL=google/gemma-4-31B-it BRAIN_LLM_FALLBACK_MODEL=gemma4:31b BRAIN_LLM_TERTIARY_MODEL=gemini-flash-latest ``` Not one name from the deleted file appears. Editing it to change routing would have changed nothing, silently. ## Verification ``` go build ./... clean task check EXIT=0, 0 FAIL ``` ## Reversible Everything is one `git revert` away, and the file's content is in the issue body if it ever needs reconstructing. ## What I did not do Did not add the option-B startup check (fail when a chained model is absent from LiteLLM's `/v1/models`). With no consumer left there is nothing to validate — if routing config returns to this repo, that gate should come with it. `infra`'s `tests/canary-tiers-vs-catalogue_test.sh` is the working example. --- _Created via git-mcp on behalf of @mathias_
mathias added 1 commit 2026-09-16 22:21:31 +00:00
fix(config): delete the model-routing chain — nothing has called it since April
CI / Lint / Test / Vet (pull_request) Successful in 32s
CI / Mirror to GitHub (pull_request) Skipped
351b187973
Closes #116.

`config/models.yaml` declared a default chain and six per-skill chains. The
issue filed against it said the deployed service does not read the file. That
was true and understated: **nothing reads it at all**, and the loader written to
read it is dead too.

The whole chain goes:

- `config/models.yaml` — data with no consumer
- `internal/config/models.go` — `LoadModels` and `ModelFor`, whose only callers
  are in `models_test.go`
- `internal/config/config.go` — the `ModelsFile` field, assigned from
  `SUPERVISOR_MODELS_FILE` and never read
- `.env.example` — the variable that configures the path to the file nobody opens

Deleting the YAML alone would have left a loader pointing at a missing file:
one decoy replaced by another.

This subsystem had THREE PASSING TESTS. That is what kept it invisible. Green
assertions proving a function nobody calls works correctly are worse than no
tests, because coverage is exactly the signal someone would use to decide the
code is alive. The repo's own
`docs/superpowers/specs/2026-04-20-model-orchestration-design.md` said so in
April — "the model routing config exists but is dead weight" — and it survived
five more months anyway.

Two of the six models it named no longer exist (`iguana/qwen3-coder-next`,
retired in infra#416, and `koala/qwen3-coder-30b`, gone earlier). Nobody noticed
because the file being unread is the only reason it never failed.

Live routing is env, on the deployed `ingestion` service: `INGEST_LLM_MODEL`,
`BRAIN_LLM_PRIMARY_MODEL`, and four more. Not one name from the deleted file
appears there. Env is the real configuration surface; this file read as though
it were, which is why editing it to change routing would have changed nothing,
silently.

`go build ./...` clean, `task check` EXIT=0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mathias merged commit 868fe28c96 into main 2026-09-16 22:24:47 +00:00
Sign in to join this conversation.