OPENAI_API_KEY, ANTHROPIC_API_KEY and so on). Choose the default model and
the models a session can switch to in settings.json, as in pi:
models.json,
as in pi:
pi.registerProvider() work the same
way.
A turn’s model switches the session’s model, as provider/id. The session
keeps it for later turns, and subagents use it:
thinking sets the session’s thinking level the same way: off,
minimal, low, medium, high, xhigh, or max. A model that reasons less
uses its nearest level. Mark a models.json model that reasons with
"reasoning": true; any other model uses off.
Recording
Every model call is a recordedllm_call whose target is the model ID, so
policy can allow, deny, or require approval per model.
Providers work when their API accepts a custom fetch: openai-completions,
openai-responses, azure-openai-responses, anthropic-messages, and
mistral-conversations. Models on other APIs, such as Google’s, Bedrock, and
Codex, are left out.