real-jacket: with enabledModels in ~/.omp/agent/config.yml, magpie wrote
only modelRoles.default, and omp kept starting on a model of the list. omp
holds a new session's default role to that list while it names anything
(main.ts buildSessionOptions, sdk.ts resolveAllowedModels and
pickDefaultAvailableModel); its other roles resolve against every model it
has, so only the default role is held to it. Pi had the same rule, fixed
in #160.
omp_scope.go: a model picked for the default role is added to the end of a
list that doesn't already take it in, by name or by one of omp's globs
(Bun.Glob, where * doesn't cross "/"), comments and order kept
(edit.EditYAMLNode, new). No list, or an empty one, is left as it is: omp
then takes every model. Entries scoped to folders ({path, models}) are the
user's and never changed. Disconnect takes the plain magpie/... entries out
once nothing else in config.yml is on magpie (a list left empty goes,
never []); a scoped entry on magpie still counts as in use. A renamed
provider's entries are renamed once (ompScopeOnce). Check reports a
default role on magpie the list leaves out as drift, which Reapply mends.
docs/subsystems/agent-wiring.md says the same.
Run:
- omp_scope_test.go: the default joins the list (plain, glob, level
suffix, comments kept), a list that takes it in or none is left alone,
Disconnect clears magpie's entries and keeps the user's and scoped ones,
and the leaving-out is drift. Each goes red with its part taken out
(ompScopeWith not appending, dropMagpie not calling ompScopeWithout,
Check without the list).
- go test -tags nogui ./internal/agent ./internal/edit.
- gofmt -l, go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./..., sandboxed go test ./... at the rebased head.
Not run: a real omp binary starting a session on the config written. Pi
has no RenameRefs, so a renamed provider's magpie/<old>/... entry stays in
Pi's enabledModels (not changed here).