Skip to content

Commit 33cd75b

Browse files
committed
refactor(ai-tools): use cheaper worker models
Route routine discovery and helper agents to lower-cost models so subagent delegation stays cheap by default. Remove gpt-5.4-nano references because current Codex model guidance lists gpt-5.4-mini and Spark instead.
1 parent 2e18853 commit 33cd75b

8 files changed

Lines changed: 38 additions & 26 deletions

File tree

modules/common/ai-tools/agents.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ let
1414
"Glob"
1515
];
1616
model = {
17-
claude = "opus";
18-
copilot = "claude-opus-4.8";
17+
claude = "sonnet";
18+
copilot = "claude-sonnet-4.6";
1919
antigravity = "gemini-3.1-pro-preview";
2020
opencode = "openai/gpt-5.5";
2121
};

modules/common/ai-tools/base.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ Respond like smart caveman.
4242
subagents when tool support exists or context would pollute main thread.
4343
- Give subagents only task, paths, constraints, and exit criteria. Do not copy
4444
full conversation.
45-
- Prefer Claude Haiku/Sonnet or Codex/OpenCode `gpt-5.4-mini` /
46-
`gpt-5.3-codex-spark` for routine workers. Use stronger models only when
47-
ambiguity, risk, or reasoning depth justifies cost.
45+
- Prefer `gpt-5.4-mini` for robust unsupervised Codex/OpenCode exploration and
46+
test workers. Use `gpt-5.3-codex-spark` only for narrow deterministic tool
47+
runs, active latency-sensitive pairing, or quota backup. Use stronger models
48+
when ambiguity, risk, or reasoning depth justifies cost.
4849
- Use skills for durable workflows, MCP/live tools for external state, and
4950
one-shot commands for atomic prompts.
5051

modules/common/ai-tools/commands.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@ let
33
importedCommands = lib.importSubdirs ./commands { };
44
aiAgents = import ./agents.nix { inherit lib; };
55

6-
agentModels = lib.mapAttrs (_name: agent: agent.model) aiAgents.agents;
6+
agentModelDefaults = {
7+
explore = {
8+
claude = "haiku";
9+
copilot = "claude-haiku-4.5";
10+
antigravity = "gemini-3.1-flash-lite-preview";
11+
opencode = "openai/gpt-5.4-mini";
12+
};
13+
};
14+
15+
agentModels = agentModelDefaults // lib.mapAttrs (_name: agent: agent.model) aiAgents.agents;
716

817
commandAgents = {
918
analyze-git-history = "explore";

modules/home/programs/terminal/tools/codex/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let
4343

4444
# Cheapest local utility profile for triage and simple transforms.
4545
nano = {
46-
model = "gpt-5.4-nano";
46+
model = "gpt-5.4-mini";
4747
model_reasoning_effort = "none";
4848
model_verbosity = "low";
4949
plan_mode_reasoning_effort = "low";

modules/home/programs/terminal/tools/opencode/default.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ in
3737
refactorerModel = aiTools.agents.refactorer.model.opencode;
3838
in
3939
{
40-
opencode-coding = "opencode --model openai/gpt-5.3-codex-spark";
40+
opencode-coding = "opencode --model openai/gpt-5.4-mini";
4141
opencode-deep = "opencode --model ${refactorerModel}";
42-
opencode-nano = "opencode --model openai/gpt-5.4-nano";
42+
opencode-nano = "opencode --model openai/gpt-5.4-mini";
4343
opencode-research = "opencode --agent refactorer";
44+
opencode-spark = "opencode --model openai/gpt-5.3-codex-spark";
4445
}
4546
// lib.optionalAttrs config.services.exo.enable {
4647
opencode-exo = ''f(){ model="$1"; shift; opencode --model "exo/$model" "$@"; }; f'';
@@ -75,7 +76,7 @@ in
7576
model = refactorerModel;
7677
share = "manual";
7778
autoupdate = false;
78-
small_model = "openai/gpt-5.3-codex-spark";
79+
small_model = "openai/gpt-5.4-mini";
7980
default_agent = "refactorer";
8081
compaction = {
8182
auto = true;
@@ -96,7 +97,7 @@ in
9697
};
9798
nano = {
9899
template = "Keep each action minimal and targeted for small-surface modifications.";
99-
model = "openai/gpt-5.4-nano";
100+
model = "openai/gpt-5.4-mini";
100101
agent = "refactorer";
101102
subtask = true;
102103
};

modules/home/programs/terminal/tools/opencode/oh-my-openagent.nix

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,20 @@ in
3232
debuggerModel = aiTools.agents.debugger.model.opencode;
3333
refactorerModel = aiTools.agents.refactorer.model.opencode;
3434
testRunnerModel = aiTools.agents.test-runner.model.opencode;
35-
quickModel = "openai/gpt-5.3-codex-spark";
36-
nanoModel = "openai/gpt-5.4-nano";
35+
sparkModel = "openai/gpt-5.3-codex-spark";
36+
miniModel = "openai/gpt-5.4-mini";
3737
opencodeSkillsPath = toString config.programs.opencode.skills;
3838

3939
deliberateFallbackModels = [
4040
{
41-
model = "openai/gpt-5.3-codex";
41+
model = "openai/gpt-5.4";
4242
reasoningEffort = "high";
4343
}
4444
testRunnerModel
4545
];
4646

47-
fastFallbackModels = [
48-
quickModel
49-
nanoModel
47+
explorationFallbackModels = [
48+
sparkModel
5049
];
5150

5251
defaultConfig = {
@@ -74,20 +73,19 @@ in
7473
};
7574
explore = {
7675
model = testRunnerModel;
77-
fallback_models = fastFallbackModels;
76+
fallback_models = explorationFallbackModels;
7877
};
7978
librarian = {
8079
model = testRunnerModel;
81-
fallback_models = fastFallbackModels;
80+
fallback_models = explorationFallbackModels;
8281
};
8382
};
8483

8584
categories = {
8685
quick = {
87-
model = quickModel;
86+
model = sparkModel;
8887
fallback_models = [
89-
nanoModel
90-
testRunnerModel
88+
miniModel
9189
];
9290
description = "Fast, minimal edits and low-surface changes.";
9391
};
@@ -103,14 +101,13 @@ in
103101
};
104102
unspecified-low = {
105103
model = testRunnerModel;
106-
fallback_models = fastFallbackModels;
104+
fallback_models = explorationFallbackModels;
107105
description = "Cheaper general subtasks and verification work.";
108106
};
109107
writing = {
110108
model = testRunnerModel;
111109
fallback_models = [
112-
quickModel
113-
nanoModel
110+
sparkModel
114111
];
115112
description = "Documentation and prose-heavy tasks.";
116113
};

modules/home/programs/terminal/tools/pi-coding-agent/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ in
5656
".pi/agent/settings.json".text = builtins.toJSON (
5757
lib.recursiveUpdate {
5858
defaultProvider = "openai-codex";
59-
defaultModel = "gpt-5.3-codex-spark";
59+
defaultModel = "gpt-5.4-mini";
6060
defaultThinkingLevel = "high";
6161
enableInstallTelemetry = false;
6262
collapseChangelog = true;

modules/home/programs/terminal/tools/t3code/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ in
294294
provider = "codex";
295295
model = "gpt-5.4";
296296
}
297+
{
298+
provider = "codex";
299+
model = "gpt-5.4-mini";
300+
}
297301
{
298302
provider = "codex";
299303
model = "gpt-5.3-codex-spark";

0 commit comments

Comments
 (0)