@in-the-loop-labs/pair-review 5.4.2 → 5.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/plugin/.claude-plugin/plugin.json +1 -1
  4. package/plugin-code-critic/.claude-plugin/plugin.json +1 -1
  5. package/plugin-code-critic/skills/analyze/references/level1-balanced.md +1 -1
  6. package/plugin-code-critic/skills/analyze/references/level1-thorough.md +1 -1
  7. package/plugin-code-critic/skills/analyze/references/level2-balanced.md +2 -2
  8. package/plugin-code-critic/skills/analyze/references/level2-thorough.md +2 -2
  9. package/plugin-code-critic/skills/analyze/references/level3-balanced.md +2 -2
  10. package/plugin-code-critic/skills/analyze/references/level3-thorough.md +2 -2
  11. package/plugin-code-critic/skills/analyze/references/orchestration-balanced.md +3 -3
  12. package/plugin-code-critic/skills/analyze/references/orchestration-fast.md +1 -1
  13. package/plugin-code-critic/skills/analyze/references/orchestration-thorough.md +3 -3
  14. package/plugin-pair-loop/.claude-plugin/plugin.json +1 -1
  15. package/public/css/pr.css +0 -108
  16. package/public/css/toast.css +147 -0
  17. package/public/index.html +1 -0
  18. package/public/js/components/CouncilProgressModal.js +2 -9
  19. package/public/js/components/Toast.js +39 -4
  20. package/public/js/pr.js +21 -8
  21. package/public/js/utils/category-emoji.js +1 -1
  22. package/public/js/utils/header-anchor.js +38 -0
  23. package/public/local.html +4 -0
  24. package/public/pr.html +4 -0
  25. package/src/ai/antigravity-provider.js +57 -7
  26. package/src/ai/codex-provider.js +65 -17
  27. package/src/ai/executable-provider.js +1 -1
  28. package/src/ai/pi-format.js +42 -1
  29. package/src/ai/pi-style-provider.js +25 -10
  30. package/src/ai/prompts/baseline/consolidation/balanced.js +2 -2
  31. package/src/ai/prompts/baseline/consolidation/thorough.js +2 -2
  32. package/src/ai/prompts/baseline/level1/balanced.js +1 -1
  33. package/src/ai/prompts/baseline/level1/thorough.js +1 -1
  34. package/src/ai/prompts/baseline/level2/balanced.js +2 -2
  35. package/src/ai/prompts/baseline/level2/thorough.js +2 -2
  36. package/src/ai/prompts/baseline/level3/balanced.js +2 -2
  37. package/src/ai/prompts/baseline/level3/thorough.js +2 -2
  38. package/src/ai/prompts/baseline/orchestration/balanced.js +2 -2
  39. package/src/ai/prompts/baseline/orchestration/thorough.js +2 -2
  40. package/src/ai/prompts/shared/output-schema.js +6 -201
  41. package/src/utils/category-emoji.js +1 -1
package/public/js/pr.js CHANGED
@@ -5155,8 +5155,10 @@ class PRManager {
5155
5155
  wrapper.classList.remove('collapsed');
5156
5156
  this.collapsedFiles.delete(filePath);
5157
5157
  } else {
5158
- wrapper.classList.add('collapsed');
5159
- this.collapsedFiles.add(filePath);
5158
+ window.HeaderAnchor.keepHeaderInPlace(header, () => {
5159
+ wrapper.classList.add('collapsed');
5160
+ this.collapsedFiles.add(filePath);
5161
+ });
5160
5162
  }
5161
5163
 
5162
5164
  // Update header state
