Kautism on Discord, after making a group of Clef and Jev models: "group
似乎不能在閘道金鑰上使用?我翻不到。" The key editor's model list comes from
GET /api/caller-keys/models, which is built from provider.Catalog, and
Catalog keeps decision groups out (no agent chats with one). The gateway
already serves a key that names one (serveDecisionGroup's groupGiven at
/v1/systemone), so a key held to some models could only reach a
decision group through All models.
Now the list puts the decision groups after the chat groups, marked
Group and Decides: only those the gateway serves (not hidden, not
switched off, found by FindGroup), and none twice.
Tests:
- TestCallerKeyModelsOfferDecisionGroups: a decision group is listed
after the chat group; a switched-off one is not. It fails with the
new block taken out by hand ("groups offered [group/chat], want the
chat group and the decision group").
- TestGatewayKeyNamingADecisionGroup: a key given only the decision
group reaches it at /v1/systemone, and a key given another model is
refused. This is a guard on gateway behaviour that is already there;
the gateway code is unchanged.
Run (worktree base 223b900b4, rebased onto 169446a1d, which changes
only the tray files):
- mote: go test -count=1 -timeout 45m ./internal/gui/ ./internal/gateway/
ok (199s, 988s); go vet for darwin, GOOS=linux -tags nogui and
GOOS=windows: ok; gofmt clean.
- node --test internal/gui/tests/gateway-key-*.test.cjs: 363 pass,
11 fail. 10 of the fails are gateway-key-arrange's "dragged into
order" at 420px, both engines and every language, which are #6268.
On mica, at load ~5, those two files fail the same 10 at this branch
and at a fresh origin/main 169446a1d. The 11th (limit-off, chromium
de 420) passed in the rerun of both files.
Not tried: the editor in the real app with the reporter's group.