WorkBuddy's plugin 0.1.38 adds a "Free models only" switch (a plugin option)
that lists only WorkBuddy's free models and refuses any other before it is
sent. Its list goes by the switch, but SetProviderOptions only handed the
values over: the host cleared its infos while Go kept provCache, so the
Providers page and /v1/models showed the old list until something else
re-read it. SetProviderOptions now forgets the kept providers (whether the
host runs or not), so the next Cached() lists them again. Nothing else runs
on a change. The workbuddy mover's min is 0.1.38 (npm view --prefer-online
at landing: 0.1.38).
Run:
- go test ./internal/plugin ./internal/provider -count=1 -timeout 45m at
this head (5a3292354 + this): internal/plugin ok (389s); internal/provider
FAIL on TestUnreadLoginsWriteErrorsKeepCredentials, "close of synctest
channel from outside bubble" in filememo.Forget, which is #3632 (open, on
main since 091153bf, nothing here touches it). TestPluginOptions now lists
a model only while its option is on, and only base-model after it is off.
- Rebased onto 3aead9c62 after the run; its new commits touch only
internal/provider/codex_daemon*.go and codex_app_server_test.go. go vet
./internal/plugin ./internal/provider ok there; a rebuild to test again
failed to link for a full disk (291MB free).
- gofmt -l clean; GOOS=linux and GOOS=windows go vet ./internal/plugin
./internal/provider ok.
- Real accounts, sandbox HOME, dev build of this tree on 3516/3517 with the
plugin added by path: POST /api/settings/plugin-option free_only on for
workbuddy-ai took its list from 26 to 2 (hy3, deepseek-v4.1-flash) within
2s with no restart; workbuddy kept 19. gpt-5.4 got the plugin's 404 and
was not sent; hy3 and deepseek-v4.1-flash answered. Off: 26 again, and
gpt-6-luna and gpt-5.4 answered.
Broken by hand: without forgetProviders in SetProviderOptions,
TestPluginOptions fails ("with beta on, optco lists "base-model"").
Not tried: the switch clicked in the GUI window (the API it calls was);
Windows and Linux apps.