@@ -5182,9 +5184,11 @@ class PRManager {
5182
5184
  this.viewedFiles.add(filePath);
5183
5185
  // Auto-collapse when marking as viewed
5184
5186
  if (wrapper && !wrapper.classList.contains('collapsed')) {
5185
- wrapper.classList.add('collapsed');
5186
- this.collapsedFiles.add(filePath);
5187
5187
  const header = wrapper.querySelector('.d2h-file-header');
5188
+ window.HeaderAnchor.keepHeaderInPlace(header, () => {
5189
+ wrapper.classList.add('collapsed');
5190
+ this.collapsedFiles.add(filePath);
5191
+ });
5188
5192
  if (header) {
5189
5193
  window.DiffRenderer.updateFileHeaderState(header, false);
5190
5194
  }
@@ -5257,14 +5261,21 @@ class PRManager {
5257
5261
  if (!wrapper) return;
5258
5262
 
5259
5263
  const key = this._contextStateKey(filePath);
5260
- const collapsed = wrapper.classList.toggle('collapsed');
5264
+ const header = wrapper.querySelector('.d2h-file-header');
5265
+ const collapsed = !wrapper.classList.contains('collapsed');
5261
5266
  if (collapsed) {
5267
+ window.HeaderAnchor.keepHeaderInPlace(header, () => {
5268
+ wrapper.classList.add('collapsed');
5269
+ });
5262
5270
  this.collapsedFiles.add(key);
5263
5271
  } else {
5272
+ // Not anchored: a collapsed header partly under the sticky toolbar
5273
+ // drops to the sticky line on expand, and compensating for that would
5274
+ // push the top of the newly revealed body up under it.
5275
+ wrapper.classList.remove('collapsed');
5264
5276
  this.collapsedFiles.delete(key);
5265
5277
  }
5266
5278
 
5267
- const header = wrapper.querySelector('.d2h-file-header');
5268
5279
  if (header) {
5269
5280
  window.DiffRenderer.updateFileHeaderState(header, !collapsed);
5270
5281
  }
@@ -5286,8 +5297,10 @@ class PRManager {
5286
5297
  this.viewedFiles.add(key);
5287
5298
  // Auto-collapse when marking as viewed
5288
5299
  if (wrapper && !wrapper.classList.contains('collapsed')) {
5289
- wrapper.classList.add('collapsed');
5290
- this.collapsedFiles.add(key);
5300
+ window.HeaderAnchor.keepHeaderInPlace(header, () => {
5301
+ wrapper.classList.add('collapsed');
5302
+ this.collapsedFiles.add(key);
5303
+ });
5291
5304
  if (header) {
5292
5305
  window.DiffRenderer.updateFileHeaderState(header, false);
5293
5306
  }
@@ -3,7 +3,7 @@
3
3
  * Canonical category-to-emoji mapping for AI suggestion types.
4
4
  * Used by SuggestionManager and FileCommentManager to format adopted comments.
5
5
  *
6
- * Canonical types from src/ai/prompts/shared/output-schema.js:
6
+ * Canonical types from the output-schema sections in src/ai/prompts/baseline/:
7
7
  * bug|improvement|praise|suggestion|design|performance|security|code-style
8
8
  */
9
9
 
@@ -0,0 +1,38 @@
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * Keeps a file header at the same viewport position across a synchronous
4
+ * change that resizes its file, such as collapsing it.
5
+ *
6
+ * A header stuck to the top of the diff pane belongs to a file the reader is
7
+ * partway through. Collapsing that file shrinks it to just the header, which
8
+ * would leave the header far above the viewport. Scrolling the pane by however
9
+ * far the header moved puts the collapsed header back where it was stuck, with
10
+ * the next file directly below it. A header that wasn't stuck doesn't move, so
11
+ * nothing scrolls.
12
+ *
13
+ * @param {Element|null} header - The file header to hold in place
14
+ * @param {() => T} change - Synchronous change that resizes the header's file
15
+ * @returns {T} the change's return value
16
+ * @template T
17
+ */
18
+ function keepHeaderInPlace(header, change) {
19
+ if (!header) return change();
20
+
21
+ const topBefore = header.getBoundingClientRect().top;
22
+ const result = change();
23
+ const shift = header.getBoundingClientRect().top - topBefore;
24
+
25
+ if (shift !== 0) {
26
+ header.closest('.diff-view')?.scrollBy(0, shift);
27
+ }
28
+
29
+ return result;
30
+ }
31
+
32
+ if (typeof window !== 'undefined') {
33
+ window.HeaderAnchor = { keepHeaderInPlace };
34
+ }
35
+
36
+ if (typeof module !== 'undefined' && module.exports) {
37
+ module.exports = { keepHeaderInPlace };
38
+ }
package/public/local.html CHANGED
@@ -33,6 +33,7 @@
33
33
  <link rel="stylesheet" href="/css/pr.css">
34
34
  <link rel="stylesheet" href="/css/ai-summary-modal.css">
35
35
  <link rel="stylesheet" href="/css/analysis-config.css">
36
+ <link rel="stylesheet" href="/css/toast.css">
36
37
  <link rel="stylesheet" href="/css/snippet-manager.css">
37
38
  <link rel="stylesheet" href="/css/styles.css">
38
39
 
@@ -608,6 +609,9 @@
608
609
  <!-- Stable scroll-into-view for lazily rendered diff bodies -->
609
610
  <script src="/js/utils/scroll-into-view.js"></script>
610
611
 
612
+ <!-- Holds a file header in place when its file collapses -->
613
+ <script src="/js/utils/header-anchor.js"></script>
614
+
611
615
  <!-- WebSocket client -->
612
616
  <script src="/js/ws-client.js"></script>
613
617
 
package/public/pr.html CHANGED
@@ -41,6 +41,7 @@
41
41
  <link rel="stylesheet" href="/css/pr.css">
42
42
  <link rel="stylesheet" href="/css/ai-summary-modal.css">
43
43
  <link rel="stylesheet" href="/css/analysis-config.css">
44
+ <link rel="stylesheet" href="/css/toast.css">
44
45
  <link rel="stylesheet" href="/css/snippet-manager.css">
45
46
  <link rel="stylesheet" href="/css/styles.css">
46
47
 
@@ -413,6 +414,9 @@
413
414
  <!-- Stable scroll-into-view for lazily rendered diff bodies -->
414
415
  <script src="/js/utils/scroll-into-view.js"></script>
415
416
 
417
+ <!-- Holds a file header in place when its file collapses -->
418
+ <script src="/js/utils/header-anchor.js"></script>
419
+
416
420
  <!-- WebSocket client -->
417
421
  <script src="/js/ws-client.js"></script>
418
422
 
@@ -6,7 +6,7 @@
6
6
  * the official successor to the Gemini CLI.
7
7
  *
8
8
  * ============================================================================
9
- * HOW THIS ADAPTER DRIVES `agy` (verified against agy 1.0.16; models re-verified against 1.5.7)
9
+ * HOW THIS ADAPTER DRIVES `agy` (verified against agy 1.0.16; models re-verified against 1.5.12)
10
10
  * ============================================================================
11
11
  * The Antigravity CLI's non-interactive "print" mode (`agy -p`) IS a real
12
12
  * agentic loop — it reads files, searches the tree, and runs shell commands to
@@ -96,7 +96,8 @@ const TIMEOUT_BACKSTOP_GRACE_MS = 15000;
96
96
  * fast, matching the other providers' pickers. Every built-in passes an
97
97
  * effort-suffixed display name (`Gemini 4 Argon (High)`): as of agy 1.5.7 a
98
98
  * bare display name is "not recognized", and a bare slug resolves to the
99
- * server-default effort (Medium for Argon), so effort stays in the `cliName`.
99
+ * server-default effort (Medium for Argon, High for Neon), so effort stays in
100
+ * the `cliName`.
100
101
  *
101
102
  * Gemini 3.8 Flash at high effort stays the default: it is the strongest
102
103
  * Gemini every agy plan can run (DeepSWE v1.1 73.7, Terminal-Bench 2.1 89.4),
@@ -106,6 +107,18 @@ const TIMEOUT_BACKSTOP_GRACE_MS = 15000;
106
107
  * that tier here, and getFastTierModel() picks the first `tier: 'fast'` model
107
108
  * for JSON extraction, so each tier must be LED by a model every plan can run.
108
109
  *
110
+ * Gemini 4 Neon (GA 2026-11-18) is the mid-tier Gemini 4 model, adapted from
111
+ * Carbon: "Carbon tackles your hardest, long-horizon projects and Hydrogen
112
+ * handles fast everyday execution, Neon balances depth and efficiency."
113
+ * Terminal-Bench 4.1 65.2 (Hydrogen 57.0, 3.8 Flash 18.2); default effort
114
+ * High, with XHigh available. It is an explicit choice, not the default or a
115
+ * tier leader: at $3/$15 per 1M tokens it costs four times 3.8 Flash and
116
+ * twice Hydrogen, has no API free tier, and is rolling out to paid Google AI
117
+ * Pro, Ultra, Gemini Enterprise, and `GEMINI_API_KEY` sign-ins only. agy
118
+ * resolves the bare `gemini-4-neon` slug to High, so that id is an alias of
119
+ * the High entry. Antigravity made Neon its own default for new conversations;
120
+ * pair-review keeps 3.8 Flash because every plan can run it.
121
+ *
109
122
  * Gemini 4 Hydrogen (GA 2026-11-12) is the everyday Gemini 4 model and 3.8
110
123
  * Flash's successor (Terminal-Bench 4.1 57.0 vs 18.2; xhigh is a new level).
111
124
  * It is an explicit choice, not the default: at $1.50/$7.50 per 1M tokens it
@@ -119,9 +132,14 @@ const TIMEOUT_BACKSTOP_GRACE_MS = 15000;
119
132
  * High, which is exactly what `gemini-4-argon-high` now runs.
120
133
  *
121
134
  * Gemini 4 Carbon (Ultra / Enterprise only) is not built in: agy offers it
122
- * only to Application Default Credentials sign-ins (`AGY_ADC_AUTH`), and a
123
- * Google-account sign-in reports it as "not recognized". Reach it via a
124
- * `providers.antigravity.models` config override with `cli_model`.
135
+ * only to Application Default Credentials (`AGY_ADC_AUTH`) and `GEMINI_API_KEY`
136
+ * sign-ins, and a Google-account sign-in reports it as "not recognized". Reach
137
+ * it via a `providers.antigravity.models` config override with `cli_model`.
138
+ *
139
+ * The Orchestrator entries (`gemini-pro-orchestrator-neon`, `-g1-pro` for
140
+ * Argon, and Carbon) are not built in either: each pairs a planner with
141
+ * Gemini 4 Hydrogen as the implementer at a fixed effort, a split built for
142
+ * editing code, not for a read-only review pass.
125
143
  *
126
144
  * Deprecated: gemini-3.1-pro-high, gemini-3.1-pro-low (alias gemini-3.1-pro) —
127
145
  * agy no longer offers 3.1 Pro outside Enterprise ("not recognized as a known
@@ -132,7 +150,7 @@ const TIMEOUT_BACKSTOP_GRACE_MS = 15000;
132
150
  * an unknown-model error. Retired 3.5 Flash ids are aliases of their 3.8 Flash
133
151
  * counterparts at the same effort, so saved selections keep working.
134
152
  *
135
- * `agy` also exposes Claude and GPT-OSS models; those remain reachable via a
153
+ * `agy` also exposes Claude (Opus 5.5, Sonnet 5.5) and GPT-OSS models; those remain reachable via a
136
154
  * `providers.antigravity.models` config override but are intentionally left
137
155
  * out of the default picker to keep the cross-provider model-mismatch guard
138
156
  * and the UX unambiguous.
@@ -151,6 +169,28 @@ const ANTIGRAVITY_MODELS = [
151
169
  badgeClass: 'badge-recommended',
152
170
  default: true
153
171
  },
172
+ {
173
+ id: 'gemini-4-neon-xhigh',
174
+ cliName: 'Gemini 4 Neon (XHigh)',
175
+ name: '4 Neon (XHigh)',
176
+ tier: 'thorough',
177
+ tagline: 'Deepest Review — Paid Plan',
178
+ description: 'Gemini 4 Neon (Nov 2026), Google\'s mid-tier model adapted from Gemini 4 Carbon, at extra-high effort — Terminal-Bench 4.1 65.2 vs Hydrogen\'s 57.0. $3/$15 per 1M tokens, four times 3.8 Flash; rolling out to paid Google AI Pro, Ultra, and Gemini Enterprise plans and paid API keys. Uses the thorough prompt set.',
179
+ badge: 'Newest',
180
+ badgeClass: 'badge-power'
181
+ },
182
+ {
183
+ id: 'gemini-4-neon-high',
184
+ cliName: 'Gemini 4 Neon (High)',
185
+ // agy resolves the bare `gemini-4-neon` slug to High.
186
+ aliases: ['gemini-4-neon'],
187
+ name: '4 Neon (High)',
188
+ tier: 'thorough',
189
+ tagline: 'Deep Review — Paid Plan',
190
+ description: 'Gemini 4 Neon at its default high effort, which balances depth and efficiency between Hydrogen and Carbon. $3/$15 per 1M tokens; rolling out to paid Google AI Pro, Ultra, and Gemini Enterprise plans and paid API keys. Uses the thorough prompt set.',
191
+ badge: 'Paid Plan',
192
+ badgeClass: 'badge-power'
193
+ },
154
194
  {
155
195
  id: 'gemini-4-hydrogen-xhigh',
156
196
  cliName: 'Gemini 4 Hydrogen (XHigh)',
@@ -158,7 +198,7 @@ const ANTIGRAVITY_MODELS = [
158
198
  tier: 'thorough',
159
199
  tagline: 'Deepest Everyday Review',
160
200
  description: 'Gemini 4 Hydrogen (Nov 2026), the 3.8 Flash successor, at its new extra-high effort — Terminal-Bench 4.1 57.0 vs 3.8 Flash\'s 18.2. $1.50/$7.50 per 1M tokens, twice 3.8 Flash; rolling out to paid Google AI Pro and Ultra plans first. Uses the thorough prompt set.',
161
- badge: 'Newest',
201
+ badge: 'XHigh Effort',
162
202
  badgeClass: 'badge-power'
163
203
  },
164
204
  {
@@ -204,6 +244,16 @@ const ANTIGRAVITY_MODELS = [
204
244
  badge: 'Medium Effort',
205
245
  badgeClass: 'badge-balanced'
206
246
  },
247
+ {
248
+ id: 'gemini-4-neon-medium',
249
+ cliName: 'Gemini 4 Neon (Medium)',
250
+ name: '4 Neon (Medium)',
251
+ tier: 'balanced',
252
+ tagline: 'Deeper Standard Review',
253
+ description: 'Gemini 4 Neon at medium effort — more depth than Hydrogen for routine PRs. $3/$15 per 1M tokens, four times 3.8 Flash; rolling out to paid Google AI Pro, Ultra, and Gemini Enterprise plans and paid API keys.',
254
+ badge: 'Paid Plan',
255
+ badgeClass: 'badge-balanced'
256
+ },
207
257
  {
208
258
  id: 'gemini-3.8-flash-low',
209
259
  cliName: 'Gemini 3.8 Flash (Low)',
@@ -27,9 +27,13 @@ const BIN_DIR = path.join(__dirname, '..', '..', 'bin');
27
27
  * GPT-6.1 Terra (2026-10-26, $1/$5 per 1M tokens, Codex CLI >= 0.159.0) runs on
28
28
  * Plus, Pro, Business, Enterprise, and Edu, with Enterprise access subject to
29
29
  * workspace availability and administrator controls.
30
+ * GPT-6.2 Sol and GPT-6.2 Astra (2026-11-17; Sol $2/$10, Astra $8/$40 per 1M
31
+ * tokens; Codex CLI >= 0.170.0, which older CLIs reject as model_not_found) run
32
+ * on Plus, Pro, Enterprise, and Edu, with Enterprise and Edu off by default
33
+ * until an administrator enables them.
30
34
  * Selecting a model locally does not grant access. testAvailability() checks
31
35
  * only `codex --version`, and model rejection does not trigger a fallback,
32
- * so GPT-6 and GPT-6.1 remain explicit choices.
36
+ * so GPT-6, GPT-6.1, and GPT-6.2 remain explicit choices.
33
37
  * Each picker entry specifies a reasoning effort explicitly.
34
38
  *
35
39
  * Entries are ordered thorough → balanced → fast. The first balanced entry
@@ -64,15 +68,59 @@ const BIN_DIR = path.join(__dirname, '..', '..', 'bin');
64
68
  */
65
69
  const CODEX_MODELS = [
66
70
  // ── Thorough tier ───────────────────────────────────────────────────────
71
+ {
72
+ id: 'gpt-6.2-sol-high',
73
+ cli_model: 'gpt-6.2-sol',
74
+ extra_args: ['-c', 'model_reasoning_effort="high"'],
75
+ name: 'GPT-6.2 Sol High',
76
+ tier: 'thorough',
77
+ tagline: 'Latest Workhorse',
78
+ description: 'Latest workhorse model for coding and everyday work, with high reasoning effort for demanding reviews and cross-file analysis. Requires GPT-6.2 Sol access and Codex CLI 0.170.0 or later; Enterprise and Edu administrators must enable it during rollout.',
79
+ badge: 'Newest',
80
+ badgeClass: 'badge-power'
81
+ },
82
+ {
83
+ id: 'gpt-6.2-sol-xhigh',
84
+ cli_model: 'gpt-6.2-sol',
85
+ extra_args: ['-c', 'model_reasoning_effort="xhigh"'],
86
+ name: 'GPT-6.2 Sol XHigh',
87
+ tier: 'thorough',
88
+ tagline: 'Latest Workhorse Depth',
89
+ description: 'Latest workhorse model for coding and everyday work, with extra-high reasoning effort for difficult architectural reviews, subtle regressions, and security-sensitive changes. Requires GPT-6.2 Sol access and Codex CLI 0.170.0 or later; Enterprise and Edu administrators must enable it during rollout.',
90
+ badge: 'Extra High',
91
+ badgeClass: 'badge-power'
92
+ },
93
+ {
94
+ id: 'gpt-6.2-astra-high',
95
+ cli_model: 'gpt-6.2-astra',
96
+ extra_args: ['-c', 'model_reasoning_effort="high"'],
97
+ name: 'GPT-6.2 Astra High',
98
+ tier: 'thorough',
99
+ tagline: 'Most Capable',
100
+ description: 'Frontier intelligence for the most demanding coding and professional work, with high reasoning effort for deep cross-file analysis and demanding architectural reviews. Requires GPT-6.2 Astra access and Codex CLI 0.170.0 or later; Enterprise and Edu administrators must enable it during rollout.',
101
+ badge: 'Most Capable',
102
+ badgeClass: 'badge-power'
103
+ },
104
+ {
105
+ id: 'gpt-6.2-astra-xhigh',
106
+ cli_model: 'gpt-6.2-astra',
107
+ extra_args: ['-c', 'model_reasoning_effort="xhigh"'],
108
+ name: 'GPT-6.2 Astra XHigh',
109
+ tier: 'thorough',
110
+ tagline: 'Maximum Depth',
111
+ description: 'Frontier intelligence for the most demanding coding and professional work, with extra-high reasoning effort for concurrency, security-sensitive changes, and large codebase context. Requires GPT-6.2 Astra access and Codex CLI 0.170.0 or later; Enterprise and Edu administrators must enable it during rollout.',
112
+ badge: 'Extra High',
113
+ badgeClass: 'badge-power'
114
+ },
67
115
  {
68
116
  id: 'gpt-6.1-sol-high',
69
117
  cli_model: 'gpt-6.1-sol',
70
118
  extra_args: ['-c', 'model_reasoning_effort="high"'],
71
119
  name: 'GPT-6.1 Sol High',
72
120
  tier: 'thorough',
73
- tagline: 'Latest Workhorse',
74
- description: 'Latest workhorse model for coding and everyday work, with high reasoning effort for demanding reviews and cross-file analysis. Requires GPT-6.1 Sol access; Enterprise and Edu administrators must enable it during rollout.',
75
- badge: 'Newest',
121
+ tagline: 'Previous Workhorse',
122
+ description: 'Previous generation workhorse model for coding and everyday work, with high reasoning effort for demanding reviews and cross-file analysis. Requires GPT-6.1 Sol access; Enterprise and Edu administrators must enable it during rollout.',
123
+ badge: 'Previous Gen',
76
124
  badgeClass: 'badge-power'
77
125
  },
78
126
  {
@@ -81,8 +129,8 @@ const CODEX_MODELS = [
81
129
  extra_args: ['-c', 'model_reasoning_effort="xhigh"'],
82
130
  name: 'GPT-6.1 Sol XHigh',
83
131
  tier: 'thorough',
84
- tagline: 'Latest Workhorse Depth',
85
- description: 'Latest workhorse model for coding and everyday work, with extra-high reasoning effort for difficult architectural reviews, subtle regressions, and security-sensitive changes. Requires GPT-6.1 Sol access; Enterprise and Edu administrators must enable it during rollout.',
132
+ tagline: 'Previous Workhorse Depth',
133
+ description: 'Previous generation workhorse model for coding and everyday work, with extra-high reasoning effort for difficult architectural reviews, subtle regressions, and security-sensitive changes. Requires GPT-6.1 Sol access; Enterprise and Edu administrators must enable it during rollout.',
86
134
  badge: 'Extra High',
87
135
  badgeClass: 'badge-power'
88
136
  },
@@ -92,9 +140,9 @@ const CODEX_MODELS = [
92
140
  extra_args: ['-c', 'model_reasoning_effort="high"'],
93
141
  name: 'GPT-6 Astra High',
94
142
  tier: 'thorough',
95
- tagline: 'Most Capable',
96
- description: 'Frontier intelligence for the most demanding work, with high reasoning effort for deep cross-file analysis and demanding architectural reviews.',
97
- badge: 'Most Capable',
143
+ tagline: 'Previous Gen',
144
+ description: 'Previous generation frontier model for the most demanding work, with high reasoning effort for deep cross-file analysis and demanding architectural reviews.',
145
+ badge: 'Previous Gen',
98
146
  badgeClass: 'badge-power'
99
147
  },
100
148
  {
@@ -103,8 +151,8 @@ const CODEX_MODELS = [
103
151
  extra_args: ['-c', 'model_reasoning_effort="xhigh"'],
104
152
  name: 'GPT-6 Astra XHigh',
105
153
  tier: 'thorough',
106
- tagline: 'Maximum Depth',
107
- description: 'Frontier intelligence for the most demanding work, with extra-high reasoning effort for concurrency, security-sensitive changes, and large codebase context.',
154
+ tagline: 'Previous Gen Depth',
155
+ description: 'Previous generation frontier model for the most demanding work, with extra-high reasoning effort for concurrency, security-sensitive changes, and large codebase context.',
108
156
  badge: 'Extra High',
109
157
  badgeClass: 'badge-power'
110
158
  },
@@ -114,9 +162,9 @@ const CODEX_MODELS = [
114
162
  extra_args: ['-c', 'model_reasoning_effort="high"'],
115
163
  name: 'GPT-6 Sol High',
116
164
  tier: 'thorough',
117
- tagline: 'Previous Gen',
118
- description: 'Previous generation workhorse model, with high reasoning effort for demanding reviews and cross-file analysis. Requires GPT-6 access; Enterprise administrators must enable it during rollout.',
119
- badge: 'Previous Gen',
165
+ tagline: 'Older Workhorse',
166
+ description: 'Older generation workhorse model, with high reasoning effort for demanding reviews and cross-file analysis. Requires GPT-6 access; Enterprise administrators must enable it during rollout.',
167
+ badge: 'Older Gen',
120
168
  badgeClass: 'badge-power'
121
169
  },
122
170
  {
@@ -125,8 +173,8 @@ const CODEX_MODELS = [
125
173
  extra_args: ['-c', 'model_reasoning_effort="xhigh"'],
126
174
  name: 'GPT-6 Sol XHigh',
127
175
  tier: 'thorough',
128
- tagline: 'Previous Gen Depth',
129
- description: 'Previous generation workhorse model, with extra-high reasoning effort for difficult architectural reviews, subtle regressions, and security-sensitive changes. Requires GPT-6 access; Enterprise administrators must enable it during rollout.',
176
+ tagline: 'Older Workhorse Depth',
177
+ description: 'Older generation workhorse model, with extra-high reasoning effort for difficult architectural reviews, subtle regressions, and security-sensitive changes. Requires GPT-6 access; Enterprise administrators must enable it during rollout.',
130
178
  badge: 'Extra High',
131
179
  badgeClass: 'badge-power'
132
180
  },
@@ -137,7 +185,7 @@ const CODEX_MODELS = [
137
185
  name: 'GPT-5.6 Sol High',
138
186
  tier: 'thorough',
139
187
  tagline: 'Older Workhorse',
140
- description: 'Older generation workhorse model, with high reasoning effort for demanding reviews and cross-file analysis. The default while GPT-6 and GPT-6.1 access rolls out.',
188
+ description: 'Older generation workhorse model, with high reasoning effort for demanding reviews and cross-file analysis. The default while GPT-6, GPT-6.1, and GPT-6.2 access rolls out.',
141
189
  badge: 'Recommended',
142
190
  badgeClass: 'badge-recommended',
143
191
  default: true
@@ -65,7 +65,7 @@ Map the tool's output to this exact JSON schema:
65
65
  }
66
66
 
67
67
  Rules:
68
- - Include a "reasoning" array with step-by-step reasoning about how you mapped the tool output
68
+ - Include a "reasoning" array with concise evidence for how you mapped the tool output
69
69
  - Map each review finding to one suggestion object
70
70
  - Use "NEW" for old_or_new (external tools review the new version)
71
71
  - Preserve severity if the tool provides it
@@ -203,6 +203,44 @@ function extractPiEventText(event, seenTexts) {
203
203
  return text;
204
204
  }
205
205
 
206
+ /**
207
+ * Extract the outcome of the last assistant message in a Pi JSONL event.
208
+ *
209
+ * Pi and OMP report a failed model request (for example, a provider refusal)
210
+ * as an assistant message with an `errorMessage`. The CLI writes this message
211
+ * only to stdout, so stderr alone does not explain the failure.
212
+ *
213
+ * Only the last assistant message in the event counts. A later message that
214
+ * succeeded replaces an earlier error, so a turn that the CLI retried
215
+ * successfully does not report its old error. Non-assistant messages and
216
+ * assistant messages whose `errorMessage` is empty or only whitespace give no
217
+ * signal either way and are ignored.
218
+ *
219
+ * @param {Object} event - Parsed Pi event object
220
+ * @returns {{errorMessage: string|null}|null} The last assistant message's
221
+ * outcome (`errorMessage` is null when it succeeded), or null when the event
222
+ * carries no assistant message
223
+ */
224
+ function extractPiEventError(event) {
225
+ let messages = [];
226
+ if (event?.type === 'agent_end' && Array.isArray(event.messages)) {
227
+ messages = event.messages;
228
+ } else if (event?.type === 'message_end' || event?.type === 'turn_end') {
229
+ messages = [event.message];
230
+ }
231
+
232
+ let outcome = null;
233
+ for (const msg of messages) {
234
+ if (msg?.role !== 'assistant') continue;
235
+ if (msg.errorMessage === undefined || msg.errorMessage === null) {
236
+ outcome = { errorMessage: null };
237
+ } else if (typeof msg.errorMessage === 'string' && msg.errorMessage.trim()) {
238
+ outcome = { errorMessage: msg.errorMessage.trim() };
239
+ }
240
+ }
241
+ return outcome;
242
+ }
243
+
206
244
  /**
207
245
  * Accumulate only raw lines that could plausibly help the direct JSON fallback.
208
246
  * Pi JSONL event envelopes are intentionally excluded because they are noisy
@@ -251,7 +289,7 @@ function accumulatePiRawFallbackLine(line, state, levelPrefix, parseResult, cliN
251
289
  * Parse a single Pi JSONL line into accumulated assistant text.
252
290
  *
253
291
  * @param {string} line - One JSONL line
254
- * @param {{textContent: string, seenTexts: Set<string>, rawOutput: string, rawOutputTruncated: boolean}} state - Parse state
292
+ * @param {{textContent: string, seenTexts: Set<string>, rawOutput: string, rawOutputTruncated: boolean, errorMessage?: string|null}} state - Parse state
255
293
  * @param {string} levelPrefix - Prefix used in logs
256
294
  * @param {string} [cliName='Pi'] - CLI name used in log messages
257
295
  */
@@ -262,6 +300,8 @@ function accumulatePiResponseLine(line, state, levelPrefix, cliName = 'Pi') {
262
300
  try {
263
301
  const event = JSON.parse(line);
264
302
  state.textContent += extractPiEventText(event, state.seenTexts);
303
+ const outcome = extractPiEventError(event);
304
+ if (outcome) state.errorMessage = outcome.errorMessage;
265
305
  parseResult = { status: 'parsed', value: event };
266
306
  } catch {
267
307
  logger.debug(`${levelPrefix} Skipping malformed JSONL line: ${line.substring(0, 100)}`);
@@ -527,6 +567,7 @@ module.exports = {
527
567
  appendHeadTailBuffer,
528
568
  formatHeadTailBuffer,
529
569
  extractPiEventText,
570
+ extractPiEventError,
530
571
  accumulatePiRawFallbackLine,
531
572
  accumulatePiResponseLine,
532
573
  appendPiChunkToLineBuffer,
@@ -132,7 +132,8 @@ class PiStyleProvider extends AIProvider {
132
132
  textContent: '',
133
133
  seenTexts: new Set(),
134
134
  rawOutput: '',
135
- rawOutputTruncated: false
135
+ rawOutputTruncated: false,
136
+ errorMessage: null
136
137
  };
137
138
 
138
139
  const settle = (fn, value) => {
@@ -224,6 +225,15 @@ class PiStyleProvider extends AIProvider {
224
225
  return;
225
226
  }
226
227
 
228
+ // Process any remaining buffered line before the exit check, so that a
229
+ // final unterminated event can still supply the model error message.
230
+ if (lineBufferState.buffer.trim()) {
231
+ lineCount++;
232
+ emitStreamLine(lineBufferState.buffer);
233
+ this.logStreamLine(lineBufferState.buffer, lineCount, levelPrefix);
234
+ accumulatePiResponseLine(lineBufferState.buffer, responseState, levelPrefix, this.cliName);
235
+ }
236
+
227
237
  const stderr = formatHeadTailBuffer(stderrCapture);
228
238
 
229
239
  // Always log stderr if present
@@ -237,18 +247,15 @@ class PiStyleProvider extends AIProvider {
237
247
 
238
248
  if (code !== 0) {
239
249
  logger.error(`${levelPrefix} ${this.cliName} CLI exited with code ${code}`);
240
- settle(reject, new Error(`${levelPrefix} ${this.cliName} CLI exited with code ${code}: ${stderr}`));
250
+ // The model error (for example, a provider refusal) is only on stdout.
251
+ if (responseState.errorMessage) {
252
+ logger.error(`${levelPrefix} ${this.cliName} model error: ${responseState.errorMessage}`);
253
+ }
254
+ const details = [responseState.errorMessage, stderr.trim()].filter(Boolean).join('\n');
255
+ settle(reject, new Error(`${levelPrefix} ${this.cliName} CLI exited with code ${code}: ${details}`));
241
256
  return;
242
257
  }
243
258
 
244
- // Process any remaining buffered line
245
- if (lineBufferState.buffer.trim()) {
246
- lineCount++;
247
- emitStreamLine(lineBufferState.buffer);
248
- this.logStreamLine(lineBufferState.buffer, lineCount, levelPrefix);
249
- accumulatePiResponseLine(lineBufferState.buffer, responseState, levelPrefix, this.cliName);
250
- }
251
-
252
259
  logger.info(`${levelPrefix} ${this.cliName} CLI completed - received ${lineCount} JSONL events`);
253
260
 
254
261
  // Parse the JSONL response
@@ -270,6 +277,14 @@ class PiStyleProvider extends AIProvider {
270
277
  }
271
278
 
272
279
  settle(resolve, parsed.data);
280
+ } else if (responseState.errorMessage) {
281
+ // The CLI exited 0 but the final model request failed. A later
282
+ // successful assistant message clears errorMessage, so it is only set
283
+ // here when the run ended on the error. Any earlier assistant text is
284
+ // pre-tool narration, not a review to extract, so the LLM extraction
285
+ // fallback would only cost a model call and hide the real cause.
286
+ logger.error(`${levelPrefix} ${this.cliName} model error: ${responseState.errorMessage}`);
287
+ settle(reject, new Error(`${levelPrefix} ${this.cliName} model error: ${responseState.errorMessage}`));
273
288
  } else {
274
289
  // Regex extraction failed, try LLM-based extraction as fallback
275
290
  logger.warn(`${levelPrefix} Regex extraction failed: ${parsed.error}`);
@@ -149,7 +149,7 @@ Output JSON with this structure:
149
149
  "description": "Detailed explanation",
150
150
  "suggestion": "How to fix/improve (omit for praise)",
151
151
  "confidence": 0.0-1.0,
152
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged (optional)"]
152
+ "reasoning": ["Concise code evidence and impact supporting this issue (optional)"]
153
153
  }
154
154
  ],
155
155
  "fileLevelSuggestions": [{
@@ -160,7 +160,7 @@ Output JSON with this structure:
160
160
  "description": "Explanation of the file-level observation",
161
161
  "suggestion": "How to address the file-level concern (omit for praise items)",
162
162
  "confidence": 0.0-1.0,
163
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged (optional)"]
163
+ "reasoning": ["Concise code evidence and impact supporting this issue (optional)"]
164
164
  }],
165
165
  "summary": "Formatted markdown summary following the Summary Synthesis guidance above."
166
166
  }
@@ -204,7 +204,7 @@ Output JSON with this structure:
204
204
  "description": "Detailed explanation",
205
205
  "suggestion": "How to fix/improve (omit for praise)",
206
206
  "confidence": 0.0-1.0,
207
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged"]
207
+ "reasoning": ["Concise code evidence and impact supporting this issue"]
208
208
  }
209
209
  ],
210
210
  "fileLevelSuggestions": [{
@@ -215,7 +215,7 @@ Output JSON with this structure:
215
215
  "description": "Explanation of the file-level observation",
216
216
  "suggestion": "How to address the file-level concern (omit for praise items)",
217
217
  "confidence": 0.0-1.0,
218
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged"]
218
+ "reasoning": ["Concise code evidence and impact supporting this issue"]
219
219
  }],
220
220
  "summary": "Formatted markdown summary following the Summary Synthesis Guidance above."
221
221
  }
@@ -125,7 +125,7 @@ Omit severity for praise items.
125
125
  "description": "Detailed explanation",
126
126
  "suggestion": "How to fix/improve (omit for praise items)",
127
127
  "confidence": 0.0-1.0,
128
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged (optional)"]
128
+ "reasoning": ["Concise code evidence and impact supporting this issue (optional)"]
129
129
  }],
130
130
  "summary": "Brief summary of findings"
131
131
  }
@@ -149,7 +149,7 @@ Output JSON with this structure:
149
149
  "description": "Detailed explanation",
150
150
  "suggestion": "How to fix/improve (omit this field for praise items - no action needed)",
151
151
  "confidence": 0.0-1.0,
152
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged"]
152
+ "reasoning": ["Concise code evidence and impact supporting this issue"]
153
153
  }],
154
154
  "summary": "Brief summary of findings"
155
155
  }
@@ -123,7 +123,7 @@ Omit severity for praise items.
123
123
  "description": "Explanation mentioning why full file context was needed",
124
124
  "suggestion": "How to fix/improve (omit for praise items)",
125
125
  "confidence": 0.0-1.0,
126
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged (optional)"]
126
+ "reasoning": ["Concise code evidence and impact supporting this issue (optional)"]
127
127
  }],
128
128
  "fileLevelSuggestions": [{
129
129
  "file": "path/to/file",
@@ -133,7 +133,7 @@ Omit severity for praise items.
133
133
  "description": "File-level observation (architecture, organization, naming, etc.)",
134
134
  "suggestion": "How to address (omit for praise items)",
135
135
  "confidence": 0.0-1.0,
136
- "reasoning": ["Step-by-step reasoning explaining why this issue was flagged (optional)"]
136
+ "reasoning": ["Concise code evidence and impact supporting this issue (optional)"]
137
137
  }],
138
138
  "summary": "Brief summary of file context findings"
139
139
  }