A harness addresses a model as `provider/model`. The bridge wire id was
built from `profile.model.default` alone, dropping `profile.model.provider`:
{provider: 'tangle-router', default: 'glm-5.2'} -> pi/glm-5.2
which routes to the right BACKEND -- the `pi/` prefix matches -- and then
hands pi a bare id it cannot place. pi falls back to its own configured
default provider and exits with
No API key found for opencode.
a credential error naming a provider the caller never chose, which is why
this reads as an auth problem rather than a model-addressing one. Every
harness-arm run through the bridge died this way before its first turn.
Bisected against a live cli-bridge, which is NOT at fault: `model` alone,
`model` + agent_profile, and `model` + agent_profile + an MCP mount all
return 200 with `pi/tangle-router/glm-5.2`. Only the composed id was
wrong. `pi --list-models glm` confirms `tangle-router` / `glm-5.2` is the
correct pair.
A per-cell `backend.model.model` override is deliberately left as
supplied: it is a caller-authored wire id, not a profile hint, and
qualifying it would rewrite what the caller asked for. A model that
already carries a provider is not double-qualified, and a profile that
declares no provider is left to the harness's own resolution -- there,
that resolution IS the declared intent.
Three tests pin all three cases. Kill-tested: restoring the old
expression fails exactly one.
Full suite: 2240 passed / 6 skipped, exit 0.
Fixes #690.
The bug
A harness addresses a model as
provider/model. The bridge wire id was built fromprofile.model.defaultalone, droppingprofile.model.provider:That routes to the right backend — the
pi/prefix matches — and then hands pi a bare id it cannot place. pi falls back to its own configured default provider and exits with:A credential error naming a provider the caller never chose, which is exactly why this read as an auth problem for days rather than a model-addressing one. Every harness-arm run through the bridge died this way before its first turn.
cli-bridge is not at fault
Bisected against a live cli-bridge (
BRIDGE_BACKENDS=pi):model: "pi/tangle-router/glm-5.2""OK"agent_profilecarrying the model object"OK"extensions.pi.load"OK"model: "pi/glm-5.2"opencode, no keyOnly the composed id was wrong.
pi --list-models glmconfirms the pair:What is deliberately NOT changed
backend.model.modeloverride passes through as supplied. It is a caller-authored wire id, not a profile hint; qualifying it would rewrite what the caller asked for.routerInlineExecutorandrouterToolsInlineExecutortake a bare model id and work correctly today; qualifying them would break the arm that already works.Verification
tsc --noEmit— 0 errorsReproduction:
discovery-lab/runs/proof-bridge-20260801f.