Switch the default provider from Anthropic to OpenAI and the default model to gpt-5.3-codex, so Pi runs on a ChatGPT Plus/Pro (Codex) subscription. The OAuth login stays unmanaged in ~/.pi/agent/auth.json, as before.
30 lines
782 B
Nix
30 lines
782 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
# Pi, a terminal coding agent, for the primary user, configured through
|
|
# home-manager, which ships the package and manages ~/.pi/agent.
|
|
# The login credential is left unmanaged, so it survives rebuilds.
|
|
let
|
|
cfg = config.modules.agents.pi;
|
|
user = config.user.name;
|
|
in
|
|
{
|
|
options.modules.agents.pi.enable = lib.mkEnableOption ''
|
|
Pi, a terminal coding agent, configured via home-manager'';
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
home-manager.users.${user}.programs.pi-coding-agent = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
defaultProvider = "openai";
|
|
# Pi's catalogue id for OpenAI's Codex model, served by the ChatGPT subscription.
|
|
defaultModel = "gpt-5.3-codex";
|
|
enableAnalytics = false;
|
|
};
|
|
};
|
|
};
|
|
}
|