Skip to content

Commit 55e00a8

Browse files
committed
fix(codex): default gpt-5.2-codex to xhigh and sync docs
1 parent 3c0c769 commit 55e00a8

7 files changed

Lines changed: 26 additions & 7 deletions

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ Heap-*.heapsnapshot
1515
.codex-cache
1616
.sisyphus/
1717
coverage/
18-
winston/
18+
winston/
19+
.tmp-plugin-test/
20+
.tmp-release-*.md
21+
task_plan.md
22+
findings.md
23+
progress.md

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ all notable changes to this project. dates are ISO format (YYYY-MM-DD).
1515
- **request correlation**: each upstream fetch now sets a correlation id, reuses `CODEX_THREAD_ID`/`prompt_cache_key` when available, and clears scope after each request.
1616
- **plan-mode tool gating**: `request_user_input` is automatically stripped from tool definitions when collaboration mode is Default (kept in Plan mode).
1717
- **safety prompt hardening**: bridge/remap prompts now explicitly block destructive git commands unless the user asks for them.
18+
- **gpt-5.2-codex default effort**: default reasoning now prefers `xhigh` when no explicit effort/variant is provided.
19+
- **gitignore hygiene**: local planning/release scratch artifacts are now ignored to keep working trees clean.
1820

1921
### fixed
2022

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ opencode run "Hello" --model=openai/gpt-5.2 --variant=medium
130130
| Model | Variants | Notes |
131131
|-------|----------|-------|
132132
| `gpt-5.2` | none, low, medium, high, xhigh | Latest GPT-5.2 with reasoning levels |
133-
| `gpt-5.2-codex` | low, medium, high, xhigh | GPT-5.2 Codex for code generation |
133+
| `gpt-5.2-codex` | low, medium, high, xhigh | GPT-5.2 Codex for code generation (default: xhigh) |
134134
| `gpt-5.1-codex-max` | low, medium, high, xhigh | Maximum context Codex |
135135
| `gpt-5.1-codex` | low, medium, high | Standard Codex |
136136
| `gpt-5.1-codex-mini` | medium, high | Lightweight Codex |
@@ -185,6 +185,10 @@ Add this to your `~/.config/opencode/opencode.json`:
185185
"medium": { "reasoningEffort": "medium" },
186186
"high": { "reasoningEffort": "high" },
187187
"xhigh": { "reasoningEffort": "xhigh" }
188+
},
189+
"options": {
190+
"reasoningEffort": "xhigh",
191+
"reasoningSummary": "detailed"
188192
}
189193
},
190194
"gpt-5.1-codex-max": {

config/opencode-modern.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@
9595
"reasoningSummary": "detailed",
9696
"textVerbosity": "medium"
9797
}
98+
},
99+
"options": {
100+
"reasoningEffort": "xhigh",
101+
"reasoningSummary": "detailed",
102+
"textVerbosity": "medium"
98103
}
99104
},
100105
"gpt-5.1-codex-max": {

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ controls how much thinking the model does.
3535
| model | supported values |
3636
|-------|------------------|
3737
| `gpt-5.2` | none, low, medium, high, xhigh |
38-
| `gpt-5.2-codex` | low, medium, high, xhigh |
38+
| `gpt-5.2-codex` | low, medium, high, xhigh (default: xhigh) |
3939
| `gpt-5.1-codex-max` | low, medium, high, xhigh |
4040
| `gpt-5.1-codex` | low, medium, high |
4141
| `gpt-5.1-codex-mini` | medium, high |

lib/request/request-transformer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,14 @@ export function getReasoningConfig(
317317
// - Codex models (including GPT-5.2 Codex) do NOT support "none"
318318
const supportsNone = isGpt52General || isGpt51General;
319319

320-
// Default based on model type (Codex CLI defaults)
320+
// Default based on model type (Codex CLI defaults + plugin opinionated tuning)
321321
// Note: OpenAI docs say gpt-5.1 defaults to "none", but we default to "medium"
322-
// for better coding assistance unless user explicitly requests "none"
322+
// for better coding assistance unless user explicitly requests "none".
323+
// GPT-5.2 Codex defaults to xhigh in this plugin for stronger coding output.
323324
const defaultEffort: ReasoningConfig["effort"] = isCodexMini
324325
? "medium"
326+
: isGpt52Codex
327+
? "xhigh"
325328
: supportsXhigh
326329
? "high"
327330
: isLightweight

test/request-transformer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,14 +896,14 @@ describe('Request Transformer Module', () => {
896896
expect(result.reasoning?.effort).toBe('high');
897897
});
898898

899-
it('should default gpt-5.2-codex to high effort', async () => {
899+
it('should default gpt-5.2-codex to xhigh effort', async () => {
900900
const body: RequestBody = {
901901
model: 'gpt-5.2-codex',
902902
input: [],
903903
};
904904
const result = await transformRequestBody(body, codexInstructions);
905905
expect(result.model).toBe('gpt-5.2-codex');
906-
expect(result.reasoning?.effort).toBe('high');
906+
expect(result.reasoning?.effort).toBe('xhigh');
907907
});
908908

909909
it('should preserve xhigh for codex-max when requested', async () => {

0 commit comments

Comments
 (0)