Skip to content

Commit d318c82

Browse files
committed
Merge branch 'pr-83-release-validate' into release/pr83-validate
2 parents 05109fa + bac0cd5 commit d318c82

11 files changed

Lines changed: 741 additions & 208 deletions

config/opencode-legacy.json

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,131 @@
140140
"store": false
141141
}
142142
},
143+
"gpt-5.4-mini-none": {
144+
"name": "GPT 5.4 Mini None (OAuth)",
145+
"limit": {
146+
"context": 1000000,
147+
"output": 128000
148+
},
149+
"modalities": {
150+
"input": [
151+
"text",
152+
"image"
153+
],
154+
"output": [
155+
"text"
156+
]
157+
},
158+
"options": {
159+
"reasoningEffort": "none",
160+
"reasoningSummary": "auto",
161+
"textVerbosity": "medium",
162+
"include": [
163+
"reasoning.encrypted_content"
164+
],
165+
"store": false
166+
}
167+
},
168+
"gpt-5.4-mini-low": {
169+
"name": "GPT 5.4 Mini Low (OAuth)",
170+
"limit": {
171+
"context": 1000000,
172+
"output": 128000
173+
},
174+
"modalities": {
175+
"input": [
176+
"text",
177+
"image"
178+
],
179+
"output": [
180+
"text"
181+
]
182+
},
183+
"options": {
184+
"reasoningEffort": "low",
185+
"reasoningSummary": "auto",
186+
"textVerbosity": "medium",
187+
"include": [
188+
"reasoning.encrypted_content"
189+
],
190+
"store": false
191+
}
192+
},
193+
"gpt-5.4-mini-medium": {
194+
"name": "GPT 5.4 Mini Medium (OAuth)",
195+
"limit": {
196+
"context": 1000000,
197+
"output": 128000
198+
},
199+
"modalities": {
200+
"input": [
201+
"text",
202+
"image"
203+
],
204+
"output": [
205+
"text"
206+
]
207+
},
208+
"options": {
209+
"reasoningEffort": "medium",
210+
"reasoningSummary": "auto",
211+
"textVerbosity": "medium",
212+
"include": [
213+
"reasoning.encrypted_content"
214+
],
215+
"store": false
216+
}
217+
},
218+
"gpt-5.4-mini-high": {
219+
"name": "GPT 5.4 Mini High (OAuth)",
220+
"limit": {
221+
"context": 1000000,
222+
"output": 128000
223+
},
224+
"modalities": {
225+
"input": [
226+
"text",
227+
"image"
228+
],
229+
"output": [
230+
"text"
231+
]
232+
},
233+
"options": {
234+
"reasoningEffort": "high",
235+
"reasoningSummary": "detailed",
236+
"textVerbosity": "medium",
237+
"include": [
238+
"reasoning.encrypted_content"
239+
],
240+
"store": false
241+
}
242+
},
243+
"gpt-5.4-mini-xhigh": {
244+
"name": "GPT 5.4 Mini Extra High (OAuth)",
245+
"limit": {
246+
"context": 1000000,
247+
"output": 128000
248+
},
249+
"modalities": {
250+
"input": [
251+
"text",
252+
"image"
253+
],
254+
"output": [
255+
"text"
256+
]
257+
},
258+
"options": {
259+
"reasoningEffort": "xhigh",
260+
"reasoningSummary": "detailed",
261+
"textVerbosity": "medium",
262+
"include": [
263+
"reasoning.encrypted_content"
264+
],
265+
"store": false
266+
}
267+
},
143268
"gpt-5.1-codex-max-low": {
144269
"name": "GPT 5.1 Codex Max Low (OAuth)",
145270
"limit": {

config/opencode-modern.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,49 @@
5858
}
5959
}
6060
},
61+
"gpt-5.4-mini": {
62+
"name": "GPT 5.4 Mini (OAuth)",
63+
"limit": {
64+
"context": 1000000,
65+
"output": 128000
66+
},
67+
"modalities": {
68+
"input": [
69+
"text",
70+
"image"
71+
],
72+
"output": [
73+
"text"
74+
]
75+
},
76+
"variants": {
77+
"none": {
78+
"reasoningEffort": "none",
79+
"reasoningSummary": "auto",
80+
"textVerbosity": "medium"
81+
},
82+
"low": {
83+
"reasoningEffort": "low",
84+
"reasoningSummary": "auto",
85+
"textVerbosity": "medium"
86+
},
87+
"medium": {
88+
"reasoningEffort": "medium",
89+
"reasoningSummary": "auto",
90+
"textVerbosity": "medium"
91+
},
92+
"high": {
93+
"reasoningEffort": "high",
94+
"reasoningSummary": "detailed",
95+
"textVerbosity": "medium"
96+
},
97+
"xhigh": {
98+
"reasoningEffort": "xhigh",
99+
"reasoningSummary": "detailed",
100+
"textVerbosity": "medium"
101+
}
102+
}
103+
},
61104
"gpt-5.1-codex-max": {
62105
"name": "GPT 5.1 Codex Max (OAuth)",
63106
"limit": {

docs/configuration.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ controls how much thinking the model does.
3535
| model | supported values |
3636
|-------|------------------|
3737
| `gpt-5.4` | none, low, medium, high, xhigh |
38+
| `gpt-5.4-mini` | none, low, medium, high, xhigh |
3839
| `gpt-5.4-pro` | low, medium, high, xhigh (optional/manual model) |
3940
| `gpt-5-codex` | low, medium, high (default: high) |
4041
| `gpt-5.3-codex` | low, medium, high, xhigh (legacy alias to `gpt-5-codex`) |
@@ -47,12 +48,12 @@ controls how much thinking the model does.
4748

4849
the shipped config templates include 21 presets and do not add optional IDs by default. add `gpt-5.4-pro` and/or `gpt-5.3-codex-spark` manually only for entitled workspaces.
4950
for context sizing, shipped templates use:
50-
- `gpt-5.4` and `gpt-5.4-pro`: `context=1000000`, `output=128000`
51+
- `gpt-5.4`, `gpt-5.4-mini`, and `gpt-5.4-pro`: `context=1000000`, `output=128000`
5152
- other shipped families: `context=272000`, `output=128000`
5253

5354
model normalization aliases:
54-
- legacy `gpt-5`, `gpt-5-mini`, `gpt-5-nano` map to `gpt-5.4`
55-
- snapshot ids `gpt-5.4-2026-03-05*` and `gpt-5.4-pro-2026-03-05*` map to stable `gpt-5.4` / `gpt-5.4-pro`
55+
- legacy `gpt-5`, `gpt-5-mini`, `gpt-5-nano` map to `gpt-5.4` (not to `gpt-5.4-mini`)
56+
- snapshot ids `gpt-5.4-2026-03-05*`, `gpt-5.4-mini-2026-03-05*`, and `gpt-5.4-pro-2026-03-05*` map to stable `gpt-5.4` / `gpt-5.4-mini` / `gpt-5.4-pro`
5657

5758
if your OpenCode runtime supports global compaction tuning, you can set:
5859
- `model_context_window = 1000000`

lib/prompts/codex.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export type ModelFamily =
4949
| "codex-max"
5050
| "codex"
5151
| "gpt-5.4"
52+
| "gpt-5.4-mini"
5253
| "gpt-5.4-pro"
5354
| "gpt-5.2"
5455
| "gpt-5.1";
@@ -62,6 +63,7 @@ export const MODEL_FAMILIES: readonly ModelFamily[] = [
6263
"codex-max",
6364
"codex",
6465
"gpt-5.4",
66+
"gpt-5.4-mini",
6567
"gpt-5.4-pro",
6668
"gpt-5.2",
6769
"gpt-5.1",
@@ -77,6 +79,8 @@ const PROMPT_FILES: Record<ModelFamily, string> = {
7779
codex: "gpt_5_codex_prompt.md",
7880
// As of Codex rust-v0.111.0, GPT-5.4 uses the same prompt file family as GPT-5.2.
7981
"gpt-5.4": "gpt_5_2_prompt.md",
82+
// GPT-5.4-mini uses the same core prompt file as GPT-5.4, but keeps isolated cache/family state.
83+
"gpt-5.4-mini": "gpt_5_2_prompt.md",
8084
// GPT-5.4-pro uses the same core prompt file as GPT-5.4, but keeps isolated cache/family state.
8185
"gpt-5.4-pro": "gpt_5_2_prompt.md",
8286
"gpt-5.2": "gpt_5_2_prompt.md",
@@ -91,6 +95,7 @@ const CACHE_FILES: Record<ModelFamily, string> = {
9195
"codex-max": "codex-max-instructions.md",
9296
codex: "codex-instructions.md",
9397
"gpt-5.4": "gpt-5.4-instructions.md",
98+
"gpt-5.4-mini": "gpt-5.4-mini-instructions.md",
9499
"gpt-5.4-pro": "gpt-5.4-pro-instructions.md",
95100
"gpt-5.2": "gpt-5.2-instructions.md",
96101
"gpt-5.1": "gpt-5.1-instructions.md",
@@ -128,6 +133,9 @@ export function getModelFamily(normalizedModel: string): ModelFamily {
128133
if (/\bgpt(?:-| )5\.4(?:-| )pro(?:\b|[- ])/i.test(normalizedModel)) {
129134
return "gpt-5.4-pro";
130135
}
136+
if (/\bgpt(?:-| )5\.4(?:-| )mini(?:\b|[- ])/i.test(normalizedModel)) {
137+
return "gpt-5.4-mini";
138+
}
131139
if (/\bgpt(?:-| )5\.4(?:\b|[- ])/i.test(normalizedModel)) {
132140
return "gpt-5.4";
133141
}
@@ -412,7 +420,7 @@ function refreshInstructionsInBackground(
412420
* Prewarm instruction caches for the provided models/families.
413421
*/
414422
export function prewarmCodexInstructions(models: string[] = []): void {
415-
const candidates = models.length > 0 ? models : ["gpt-5-codex", "gpt-5.4", "gpt-5.4-pro", "gpt-5.2", "gpt-5.1"];
423+
const candidates = models.length > 0 ? models : ["gpt-5-codex", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-pro", "gpt-5.2", "gpt-5.1"];
416424
for (const model of candidates) {
417425
void getCodexInstructions(model).catch((error) => {
418426
logDebug("Codex instruction prewarm failed", {

lib/request/helpers/model-map.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ export const MODEL_MAP: Record<string, string> = {
9696
"gpt-5.4-pro-xhigh": "gpt-5.4-pro",
9797
...expandDatedAliases(`gpt-5.4-pro-${GPT_54_SNAPSHOT_DATE}`, "gpt-5.4-pro"),
9898

99+
// ============================================================================
100+
// GPT-5.4 Mini Models (latest efficient family)
101+
// ============================================================================
102+
"gpt-5.4-mini": "gpt-5.4-mini",
103+
"gpt-5.4-mini-none": "gpt-5.4-mini",
104+
"gpt-5.4-mini-low": "gpt-5.4-mini",
105+
"gpt-5.4-mini-medium": "gpt-5.4-mini",
106+
"gpt-5.4-mini-high": "gpt-5.4-mini",
107+
"gpt-5.4-mini-xhigh": "gpt-5.4-mini",
108+
...expandDatedAliases(`gpt-5.4-mini-${GPT_54_SNAPSHOT_DATE}`, "gpt-5.4-mini"),
109+
99110
// ============================================================================
100111
// GPT-5.2 Models (supports none/low/medium/high/xhigh per OpenAI API docs)
101112
// ============================================================================

0 commit comments

Comments
 (0)