4a3e07f1c made provider.Efforts return the levels a user kept, so the
gateway fitted every request to them. That reversed #92 (47e12df41),
which was explicit that narrowing a model's levels changes only what is
shown and "the levels the vendor is asked at stay as they were": a user
who had trimmed a picker with `magpie model efforts` or Names & levels
would have had their agents' xhigh and max asks lowered unasked. Dani's
request (magpie model spec) needs levels to count only where magpie
knows none for the model.
- Efforts is back to what it was before 4a3e07f1c: the vendor's list's
or models.dev's levels when known, else the ones the user declared
(`magpie model spec --reasoning` on a custom provider's model), which
a request is then fitted to. --reasoning off (reasonless) is as
4a3e07f1c built it.
- TestModelEfforts' "the vendor is still asked at any level it has" is
restored as it was.
- TestKeptLevelsBoundTheAsk becomes TestNarrowedVendorLevelsAskAsBefore:
a models.dev-known model narrowed to low-high is offered low..high and
still sends xhigh, max and low as asked.
- gateway-routing.md, reference.md, the settings.go comment and spec's
usage say so: narrowing is display-only, declared levels are fitted.
Run at this tree (base 4a3e07f1c):
- go test -count=1 -timeout 45m ./internal/gateway ./internal/provider
./internal/cli ./internal/settings: ok (gateway 386s).
- gofmt -l empty; go vet darwin, linux -tags nogui, windows clean.
- Broken by hand, each red: 4a3e07f1c's Efforts (TestNarrowedVendor-
LevelsAskAsBefore: xhigh and max went as high; TestModelEfforts:
[low high]); declared levels ignored (TestModelSpecReachesTheGateway:
xhigh sent as xhigh with low-high declared).
- Every other p.Efforts caller (gateway fit, decide, classify, automode,
rules, side effort) is on the request path and is back to its
behaviour before 4a3e07f1c.
Not run: the GUI suite (no GUI file changed; the GUI reads entry
Efforts, which still carry the kept levels) and a full go test ./....