T3 Code's Pi puts all 71 of its tools into the context on
openai-completions and only 3 on openai-responses, loading the rest when
asked. The reporter set providers.magpie.api to openai-responses in
~/.pi/agent/models.json, and the next catalog sync wrote
openai-completions back.
piAPIsKept (pi_api_kept.go), called from piBlockKept (Pi, its forks and
Aside), keeps an api the user set for magpie's provider or for one of its
models. As with a maxTokens typed by hand (output_kept.go), the stash
records the APIs magpie wanted per file (api:<path>:wanted), and an api in
the file that is none of them is the user's. A model's keeps its baseUrl
and compat with it. With no record yet, the provider's is taken as
openai-completions, the only value magpie ever wrote there, so a file
edited before this release keeps the user's value on its first sync. An
api the file lacks is magpie's. A Chat model left on a provider the user
put on Responses gets compat.supportsStrictMode, as magpie's own
Responses models have it (#3055).
magpie's default is unchanged: a model whose provider speaks Chat stays
on Chat, relayed as Pi sent it, and no setting was added.
Run (mote): go test -count=1 ./internal/agent/ ok (322s); go vet
./internal/agent/ for darwin, GOOS=linux and GOOS=windows; gofmt -l clean.
TestPiKeepsAnAPISetByHand covers a value set before any record, set back
by hand, a model's api with its baseUrl, and one taken out.
Broken by hand: with the piAPIsKept call commented out the test goes red
("provider api = openai-completions, want the user's openai-responses").
Not tried: a real Pi or T3 Code (neither is installed here); the full
suite runs after the push.