@in-the-loop-labs/pair-review 5.3.0 → 5.3.2
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.
- package/README.md +6 -6
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin-code-critic/.claude-plugin/plugin.json +1 -1
- package/plugin-pair-loop/.claude-plugin/plugin.json +1 -1
- package/public/local.html +1 -1
- package/public/pr.html +1 -1
- package/src/ai/antigravity-provider.js +1 -7
- package/src/ai/claude-provider.js +46 -19
- package/src/ai/codex-provider.js +105 -33
- package/src/ai/copilot-provider.js +1 -7
- package/src/ai/cursor-agent-provider.js +1 -7
- package/src/ai/muse-provider.js +7 -16
- package/src/ai/omp-provider.js +0 -5
- package/src/ai/opencode-provider.js +0 -5
- package/src/ai/pi-provider.js +0 -5
- package/src/ai/provider.js +10 -6
- package/src/chat/session-manager.js +1 -1
- package/src/config.js +120 -12
- package/src/git/worktree.js +29 -10
- package/src/github/client.js +30 -10
- package/src/main.js +8 -7
- package/src/routes/bulk-analysis-configs.js +1 -1
- package/src/settings/registry.js +2 -2
- package/src/setup/pr-setup.js +54 -1
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ pair-review --local [path]
|
|
|
211
211
|
| `--scope <start>..<end>` | **Local mode only.** Set the diff range a local review covers. Stops (in order): `branch`, `staged`, `unstaged`, `untracked`. Six valid ranges (contiguous, must include `unstaged`); default `unstaged..untracked`. `branch..*` diffs from the merge-base with the base branch. See [Local review scope](#local-review-scope). |
|
|
212
212
|
| `--base <branch>` | **Local mode only.** With a `branch..*` scope, override base-branch auto-detection. Errors if used without a branch-start scope. |
|
|
213
213
|
| `--model <name>` | Override the AI model for any provider. Model availability depends on provider configuration. |
|
|
214
|
-
| `--provider <name>` | Override the AI provider. Applies to headless modes (`--ai-draft` / `--ai-review`) **and** to browser-driven auto-analysis (`--ai`), where it overrides the repo/app default the browser would otherwise use — including across single-port delegation to an already-running server. Defaults to the repo/app default provider (`claude`). Pair with `--model` when the model belongs to a non-default provider (e.g. `--provider codex --model gpt-5.
|
|
214
|
+
| `--provider <name>` | Override the AI provider. Applies to headless modes (`--ai-draft` / `--ai-review`) **and** to browser-driven auto-analysis (`--ai`), where it overrides the repo/app default the browser would otherwise use — including across single-port delegation to an already-running server. Defaults to the repo/app default provider (`claude`). Pair with `--model` when the model belongs to a non-default provider (e.g. `--provider codex --model gpt-5.6-sol-high`). |
|
|
215
215
|
| `--register` | Register `pair-review://` URL scheme handler (macOS only) |
|
|
216
216
|
| `--unregister` | Unregister `pair-review://` URL scheme handler (macOS only) |
|
|
217
217
|
| `--command <cmd>` | Custom CLI command for `--register` (default: `npx @in-the-loop-labs/pair-review`) |
|
|
@@ -227,7 +227,7 @@ pair-review 123 --ai # Auto-run AI analysis
|
|
|
227
227
|
pair-review 123 --ai --provider codex # Auto-run analysis in the browser with a specific provider
|
|
228
228
|
pair-review --list-councils # List saved councils and their handles
|
|
229
229
|
pair-review 123 --ai-draft --council security-review # Headless draft with a council
|
|
230
|
-
pair-review 123 --ai-draft --provider codex --model gpt-5.
|
|
230
|
+
pair-review 123 --ai-draft --provider codex --model gpt-5.6-sol-high # Headless draft with a specific provider + model
|
|
231
231
|
pair-review --local --ai --council security-review # Local review with a council
|
|
232
232
|
pair-review --local --headless # Analyze local changes, print a summary, exit
|
|
233
233
|
pair-review --local --headless --json # Analyze local changes, emit JSON, exit
|
|
@@ -500,7 +500,7 @@ Configuration is stored in `~/.pair-review/config.json`:
|
|
|
500
500
|
"port": 7247,
|
|
501
501
|
"theme": "light",
|
|
502
502
|
"default_provider": "claude",
|
|
503
|
-
"default_model": "opus"
|
|
503
|
+
"default_model": "opus-5.5-high"
|
|
504
504
|
}
|
|
505
505
|
```
|
|
506
506
|
|
|
@@ -583,7 +583,7 @@ pair-review supports several environment variables for customizing behavior:
|
|
|
583
583
|
|
|
584
584
|
**Note:** `GITHUB_TOKEN` is the standard environment variable used by many GitHub tools (gh CLI, GitHub Actions, etc.). When set, it takes precedence over the `github_token` field in the config file.
|
|
585
585
|
|
|
586
|
-
**Note:** Choose the AI provider and model with the `--provider` and `--model` CLI flags. There is no environment-variable equivalent (the provider/model env vars were removed in v5 — see the changeset for migration). The `--provider` flag selects which provider runs the analysis; `--model` selects the model within that provider, so set both when the model belongs to a non-default provider (e.g. `--provider codex --model gpt-5.
|
|
586
|
+
**Note:** Choose the AI provider and model with the `--provider` and `--model` CLI flags. There is no environment-variable equivalent (the provider/model env vars were removed in v5 — see the changeset for migration). The `--provider` flag selects which provider runs the analysis; `--model` selects the model within that provider, so set both when the model belongs to a non-default provider (e.g. `--provider codex --model gpt-5.6-sol-high`). The flag override outranks saved repository settings (`CLI flag > repo settings`); if the repo's default is a Review Council, an active `--provider`/`--model` override forces the single-provider path instead. To set a persistent default without passing a flag every time, use the `default_provider` / `default_model` config keys or the repo/global [settings pages](#global-settings-page).
|
|
587
587
|
|
|
588
588
|
**Delegation caveat:** With single-port mode (the default `single_port: true`), a new invocation delegates to an already-running server. On that path the `--provider`/`--model` override is carried to the running server only alongside browser auto-analysis (`--ai`). Delegating without `--ai` (just opening the review) does not seed the override into the other process's manual analysis dialog — use `--ai`, or a headless mode, to pin the provider on the delegated path.
|
|
589
589
|
|
|
@@ -610,7 +610,7 @@ PAIR_REVIEW_ANTIGRAVITY_CMD="/usr/local/bin/agy" pair-review --local
|
|
|
610
610
|
pair-review 123 --model opus
|
|
611
611
|
|
|
612
612
|
# Force a specific provider + model for a headless review
|
|
613
|
-
pair-review 123 --ai-draft --provider codex --model gpt-5.
|
|
613
|
+
pair-review 123 --ai-draft --provider codex --model gpt-5.6-sol-high
|
|
614
614
|
|
|
615
615
|
# Combine a custom CLI path with a model flag
|
|
616
616
|
PAIR_REVIEW_CLAUDE_CMD="/opt/claude/bin/claude" pair-review 123 --model haiku
|
|
@@ -762,7 +762,7 @@ Use the provider-level `default_model` and `disabled_models` fields to tailor wh
|
|
|
762
762
|
}
|
|
763
763
|
```
|
|
764
764
|
|
|
765
|
-
- `disabled_models` removes those models from the picker. It matches by model id or alias, so either a canonical id (`opus-
|
|
765
|
+
- `disabled_models` removes those models from the picker. It matches by model id or alias, so either a canonical id (`opus-5.5-xhigh`) or a convenience alias (`opus`) works. The bare `opus` and `fable` aliases follow the newest generation, so list the canonical id to keep hiding one exact entry. To find the built-in IDs for a provider, see the comments in `config.example.json` (e.g. Claude ships `opus-4.8-xhigh`, `sonnet-4.6`, `haiku`, …).
|
|
766
766
|
- `default_model` selects which of the *remaining* models is the default. If it points at a model that is unknown or also disabled, the provider falls back to automatic selection (the model marked `default: true`, then the first `balanced`-tier model, then the first model).
|
|
767
767
|
- Prefer `default_model` over the per-model `default: true` flag, which is deprecated. Setting `default_model` suppresses the deprecation warning.
|
|
768
768
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@in-the-loop-labs/pair-review",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "Your AI-powered code review partner - Close the feedback loop with AI coding agents",
|
|
5
5
|
"main": "src/server.js",
|
|
6
6
|
"bin": {
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
"better-sqlite3": "^12.11.1",
|
|
74
74
|
"express": "^4.18.2",
|
|
75
75
|
"glob": "^13.0.6",
|
|
76
|
-
"markdown-it": "^13.0.2",
|
|
77
76
|
"open": "^9.1.0",
|
|
78
77
|
"semver": "^7.7.4",
|
|
79
78
|
"simple-git": "^3.19.1",
|
|
@@ -90,6 +89,7 @@
|
|
|
90
89
|
"esbuild": "^0.27.4",
|
|
91
90
|
"highlight.js": "^11.11.1",
|
|
92
91
|
"jsdom": "^29.0.1",
|
|
92
|
+
"markdown-it": "^14.3.2",
|
|
93
93
|
"supertest": "^7.1.4",
|
|
94
94
|
"vitest": "^4.0.16"
|
|
95
95
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pair-review",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "pair-review app integration — Open PRs and local changes in the pair-review web UI, run server-side AI analysis, and address review feedback. Requires the pair-review MCP server.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pair-loop",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "Agent-orchestrated review loop — implement, review with pair-review multi-model councils via the headless CLI, triage, fix, and repeat until a final review returns no blockers. MCP-independent.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
package/public/local.html
CHANGED
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/elixir.min.js"></script>
|
|
565
565
|
|
|
566
566
|
<!-- Markdown-it Library for rendering markdown in comments -->
|
|
567
|
-
<script src="https://cdn.jsdelivr.net/npm/markdown-it@
|
|
567
|
+
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.3.2/dist/markdown-it.min.js"></script>
|
|
568
568
|
<script src="https://cdn.jsdelivr.net/npm/markdown-it-emoji@2.0.2/dist/markdown-it-emoji.min.js"></script>
|
|
569
569
|
<!-- DOMPurify sanitizes rendered markdown HTML (must load before markdown.js) -->
|
|
570
570
|
<script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.6/dist/purify.min.js"></script>
|
package/public/pr.html
CHANGED
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/elixir.min.js"></script>
|
|
370
370
|
|
|
371
371
|
<!-- Markdown-it Library for rendering markdown in comments -->
|
|
372
|
-
<script src="https://cdn.jsdelivr.net/npm/markdown-it@
|
|
372
|
+
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.3.2/dist/markdown-it.min.js"></script>
|
|
373
373
|
<script src="https://cdn.jsdelivr.net/npm/markdown-it-emoji@2.0.2/dist/markdown-it-emoji.min.js"></script>
|
|
374
374
|
<!-- DOMPurify sanitizes rendered markdown HTML (must load before markdown.js) -->
|
|
375
375
|
<script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.6/dist/purify.min.js"></script>
|
|
@@ -160,8 +160,6 @@ const ANTIGRAVITY_MODELS = [
|
|
|
160
160
|
}
|
|
161
161
|
];
|
|
162
162
|
|
|
163
|
-
const DEFAULT_ANTIGRAVITY_MODEL = 'gemini-3.8-flash-high';
|
|
164
|
-
|
|
165
163
|
class AntigravityProvider extends AIProvider {
|
|
166
164
|
/**
|
|
167
165
|
* @param {string} model - Model identifier (clean id from ANTIGRAVITY_MODELS)
|
|
@@ -171,7 +169,7 @@ class AntigravityProvider extends AIProvider {
|
|
|
171
169
|
* @param {Object} configOverrides.env - Additional environment variables
|
|
172
170
|
* @param {Object[]} configOverrides.models - Custom model definitions
|
|
173
171
|
*/
|
|
174
|
-
constructor(model =
|
|
172
|
+
constructor(model = AntigravityProvider.getDefaultModel(), configOverrides = {}) {
|
|
175
173
|
super(model);
|
|
176
174
|
|
|
177
175
|
// Command precedence: ENV > config > default
|
|
@@ -624,10 +622,6 @@ class AntigravityProvider extends AIProvider {
|
|
|
624
622
|
return ANTIGRAVITY_MODELS;
|
|
625
623
|
}
|
|
626
624
|
|
|
627
|
-
static getDefaultModel() {
|
|
628
|
-
return DEFAULT_ANTIGRAVITY_MODEL;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
625
|
static getInstallInstructions() {
|
|
632
626
|
return 'Install the Antigravity CLI: curl -fsSL https://antigravity.google/cli/install.sh | bash\n' +
|
|
633
627
|
'Or visit: https://antigravity.google/docs';
|
|
@@ -26,14 +26,23 @@ const BIN_DIR = path.join(__dirname, '..', '..', 'bin');
|
|
|
26
26
|
* in the constructor's base args; individual models can override this via extra_args
|
|
27
27
|
* (e.g., Haiku uses adaptive thinking for efficiency).
|
|
28
28
|
*
|
|
29
|
-
* Effort support by model (newest CLIs): Fable 5.1, Fable 5, Opus 5,
|
|
29
|
+
* Effort support by model (newest CLIs): Fable 5.1, Fable 5, Opus 5.5, Opus 5,
|
|
30
30
|
* Opus 4.8 / 4.7, and Sonnet 5 support low|medium|high|xhigh|max; Opus 4.6 &
|
|
31
31
|
* Sonnet 4.6 support low|medium|high|max (no xhigh); Haiku has no effort levels.
|
|
32
|
+
* The CLI's own default effort for Opus 5.5 is `medium` (and it ignores a
|
|
33
|
+
* top-level `effortLevel` in user settings), so its entries rely on the env var,
|
|
34
|
+
* which the CLI treats as an explicit choice at the top of its effort precedence.
|
|
32
35
|
*/
|
|
33
36
|
const CLAUDE_MODELS = [
|
|
34
37
|
// ── Thorough tier ───────────────────────────────────────────────────────
|
|
35
38
|
{
|
|
36
39
|
id: 'fable-5.1-xhigh',
|
|
40
|
+
// The bare generation aliases ('fable' here, 'opus' on opus-5.5-xhigh) track
|
|
41
|
+
// the newest generation at XHigh: a config, council, or --model naming the
|
|
42
|
+
// alias moves up a generation on each update without losing effort. Older
|
|
43
|
+
// generations stay reachable by their explicit ids. The provider DEFAULT
|
|
44
|
+
// (opus-5.5-high) is a separate setting, chosen by the `default: true` flag.
|
|
45
|
+
aliases: ['fable'],
|
|
37
46
|
cli_model: 'claude-fable-5-1',
|
|
38
47
|
env: { CLAUDE_CODE_EFFORT_LEVEL: 'xhigh' },
|
|
39
48
|
name: 'Fable 5.1 XHigh',
|
|
@@ -61,12 +70,6 @@ const CLAUDE_MODELS = [
|
|
|
61
70
|
},
|
|
62
71
|
{
|
|
63
72
|
id: 'fable-5-xhigh',
|
|
64
|
-
// The bare 'fable' alias intentionally stays pinned to Fable 5 (the same way
|
|
65
|
-
// 'opus' stays on opus-4.8-xhigh) so existing configs and --model fable
|
|
66
|
-
// invocations keep resolving to the generation they were written against.
|
|
67
|
-
// The provider DEFAULT is a separate knob: it moved to opus-5-high (same
|
|
68
|
-
// price as Opus 4.8) while the 'opus' alias stayed pinned to opus-4.8-xhigh.
|
|
69
|
-
aliases: ['fable'],
|
|
70
73
|
cli_model: 'claude-fable-5',
|
|
71
74
|
env: { CLAUDE_CODE_EFFORT_LEVEL: 'xhigh' },
|
|
72
75
|
name: 'Fable 5 XHigh',
|
|
@@ -90,14 +93,44 @@ const CLAUDE_MODELS = [
|
|
|
90
93
|
badgeClass: 'badge-power',
|
|
91
94
|
extra_args: ['--thinking', 'adaptive']
|
|
92
95
|
},
|
|
96
|
+
{
|
|
97
|
+
id: 'opus-5.5-xhigh',
|
|
98
|
+
// Generation alias; see fable-5.1-xhigh above.
|
|
99
|
+
aliases: ['opus'],
|
|
100
|
+
cli_model: 'claude-opus-5-5',
|
|
101
|
+
env: { CLAUDE_CODE_EFFORT_LEVEL: 'xhigh' },
|
|
102
|
+
name: 'Opus 5.5 XHigh',
|
|
103
|
+
tier: 'thorough',
|
|
104
|
+
tagline: 'Newest Opus',
|
|
105
|
+
description: 'Opus 5.5 (newest) with extra-high effort — deepest thorough reviews',
|
|
106
|
+
badge: 'Extra-High Effort',
|
|
107
|
+
badgeClass: 'badge-power',
|
|
108
|
+
// Opus 5.5, like every Fable generation, is adaptive-thinking-only. Current
|
|
109
|
+
// CLIs normalize `--thinking enabled`, but pin adaptive so an older CLI never
|
|
110
|
+
// sends an explicit thinking mode the API rejects.
|
|
111
|
+
extra_args: ['--thinking', 'adaptive']
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 'opus-5.5-high',
|
|
115
|
+
cli_model: 'claude-opus-5-5',
|
|
116
|
+
env: { CLAUDE_CODE_EFFORT_LEVEL: 'high' },
|
|
117
|
+
name: 'Opus 5.5 High',
|
|
118
|
+
tier: 'thorough',
|
|
119
|
+
tagline: 'Recommended Default',
|
|
120
|
+
description: 'Opus 5.5 (newest) with high effort — the recommended default for thorough reviews',
|
|
121
|
+
badge: 'Recommended',
|
|
122
|
+
badgeClass: 'badge-recommended',
|
|
123
|
+
default: true,
|
|
124
|
+
extra_args: ['--thinking', 'adaptive']
|
|
125
|
+
},
|
|
93
126
|
{
|
|
94
127
|
id: 'opus-5-xhigh',
|
|
95
128
|
cli_model: 'claude-opus-5',
|
|
96
129
|
env: { CLAUDE_CODE_EFFORT_LEVEL: 'xhigh' },
|
|
97
130
|
name: 'Opus 5 XHigh',
|
|
98
131
|
tier: 'thorough',
|
|
99
|
-
tagline: '
|
|
100
|
-
description: 'Opus 5 (
|
|
132
|
+
tagline: 'Previous Opus',
|
|
133
|
+
description: 'Opus 5 (previous Opus) with extra-high effort',
|
|
101
134
|
badge: 'Extra-High Effort',
|
|
102
135
|
badgeClass: 'badge-power'
|
|
103
136
|
},
|
|
@@ -107,15 +140,13 @@ const CLAUDE_MODELS = [
|
|
|
107
140
|
env: { CLAUDE_CODE_EFFORT_LEVEL: 'high' },
|
|
108
141
|
name: 'Opus 5 High',
|
|
109
142
|
tier: 'thorough',
|
|
110
|
-
tagline: '
|
|
111
|
-
description: 'Opus 5
|
|
112
|
-
badge: '
|
|
113
|
-
badgeClass: 'badge-
|
|
114
|
-
default: true
|
|
143
|
+
tagline: 'Previous Opus',
|
|
144
|
+
description: 'Opus 5 with high effort — quicker than XHigh',
|
|
145
|
+
badge: 'High Effort',
|
|
146
|
+
badgeClass: 'badge-power'
|
|
115
147
|
},
|
|
116
148
|
{
|
|
117
149
|
id: 'opus-4.8-xhigh',
|
|
118
|
-
aliases: ['opus'],
|
|
119
150
|
cli_model: 'claude-opus-4-8',
|
|
120
151
|
env: { CLAUDE_CODE_EFFORT_LEVEL: 'xhigh' },
|
|
121
152
|
name: 'Opus 4.8 XHigh',
|
|
@@ -1038,10 +1069,6 @@ class ClaudeProvider extends AIProvider {
|
|
|
1038
1069
|
return CLAUDE_MODELS;
|
|
1039
1070
|
}
|
|
1040
1071
|
|
|
1041
|
-
static getDefaultModel() {
|
|
1042
|
-
return 'opus-5-high';
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
1072
|
static getInstallInstructions() {
|
|
1046
1073
|
return 'Install Claude CLI: npm install -g @anthropic-ai/claude-code';
|
|
1047
1074
|
}
|
package/src/ai/codex-provider.js
CHANGED
|
@@ -21,36 +21,59 @@ const BIN_DIR = path.join(__dirname, '..', '..', 'bin');
|
|
|
21
21
|
/**
|
|
22
22
|
* Codex model definitions with tier mappings
|
|
23
23
|
*
|
|
24
|
-
* Based on OpenAI's GPT-6 Astra
|
|
25
|
-
* Models guide (developers.openai.com/api/docs/models).
|
|
26
|
-
* Codex CLI 0.
|
|
24
|
+
* Based on OpenAI's GPT-6 launches (Astra in September 2026; Sol and Luna on
|
|
25
|
+
* 2026-09-22) and the Models guide (developers.openai.com/api/docs/models).
|
|
26
|
+
* Verified against the Codex CLI 0.155.1 model catalog with a ChatGPT sign-in.
|
|
27
|
+
* - gpt-5.6-sol: the default (gpt-5.6-sol-high; $4/$20 per MTok). GPT-5.6 Sol
|
|
28
|
+
* stays the default, and GPT-5.6 Luna Low the first fast entry, while GPT-6
|
|
29
|
+
* access rolls out: GPT-6 Sol/Luna access depends on workspace settings and
|
|
30
|
+
* Enterprise admins must enable it, testAvailability() only checks
|
|
31
|
+
* `codex --version`, and nothing falls back to GPT-5.6 at runtime. A GPT-6
|
|
32
|
+
* default would fail every default analysis for users without access.
|
|
27
33
|
* - gpt-6-astra: GPT-6 flagship, the most capable model for complex, demanding
|
|
28
|
-
* work (
|
|
29
|
-
* opt-in thorough choice rather than the default.
|
|
30
|
-
* - gpt-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* - gpt-
|
|
35
|
-
* (
|
|
36
|
-
*
|
|
37
|
-
*
|
|
34
|
+
* work ($10/$50 per MTok, same context as Sol). About five times GPT-6 Sol's
|
|
35
|
+
* price, so it stays an opt-in thorough choice rather than the default.
|
|
36
|
+
* - gpt-6-sol: Frontier model built for complex coding and agentic workflows
|
|
37
|
+
* ($2/$10 per MTok; 1.05M API context, capped at 272K in the Codex catalog;
|
|
38
|
+
* 128K output; API input above 272K bills at 2x, output at 1.5x). Newer than
|
|
39
|
+
* GPT-5.6 Sol at half its price, but opt-in until GPT-6 access is universal.
|
|
40
|
+
* - gpt-6-luna: GPT-6's most efficient model for focused, high-volume work
|
|
41
|
+
* ($0.10/$0.50 per MTok, same context as Sol). Per OpenAI, GPT-6 Luna (max)
|
|
42
|
+
* exceeds GPT-5.6 Sol (medium) at a tenth of its cost. No `ultra` effort.
|
|
43
|
+
* Opt-in, like GPT-6 Sol.
|
|
44
|
+
* - gpt-5.6-sol / gpt-5.6-terra / gpt-5.6-luna: "legacy" in Codex but still
|
|
45
|
+
* available (no retirement date announced)
|
|
46
|
+
* - gpt-5.5: older frontier model. OpenAI retires it from Codex on ALL plans
|
|
47
|
+
* on 2026-10-14 (the API is unaffected); remove the gpt-5.5-* entries then.
|
|
48
|
+
* - Every model is exposed only through explicit reasoning-effort variants.
|
|
38
49
|
*
|
|
39
|
-
* Tiers: thorough (Astra, Sol, GPT-5.5), balanced (Terra,
|
|
40
|
-
*
|
|
41
|
-
*
|
|
50
|
+
* Tiers: thorough (Astra, GPT-6 Sol, GPT-5.6 Sol, GPT-5.5), balanced (Terra,
|
|
51
|
+
* GPT-5.6 Luna, GPT-6 Luna Max), fast (GPT-5.6 Luna Low, GPT-6 Luna Low). In
|
|
52
|
+
* the balanced and fast tiers GPT-6 goes last: the first entry of a tier is an
|
|
53
|
+
* automatic pick (provider switch in the UI, extraction, default fallback).
|
|
54
|
+
* Entries are ordered thorough → balanced → fast; the first `fast` entry
|
|
55
|
+
* serves JSON extraction and hunk summaries (see AIProvider.getFastTierModel).
|
|
56
|
+
* Guided tours use the provider default, not the fast tier.
|
|
42
57
|
*
|
|
43
|
-
* Reasoning-effort variants (-high / -xhigh / -max) use `cli_model` to pass
|
|
44
|
-
* model ID to `codex exec -m` and add `-c model_reasoning_effort="..."`
|
|
45
|
-
* extra_args so Codex picks up the effort level through its config override.
|
|
58
|
+
* Reasoning-effort variants (-low / -high / -xhigh / -max) use `cli_model` to pass
|
|
59
|
+
* the base model ID to `codex exec -m` and add `-c model_reasoning_effort="..."`
|
|
60
|
+
* via extra_args so Codex picks up the effort level through its config override.
|
|
46
61
|
*
|
|
47
62
|
* Deprecated (April 2026): gpt-5.1-codex-mini, gpt-5.1-codex-max, gpt-5.1-codex
|
|
48
63
|
* Deprecated (August 2026): gpt-5.4 (gpt-5.4-high / gpt-5.4-xhigh), gpt-5.4-nano,
|
|
49
64
|
* gpt-5.3-codex — retired by OpenAI; Codex rejects them with a 400. They are
|
|
50
65
|
* intentionally NOT aliased onto other models so saved councils fail loudly
|
|
51
66
|
* instead of silently running a different model.
|
|
67
|
+
* Deprecated (August 31, 2026): gpt-5.4-mini — retired for ChatGPT sign-in
|
|
68
|
+
* (Codex rejects it with a 400) but still valid for API keys. OpenAI names
|
|
69
|
+
* gpt-6-luna as its replacement; it is NOT aliased onto any Luna entry
|
|
70
|
+
* (different model line and price). An unrecognized id reaches `codex exec -m`
|
|
71
|
+
* verbatim with no effort override, so API-key users can still name it raw
|
|
72
|
+
* (`--model gpt-5.4-mini`, or a `providers.codex.models` entry for the web UI
|
|
73
|
+
* picker).
|
|
52
74
|
*/
|
|
53
75
|
const CODEX_MODELS = [
|
|
76
|
+
// ── Thorough tier ───────────────────────────────────────────────────────
|
|
54
77
|
{
|
|
55
78
|
id: 'gpt-6-astra-high',
|
|
56
79
|
cli_model: 'gpt-6-astra',
|
|
@@ -58,7 +81,7 @@ const CODEX_MODELS = [
|
|
|
58
81
|
name: 'GPT-6 Astra High',
|
|
59
82
|
tier: 'thorough',
|
|
60
83
|
tagline: 'Most Capable',
|
|
61
|
-
description: 'OpenAI\'s GPT-6 flagship with high reasoning effort for the hardest reviews: deep cross-file analysis, subtle regressions, and demanding architectural work. Costs
|
|
84
|
+
description: 'OpenAI\'s GPT-6 flagship with high reasoning effort for the hardest reviews: deep cross-file analysis, subtle regressions, and demanding architectural work. Costs about five times more than GPT-6 Sol.',
|
|
62
85
|
badge: 'Most Capable',
|
|
63
86
|
badgeClass: 'badge-power'
|
|
64
87
|
},
|
|
@@ -69,7 +92,29 @@ const CODEX_MODELS = [
|
|
|
69
92
|
name: 'GPT-6 Astra XHigh',
|
|
70
93
|
tier: 'thorough',
|
|
71
94
|
tagline: 'Maximum Depth',
|
|
72
|
-
description: 'GPT-6 Astra with extra-high reasoning effort for the most difficult reviews: concurrency, security-sensitive changes, and large codebase context. Premium pricing.',
|
|
95
|
+
description: 'GPT-6 Astra with extra-high reasoning effort for the most difficult reviews: concurrency, security-sensitive changes, and large codebase context. Premium pricing, about five times GPT-6 Sol.',
|
|
96
|
+
badge: 'Extra High',
|
|
97
|
+
badgeClass: 'badge-power'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'gpt-6-sol-high',
|
|
101
|
+
cli_model: 'gpt-6-sol',
|
|
102
|
+
extra_args: ['-c', 'model_reasoning_effort="high"'],
|
|
103
|
+
name: 'GPT-6 Sol High',
|
|
104
|
+
tier: 'thorough',
|
|
105
|
+
tagline: 'Newest Frontier',
|
|
106
|
+
description: 'GPT-6 frontier model built for complex coding and agentic work, with high reasoning effort for demanding PR reviews and cross-file analysis, at about a fifth of Astra\'s price. Needs GPT-6 access, which is still rolling out (Enterprise admins must enable it).',
|
|
107
|
+
badge: 'Newest',
|
|
108
|
+
badgeClass: 'badge-power'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'gpt-6-sol-xhigh',
|
|
112
|
+
cli_model: 'gpt-6-sol',
|
|
113
|
+
extra_args: ['-c', 'model_reasoning_effort="xhigh"'],
|
|
114
|
+
name: 'GPT-6 Sol XHigh',
|
|
115
|
+
tier: 'thorough',
|
|
116
|
+
tagline: 'Frontier Depth',
|
|
117
|
+
description: 'GPT-6 Sol with extra-high reasoning effort for difficult architectural reviews, subtle regressions, and security-sensitive changes. Needs GPT-6 access, which is still rolling out (Enterprise admins must enable it).',
|
|
73
118
|
badge: 'Extra High',
|
|
74
119
|
badgeClass: 'badge-power'
|
|
75
120
|
},
|
|
@@ -80,7 +125,7 @@ const CODEX_MODELS = [
|
|
|
80
125
|
name: 'GPT-5.6 Sol High',
|
|
81
126
|
tier: 'thorough',
|
|
82
127
|
tagline: 'Frontier Review',
|
|
83
|
-
description: 'Strong frontier reviewer
|
|
128
|
+
description: 'Strong frontier reviewer with high reasoning effort for demanding PR reviews, complex professional work, and cross-file analysis. The default while GPT-6 access rolls out.',
|
|
84
129
|
badge: 'Recommended',
|
|
85
130
|
badgeClass: 'badge-recommended',
|
|
86
131
|
default: true
|
|
@@ -103,7 +148,7 @@ const CODEX_MODELS = [
|
|
|
103
148
|
name: 'GPT-5.5 High',
|
|
104
149
|
tier: 'thorough',
|
|
105
150
|
tagline: 'Previous Flagship',
|
|
106
|
-
description: 'Previous-generation GPT model with high reasoning effort for demanding PR reviews, strong code understanding, and careful cross-file analysis.',
|
|
151
|
+
description: 'Previous-generation GPT model with high reasoning effort for demanding PR reviews, strong code understanding, and careful cross-file analysis. OpenAI retires GPT-5.5 from Codex on 2026-10-14.',
|
|
107
152
|
badge: 'Previous Gen',
|
|
108
153
|
badgeClass: 'badge-power'
|
|
109
154
|
},
|
|
@@ -114,10 +159,14 @@ const CODEX_MODELS = [
|
|
|
114
159
|
name: 'GPT-5.5 XHigh',
|
|
115
160
|
tier: 'thorough',
|
|
116
161
|
tagline: 'Frontier Depth',
|
|
117
|
-
description: 'GPT-5.5 with extra-high reasoning effort for the hardest reviews: architecture, concurrency, security-sensitive changes, and large codebase context.',
|
|
162
|
+
description: 'GPT-5.5 with extra-high reasoning effort for the hardest reviews: architecture, concurrency, security-sensitive changes, and large codebase context. OpenAI retires GPT-5.5 from Codex on 2026-10-14.',
|
|
118
163
|
badge: 'Max Reasoning',
|
|
119
164
|
badgeClass: 'badge-power'
|
|
120
165
|
},
|
|
166
|
+
// ── Balanced tier ───────────────────────────────────────────────────────
|
|
167
|
+
// The first balanced entry is what the UI picks when a user switches to Codex
|
|
168
|
+
// from a balanced model, and resolveDefaultModel's fallback when the flagged
|
|
169
|
+
// default is disabled, so it must run for every account: GPT-6 goes last.
|
|
121
170
|
{
|
|
122
171
|
id: 'gpt-5.6-terra-xhigh',
|
|
123
172
|
cli_model: 'gpt-5.6-terra',
|
|
@@ -135,19 +184,46 @@ const CODEX_MODELS = [
|
|
|
135
184
|
extra_args: ['-c', 'model_reasoning_effort="max"'],
|
|
136
185
|
name: 'GPT-5.6 Luna Max',
|
|
137
186
|
tier: 'balanced',
|
|
187
|
+
tagline: 'Previous Gen',
|
|
188
|
+
description: 'Previous-generation Luna, GPT-5.6\'s most cost-efficient model, with max reasoning effort for high-volume reviews and broad codebase scans.',
|
|
189
|
+
badge: 'Previous Gen',
|
|
190
|
+
badgeClass: 'badge-balanced'
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: 'gpt-6-luna-max',
|
|
194
|
+
cli_model: 'gpt-6-luna',
|
|
195
|
+
extra_args: ['-c', 'model_reasoning_effort="max"'],
|
|
196
|
+
name: 'GPT-6 Luna Max',
|
|
197
|
+
tier: 'balanced',
|
|
138
198
|
tagline: 'High-Volume Value',
|
|
139
|
-
description: 'GPT-
|
|
199
|
+
description: 'GPT-6\'s most efficient model at max reasoning effort. Per OpenAI it beats GPT-5.6 Sol (medium) at a tenth of the cost, for high-volume reviews and broad codebase scans. Needs GPT-6 access, which is still rolling out (Enterprise admins must enable it).',
|
|
140
200
|
badge: 'Lowest Cost',
|
|
141
201
|
badgeClass: 'badge-speed'
|
|
142
202
|
},
|
|
203
|
+
// ── Fast tier ───────────────────────────────────────────────────────────
|
|
204
|
+
// The first fast entry serves JSON extraction and hunk summaries, so it must
|
|
205
|
+
// run for every account: keep it on GPT-5.6 until GPT-6 access is universal.
|
|
143
206
|
{
|
|
144
|
-
id: 'gpt-5.
|
|
145
|
-
|
|
207
|
+
id: 'gpt-5.6-luna-low',
|
|
208
|
+
cli_model: 'gpt-5.6-luna',
|
|
209
|
+
extra_args: ['-c', 'model_reasoning_effort="low"'],
|
|
210
|
+
name: 'GPT-5.6 Luna Low',
|
|
146
211
|
tier: 'fast',
|
|
147
212
|
tagline: 'Quick Scan',
|
|
148
|
-
description: '
|
|
213
|
+
description: 'GPT-5.6\'s most cost-efficient model at low reasoning effort for surface scans: obvious bugs, style issues, and lint-level feedback.',
|
|
149
214
|
badge: 'Fastest',
|
|
150
215
|
badgeClass: 'badge-speed'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: 'gpt-6-luna-low',
|
|
219
|
+
cli_model: 'gpt-6-luna',
|
|
220
|
+
extra_args: ['-c', 'model_reasoning_effort="low"'],
|
|
221
|
+
name: 'GPT-6 Luna Low',
|
|
222
|
+
tier: 'fast',
|
|
223
|
+
tagline: 'Newest Quick Scan',
|
|
224
|
+
description: 'GPT-6\'s most efficient model at low reasoning effort for surface scans: obvious bugs, style issues, and lint-level feedback. Needs GPT-6 access, which is still rolling out (Enterprise admins must enable it).',
|
|
225
|
+
badge: 'Newest',
|
|
226
|
+
badgeClass: 'badge-speed'
|
|
151
227
|
}
|
|
152
228
|
];
|
|
153
229
|
|
|
@@ -161,7 +237,7 @@ class CodexProvider extends AIProvider {
|
|
|
161
237
|
* @param {Object} configOverrides.env - Additional environment variables
|
|
162
238
|
* @param {Object[]} configOverrides.models - Custom model definitions
|
|
163
239
|
*/
|
|
164
|
-
constructor(model =
|
|
240
|
+
constructor(model = CodexProvider.getDefaultModel(), configOverrides = {}) {
|
|
165
241
|
super(model);
|
|
166
242
|
|
|
167
243
|
// Command precedence: ENV > config > default
|
|
@@ -913,10 +989,6 @@ class CodexProvider extends AIProvider {
|
|
|
913
989
|
return CODEX_MODELS;
|
|
914
990
|
}
|
|
915
991
|
|
|
916
|
-
static getDefaultModel() {
|
|
917
|
-
return 'gpt-5.6-sol-high';
|
|
918
|
-
}
|
|
919
|
-
|
|
920
992
|
static getInstallInstructions() {
|
|
921
993
|
return 'Install Codex CLI: npm install -g @openai/codex\n' +
|
|
922
994
|
'Or visit: https://github.com/openai/codex';
|
|
@@ -103,8 +103,6 @@ const COPILOT_MODELS = [
|
|
|
103
103
|
}
|
|
104
104
|
];
|
|
105
105
|
|
|
106
|
-
const DEFAULT_COPILOT_MODEL = 'claude-sonnet-4.6';
|
|
107
|
-
|
|
108
106
|
class CopilotProvider extends AIProvider {
|
|
109
107
|
/**
|
|
110
108
|
* @param {string} model - Model identifier
|
|
@@ -114,7 +112,7 @@ class CopilotProvider extends AIProvider {
|
|
|
114
112
|
* @param {Object} configOverrides.env - Additional environment variables
|
|
115
113
|
* @param {Object[]} configOverrides.models - Custom model definitions
|
|
116
114
|
*/
|
|
117
|
-
constructor(model =
|
|
115
|
+
constructor(model = CopilotProvider.getDefaultModel(), configOverrides = {}) {
|
|
118
116
|
super(model);
|
|
119
117
|
|
|
120
118
|
// Command precedence: ENV > config > default
|
|
@@ -541,10 +539,6 @@ class CopilotProvider extends AIProvider {
|
|
|
541
539
|
return COPILOT_MODELS;
|
|
542
540
|
}
|
|
543
541
|
|
|
544
|
-
static getDefaultModel() {
|
|
545
|
-
return DEFAULT_COPILOT_MODEL;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
542
|
static getInstallInstructions() {
|
|
549
543
|
return 'Install GitHub Copilot CLI: npm install -g @github/copilot\n' +
|
|
550
544
|
'Or visit: https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli';
|
|
@@ -174,8 +174,6 @@ const CURSOR_AGENT_MODELS = [
|
|
|
174
174
|
}
|
|
175
175
|
];
|
|
176
176
|
|
|
177
|
-
const DEFAULT_CURSOR_AGENT_MODEL = 'sonnet-4.6-thinking';
|
|
178
|
-
|
|
179
177
|
class CursorAgentProvider extends AIProvider {
|
|
180
178
|
/**
|
|
181
179
|
* @param {string} model - Model identifier
|
|
@@ -186,7 +184,7 @@ class CursorAgentProvider extends AIProvider {
|
|
|
186
184
|
* @param {Object[]} configOverrides.models - Custom model definitions
|
|
187
185
|
* @param {boolean} configOverrides.yolo - When true, use --yolo instead of --trust/--sandbox
|
|
188
186
|
*/
|
|
189
|
-
constructor(model =
|
|
187
|
+
constructor(model = CursorAgentProvider.getDefaultModel(), configOverrides = {}) {
|
|
190
188
|
super(model);
|
|
191
189
|
|
|
192
190
|
// Command precedence: ENV > config > default
|
|
@@ -885,10 +883,6 @@ class CursorAgentProvider extends AIProvider {
|
|
|
885
883
|
return CURSOR_AGENT_MODELS;
|
|
886
884
|
}
|
|
887
885
|
|
|
888
|
-
static getDefaultModel() {
|
|
889
|
-
return DEFAULT_CURSOR_AGENT_MODEL;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
886
|
static getInstallInstructions() {
|
|
893
887
|
return 'Install Cursor Agent CLI: https://cursor.com/docs/cli/using\n' +
|
|
894
888
|
'Run "agent login" to authenticate after installation.';
|
package/src/ai/muse-provider.js
CHANGED
|
@@ -149,17 +149,6 @@ function attemptIdOf(record) {
|
|
|
149
149
|
return payload?.run_stream?.id || payload?.command_id || record?.causation_id || null;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
/**
|
|
153
|
-
* The provider's default model.
|
|
154
|
-
*
|
|
155
|
-
* DELIBERATE: this is the NON-contributor model, even though the muse CLI's own
|
|
156
|
-
* default is `muse-spark-1.3-contributor`. Pair-review sends potentially
|
|
157
|
-
* proprietary source code to the model, and the contributor tier is discounted
|
|
158
|
-
* precisely because Meta may use that content for product improvement. Opting
|
|
159
|
-
* into data sharing must be an explicit user choice, never a silent default.
|
|
160
|
-
*/
|
|
161
|
-
const DEFAULT_MUSE_MODEL = 'muse-spark-1.3-high';
|
|
162
|
-
|
|
163
152
|
/**
|
|
164
153
|
* Muse model definitions with tier mappings.
|
|
165
154
|
*
|
|
@@ -258,6 +247,12 @@ const MUSE_MODELS = [
|
|
|
258
247
|
description: 'Meta\'s coding model with high reasoning effort and roughly 1M tokens of context—strong everyday PR review across large diffs.',
|
|
259
248
|
badge: 'Recommended',
|
|
260
249
|
badgeClass: 'badge-recommended',
|
|
250
|
+
// DELIBERATE: the default is the NON-contributor model, even though the
|
|
251
|
+
// muse CLI's own default is `muse-spark-1.3-contributor`. Pair-review sends
|
|
252
|
+
// potentially proprietary source code to the model, and the contributor
|
|
253
|
+
// tier is discounted precisely because Meta may use that content for
|
|
254
|
+
// product improvement. Opting into data sharing must be an explicit user
|
|
255
|
+
// choice, never a silent default.
|
|
261
256
|
default: true
|
|
262
257
|
},
|
|
263
258
|
{
|
|
@@ -308,7 +303,7 @@ class MuseProvider extends AIProvider {
|
|
|
308
303
|
* @param {Object[]} configOverrides.models - Custom model definitions
|
|
309
304
|
* @param {boolean} configOverrides.yolo - Bypass approval and sandbox
|
|
310
305
|
*/
|
|
311
|
-
constructor(model =
|
|
306
|
+
constructor(model = MuseProvider.getDefaultModel(), configOverrides = {}) {
|
|
312
307
|
super(model);
|
|
313
308
|
|
|
314
309
|
// Command precedence: ENV > config > default. A blank or whitespace-only
|
|
@@ -1236,10 +1231,6 @@ class MuseProvider extends AIProvider {
|
|
|
1236
1231
|
return MUSE_MODELS;
|
|
1237
1232
|
}
|
|
1238
1233
|
|
|
1239
|
-
static getDefaultModel() {
|
|
1240
|
-
return DEFAULT_MUSE_MODEL;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
1234
|
static getInstallInstructions() {
|
|
1244
1235
|
// `muse` on PATH is a self-updating launcher script that downloads the real
|
|
1245
1236
|
// binary alongside itself (macOS and Linux, arm64 and x86_64).
|
package/src/ai/omp-provider.js
CHANGED
|
@@ -271,11 +271,6 @@ class OmpProvider extends PiStyleProvider {
|
|
|
271
271
|
return OMP_MODELS;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
static getDefaultModel() {
|
|
275
|
-
const defaultModel = OMP_MODELS.find(m => m.default);
|
|
276
|
-
return defaultModel ? defaultModel.id : null;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
274
|
static getInstallInstructions() {
|
|
280
275
|
return 'Install OMP (Oh My Pi): npm install -g @oh-my-pi/pi-coding-agent\n' +
|
|
281
276
|
'Or visit: https://github.com/can1357/oh-my-pi';
|
|
@@ -690,11 +690,6 @@ class OpenCodeProvider extends AIProvider {
|
|
|
690
690
|
return OPENCODE_MODELS;
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
static getDefaultModel() {
|
|
694
|
-
// No built-in default - must be configured via config.json
|
|
695
|
-
return null;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
693
|
static getInstallInstructions() {
|
|
699
694
|
return 'Install OpenCode: curl -fsSL https://opencode.ai/install | bash\n' +
|
|
700
695
|
'Or visit: https://opencode.ai';
|
package/src/ai/pi-provider.js
CHANGED
|
@@ -294,11 +294,6 @@ class PiProvider extends PiStyleProvider {
|
|
|
294
294
|
return PI_MODELS;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
static getDefaultModel() {
|
|
298
|
-
const defaultModel = PI_MODELS.find(m => m.default);
|
|
299
|
-
return defaultModel ? defaultModel.id : null;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
297
|
static getInstallInstructions() {
|
|
303
298
|
return 'Install Pi: npm install -g @mariozechner/pi-coding-agent\n' +
|
|
304
299
|
'Or visit: https://github.com/badlogic/pi-mono';
|
package/src/ai/provider.js
CHANGED
|
@@ -158,11 +158,15 @@ class AIProvider {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
|
-
* Get the default model for this provider
|
|
162
|
-
*
|
|
161
|
+
* Get the default model for this provider: the built-in entry flagged
|
|
162
|
+
* `default: true`. Move that flag to change a provider's default.
|
|
163
|
+
* @returns {string|null} Model id, or null when no entry is flagged
|
|
163
164
|
*/
|
|
164
165
|
static getDefaultModel() {
|
|
165
|
-
|
|
166
|
+
// In a static method, `this` is the class the method was called on
|
|
167
|
+
// (e.g. CodexProvider.getDefaultModel()), so this reads that provider's
|
|
168
|
+
// own catalog. `?.` and `?? null` return null when no entry is flagged.
|
|
169
|
+
return this.getModels().find(m => m.default)?.id ?? null;
|
|
166
170
|
}
|
|
167
171
|
|
|
168
172
|
/**
|
|
@@ -590,7 +594,7 @@ function resolveCliModelConfig(builtIn, configModel, modelId) {
|
|
|
590
594
|
* Match a model definition against a selector that may be the model's canonical
|
|
591
595
|
* id OR one of its aliases. Used by config-driven selectors (`default_model`,
|
|
592
596
|
* `disabled_models`, `models` overrides) so legacy config naming an alias (e.g.
|
|
593
|
-
* `opus`, an alias of the canonical `opus-
|
|
597
|
+
* `opus`, an alias of the canonical `opus-5.5-xhigh`) keeps working.
|
|
594
598
|
*
|
|
595
599
|
* Optional-chaining is intentional: a model with no `aliases` short-circuits to
|
|
596
600
|
* undefined/falsy, so no Array.isArray guard is needed.
|
|
@@ -781,7 +785,7 @@ function applyConfigOverrides(config) {
|
|
|
781
785
|
|
|
782
786
|
// Canonicalize alias-keyed override ids to their built-in canonical id.
|
|
783
787
|
// A config entry may key a model by a short alias (e.g. `opus` for the
|
|
784
|
-
// canonical `opus-
|
|
788
|
+
// canonical `opus-5.5-xhigh`). mergeModels() already resolves aliases for the
|
|
785
789
|
// display/metadata path, but the runtime path forwards this raw `models` array
|
|
786
790
|
// to the provider instance, where per-model config is looked up by EXACT id
|
|
787
791
|
// (e.g. `configOverrides.models.find(m => m.id === model)`). The frontend
|
|
@@ -893,7 +897,7 @@ function mergeModels(builtInModels, configModels) {
|
|
|
893
897
|
}
|
|
894
898
|
// Replace overridden built-ins in-place to preserve display order. An override
|
|
895
899
|
// matched by alias (e.g. config `{ id: 'opus' }` against built-in
|
|
896
|
-
// `opus-
|
|
900
|
+
// `opus-5.5-xhigh`) still replaces, but keeps the canonical built-in id.
|
|
897
901
|
const matched = new Set();
|
|
898
902
|
const merged = builtInModels.map(bm => {
|
|
899
903
|
const override = configModels.find(cm => modelMatches(bm, cm.id));
|
|
@@ -66,7 +66,7 @@ class ChatSessionManager {
|
|
|
66
66
|
const selector = model || providerDef?.model || null;
|
|
67
67
|
|
|
68
68
|
// Canonicalise BEFORE the INSERT. Both the request and `chat_providers.<id>.model`
|
|
69
|
-
// may name a model by alias (`opus` -> `opus-
|
|
69
|
+
// may name a model by alias (`opus` -> `opus-5.5-xhigh`); storing the alias would
|
|
70
70
|
// leave the sessions list, the hook payload, and the picker's checkmark disagreeing
|
|
71
71
|
// with the catalog. `resolution.id` is exactly what to store: the canonical id when
|
|
72
72
|
// known, the raw selector for a passthrough (raw CLI strings are supported), and
|
package/src/config.js
CHANGED
|
@@ -68,12 +68,12 @@ const DEFAULT_CONFIG = {
|
|
|
68
68
|
single_port: true, // When true, reuse a single server on the configured port; new invocations delegate to the running server
|
|
69
69
|
theme: "light",
|
|
70
70
|
default_provider: "claude", // AI provider: 'claude', 'antigravity', 'codex', 'copilot', 'opencode', 'cursor-agent', 'pi', 'omp', 'muse'
|
|
71
|
-
default_model: "opus",
|
|
71
|
+
default_model: "opus-5.5-high", // Model within the provider (e.g., 'opus-5.5-high' for Claude, 'gemini-3.8-flash-high' for Antigravity)
|
|
72
72
|
tours: {
|
|
73
73
|
enabled: false, // When true, the guided-tour feature is available (toolbar button visible, etc.)
|
|
74
74
|
auto_generate: true, // When true, a tour generation job is kicked off automatically on review load
|
|
75
75
|
provider: "", // Provider for agentic tour generation. Empty = falls back to summaries.provider, then default_provider
|
|
76
|
-
model: "" // Model for tour generation. Empty =
|
|
76
|
+
model: "" // Model for tour generation. Empty = uses summaries.model, then the provider's default model, then default_model
|
|
77
77
|
},
|
|
78
78
|
summaries: {
|
|
79
79
|
enabled: false, // When true, the hunk-summaries feature is available (toolbar button + per-file toggles visible)
|
|
@@ -233,7 +233,7 @@ function getSummaryProvider(config) {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
* Gets the
|
|
236
|
+
* Gets the model for hunk-summary generation
|
|
237
237
|
* Resolution order: summaries.model → providerClass fast-tier → provider
|
|
238
238
|
* default (when the summary provider differs from the global default
|
|
239
239
|
* provider) → default_model
|
|
@@ -291,15 +291,36 @@ function getTourProvider(config) {
|
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
293
|
* Gets the model for tour generation.
|
|
294
|
-
* Resolution order: tours.model → summaries.model → providerClass
|
|
294
|
+
* Resolution order: tours.model → summaries.model → providerClass built-in
|
|
295
|
+
* default → default_model
|
|
296
|
+
*
|
|
297
|
+
* Unlike getSummaryModel, this does not pick the fast tier: a tour is an
|
|
298
|
+
* agentic walk of the codebase, which calls for the provider's default model.
|
|
299
|
+
* The provider default wins even when the tour provider IS the global
|
|
300
|
+
* default provider — configs written before a default-model change still
|
|
301
|
+
* carry the old global `default_model`, and that should not decide the tour
|
|
302
|
+
* model. An explicit `summaries.model` still applies. Providers with no
|
|
303
|
+
* built-in default (e.g. OpenCode returns null) fall through to
|
|
304
|
+
* default_model.
|
|
305
|
+
*
|
|
306
|
+
* Known limitation (same as getSummaryModel): this reads the provider class's
|
|
307
|
+
* STATIC built-in default, so per-provider config overrides
|
|
308
|
+
* (`providers.<id>.models` / `default_model` / `disabled_models`) are not
|
|
309
|
+
* applied here.
|
|
310
|
+
*
|
|
295
311
|
* @param {Object} config - Configuration object
|
|
296
|
-
* @param {Function} [providerClass] - Optional provider class with static
|
|
312
|
+
* @param {Function} [providerClass] - Optional provider class with static getDefaultModel()
|
|
297
313
|
* @returns {string} - Model name
|
|
298
314
|
*/
|
|
299
315
|
function getTourModel(config, providerClass = null) {
|
|
300
|
-
const explicit = config && config.tours && config.tours.model
|
|
316
|
+
const explicit = (config && config.tours && config.tours.model)
|
|
317
|
+
|| (config && config.summaries && config.summaries.model);
|
|
301
318
|
if (explicit) return explicit;
|
|
302
|
-
|
|
319
|
+
if (providerClass && typeof providerClass.getDefaultModel === 'function') {
|
|
320
|
+
const providerDefault = providerClass.getDefaultModel();
|
|
321
|
+
if (providerDefault) return providerDefault;
|
|
322
|
+
}
|
|
323
|
+
return getDefaultModel(config);
|
|
303
324
|
}
|
|
304
325
|
|
|
305
326
|
/**
|
|
@@ -627,6 +648,10 @@ function isExclusiveAltHost(repoConfig) {
|
|
|
627
648
|
* is consulted. The repo's explicit `features` block (written for the alt host)
|
|
628
649
|
* also does not apply to its github.com binding.
|
|
629
650
|
*
|
|
651
|
+
* The binding also carries `cloneUrl` — the repo's explicitly configured
|
|
652
|
+
* `clone_url`, or `null` when unset. Like `features`, it describes the ALT
|
|
653
|
+
* host, so the github.com binding of a DUAL repo always reports `null`.
|
|
654
|
+
*
|
|
630
655
|
* Refreshable sources (`repo:token_command`, `config:github_token_command`)
|
|
631
656
|
* additionally carry a `refresh` closure on the returned binding. Calling
|
|
632
657
|
* `refresh()` busts the cached token for that exact source, re-runs the
|
|
@@ -638,7 +663,7 @@ function isExclusiveAltHost(repoConfig) {
|
|
|
638
663
|
* @param {string|null|undefined} repository - "owner/repo" identifier, or null/undefined for no-repo fallback
|
|
639
664
|
* @param {Object} config - Configuration object from loadConfig()
|
|
640
665
|
* @param {{ host?: string|null }} [options] - Per-PR host override (see above)
|
|
641
|
-
* @returns {{ apiHost: string|null, host: string|null, token: string, features: Object, source: string, refresh: (function(): string)|null }}
|
|
666
|
+
* @returns {{ apiHost: string|null, host: string|null, token: string, features: Object, cloneUrl: string|null, source: string, refresh: (function(): string)|null }}
|
|
642
667
|
*/
|
|
643
668
|
function resolveHostBinding(repository, config, options = {}) {
|
|
644
669
|
const safeConfig = config || {};
|
|
@@ -688,6 +713,14 @@ function resolveHostBinding(repository, config, options = {}) {
|
|
|
688
713
|
const explicitFeatures = isDualGithubBinding ? undefined : repoConfig?.features;
|
|
689
714
|
const features = _resolveFeatures(apiHost, explicitFeatures);
|
|
690
715
|
|
|
716
|
+
// Explicitly configured canonical clone URL for this repo. Like `features`,
|
|
717
|
+
// it describes the alt host, so a dual repo's github.com binding does not
|
|
718
|
+
// carry it (github.com's API reports the right clone_url itself).
|
|
719
|
+
const configuredCloneUrl = (repoConfig && typeof repoConfig.clone_url === 'string' && repoConfig.clone_url)
|
|
720
|
+
? repoConfig.clone_url
|
|
721
|
+
: null;
|
|
722
|
+
const cloneUrl = isDualGithubBinding ? null : configuredCloneUrl;
|
|
723
|
+
|
|
691
724
|
// Token resolution
|
|
692
725
|
let token = '';
|
|
693
726
|
let source = 'none';
|
|
@@ -697,7 +730,7 @@ function resolveHostBinding(repository, config, options = {}) {
|
|
|
697
730
|
token = process.env.GITHUB_TOKEN;
|
|
698
731
|
source = 'env:GITHUB_TOKEN';
|
|
699
732
|
logger.debug('Using GitHub token from GITHUB_TOKEN environment variable');
|
|
700
|
-
return { apiHost, host: apiHost, token, features, source, refresh: null };
|
|
733
|
+
return { apiHost, host: apiHost, token, features, cloneUrl, source, refresh: null };
|
|
701
734
|
}
|
|
702
735
|
|
|
703
736
|
// 2. Repo-level literal token (alt-host credential; not used for a dual
|
|
@@ -706,7 +739,7 @@ function resolveHostBinding(repository, config, options = {}) {
|
|
|
706
739
|
token = repoConfig.token;
|
|
707
740
|
source = 'repo:token';
|
|
708
741
|
logger.debug(`Using token from repos[${repository}].token`);
|
|
709
|
-
return { apiHost, host: apiHost, token, features, source, refresh: null };
|
|
742
|
+
return { apiHost, host: apiHost, token, features, cloneUrl, source, refresh: null };
|
|
710
743
|
}
|
|
711
744
|
|
|
712
745
|
// 3. Repo-level token_command
|
|
@@ -718,6 +751,7 @@ function resolveHostBinding(repository, config, options = {}) {
|
|
|
718
751
|
host: apiHost,
|
|
719
752
|
token: result,
|
|
720
753
|
features,
|
|
754
|
+
cloneUrl,
|
|
721
755
|
source: 'repo:token_command',
|
|
722
756
|
refresh: _makeRefresh(repository, safeConfig, 'repo:token_command', options)
|
|
723
757
|
};
|
|
@@ -731,7 +765,7 @@ function resolveHostBinding(repository, config, options = {}) {
|
|
|
731
765
|
token = safeConfig.github_token;
|
|
732
766
|
source = 'config:github_token';
|
|
733
767
|
logger.debug('Using GitHub token from config.github_token');
|
|
734
|
-
return { apiHost, host: apiHost, token, features, source, refresh: null };
|
|
768
|
+
return { apiHost, host: apiHost, token, features, cloneUrl, source, refresh: null };
|
|
735
769
|
}
|
|
736
770
|
|
|
737
771
|
// 5. Top-level github_token_command. Like step 4, github.com-only.
|
|
@@ -747,6 +781,7 @@ function resolveHostBinding(repository, config, options = {}) {
|
|
|
747
781
|
host: apiHost,
|
|
748
782
|
token: result,
|
|
749
783
|
features,
|
|
784
|
+
cloneUrl,
|
|
750
785
|
source: 'config:github_token_command',
|
|
751
786
|
refresh: _makeRefresh(repository, safeConfig, 'config:github_token_command', options)
|
|
752
787
|
};
|
|
@@ -758,7 +793,7 @@ function resolveHostBinding(repository, config, options = {}) {
|
|
|
758
793
|
} else {
|
|
759
794
|
logger.debug('No token resolved for host binding');
|
|
760
795
|
}
|
|
761
|
-
return { apiHost, host: apiHost, token: '', features, source: 'none', refresh: null };
|
|
796
|
+
return { apiHost, host: apiHost, token: '', features, cloneUrl, source: 'none', refresh: null };
|
|
762
797
|
}
|
|
763
798
|
|
|
764
799
|
/**
|
|
@@ -1091,6 +1126,18 @@ function validateRepoConfig(config) {
|
|
|
1091
1126
|
}
|
|
1092
1127
|
}
|
|
1093
1128
|
|
|
1129
|
+
// Optional canonical clone URL for the repository. Primarily for alt
|
|
1130
|
+
// hosts whose API omits `base.repo.clone_url` on the PR response; without
|
|
1131
|
+
// it pair-review falls back to a github.com URL, which matches the wrong
|
|
1132
|
+
// local remote and clones from the wrong host.
|
|
1133
|
+
if (repoEntry.clone_url !== undefined && repoEntry.clone_url !== null) {
|
|
1134
|
+
if (typeof repoEntry.clone_url !== 'string' || !repoEntry.clone_url) {
|
|
1135
|
+
throw new Error(
|
|
1136
|
+
`Invalid pair-review config: repos["${repoKey}"].clone_url must be a non-empty string.`
|
|
1137
|
+
);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1094
1141
|
const links = repoEntry.links;
|
|
1095
1142
|
if (links && typeof links === 'object' && links.external !== undefined && links.external !== null) {
|
|
1096
1143
|
const ext = links.external;
|
|
@@ -1482,6 +1529,65 @@ function getRepoSkipBulkFetch(config, repository) {
|
|
|
1482
1529
|
return repoConfig?.skip_bulk_fetch === true;
|
|
1483
1530
|
}
|
|
1484
1531
|
|
|
1532
|
+
/**
|
|
1533
|
+
* Gets the explicitly configured canonical clone URL for a repository.
|
|
1534
|
+
*
|
|
1535
|
+
* Primarily for alt hosts whose GitHub-compatible REST API omits
|
|
1536
|
+
* `base.repo.clone_url` from the pull request response. When configured, it
|
|
1537
|
+
* is the URL matched against the local checkout's `git remote -v` entries to
|
|
1538
|
+
* pick the fetch remote, and the URL used for a fresh clone when no local
|
|
1539
|
+
* checkout exists.
|
|
1540
|
+
*
|
|
1541
|
+
* @param {Object} config - Configuration object from loadConfig()
|
|
1542
|
+
* @param {string} repository - Repository in "owner/repo" format
|
|
1543
|
+
* @returns {string|null} - Clone URL or null if not configured
|
|
1544
|
+
*/
|
|
1545
|
+
function getRepoCloneUrl(config, repository) {
|
|
1546
|
+
const repoConfig = getRepoConfig(config || {}, repository);
|
|
1547
|
+
const value = repoConfig?.clone_url;
|
|
1548
|
+
return (typeof value === 'string' && value) ? value : null;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Host-aware variant of {@link getRepoCloneUrl}.
|
|
1553
|
+
*
|
|
1554
|
+
* `clone_url`, like `features`, describes the repo's ALT host, so the
|
|
1555
|
+
* github.com binding of a DUAL repo (`api_host` set with `exclusive: false`)
|
|
1556
|
+
* must not report it — github.com's API reports the right `clone_url` itself.
|
|
1557
|
+
* This mirrors the `isDualGithubBinding` guard in `resolveHostBinding`, for
|
|
1558
|
+
* callers that need the configured URL WITHOUT resolving a full binding (e.g.
|
|
1559
|
+
* restore mode, which never contacts an API).
|
|
1560
|
+
*
|
|
1561
|
+
* `host` follows the `resolveHostBinding` options convention:
|
|
1562
|
+
* - `undefined` — host unknown; apply the ambiguity rule (an EXCLUSIVE
|
|
1563
|
+
* alt-host repo binds to its alt host, a DUAL or plain repo to github.com).
|
|
1564
|
+
* - `null` — github.com.
|
|
1565
|
+
* - `'<url>'` — an alt host.
|
|
1566
|
+
*
|
|
1567
|
+
* Unlike `resolveHostBinding` this never throws on a contradictory host: it
|
|
1568
|
+
* is an advisory lookup, and a bad host simply yields the conservative answer.
|
|
1569
|
+
*
|
|
1570
|
+
* @param {Object} config - Configuration object from loadConfig()
|
|
1571
|
+
* @param {string} repository - `repos[...]` config-lookup key
|
|
1572
|
+
* @param {string|null|undefined} host - The host this lookup is for (see above)
|
|
1573
|
+
* @returns {string|null} - Clone URL, or null when unset or not applicable
|
|
1574
|
+
*/
|
|
1575
|
+
function getRepoCloneUrlForHost(config, repository, host) {
|
|
1576
|
+
const repoConfig = getRepoConfig(config || {}, repository);
|
|
1577
|
+
const configuredApiHost = (repoConfig && typeof repoConfig.api_host === 'string' && repoConfig.api_host)
|
|
1578
|
+
? repoConfig.api_host
|
|
1579
|
+
: null;
|
|
1580
|
+
if (configuredApiHost !== null && !isExclusiveAltHost(repoConfig)) {
|
|
1581
|
+
// Dual repo: the ambiguity rule (host unknown) binds github.com, and so
|
|
1582
|
+
// does an explicit `null`. Either way the configured URL does not apply.
|
|
1583
|
+
const effectiveHost = host === undefined ? null : host;
|
|
1584
|
+
if (effectiveHost === null) {
|
|
1585
|
+
return null;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
return getRepoCloneUrl(config, repository);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1485
1591
|
/**
|
|
1486
1592
|
* Gets the configured pool size for a repository from file config only.
|
|
1487
1593
|
* Prefer resolvePoolConfig() when DB repo_settings are available.
|
|
@@ -1732,6 +1838,8 @@ module.exports = {
|
|
|
1732
1838
|
resolveRepoOptions,
|
|
1733
1839
|
getRepoResetScript,
|
|
1734
1840
|
getRepoSkipBulkFetch,
|
|
1841
|
+
getRepoCloneUrl,
|
|
1842
|
+
getRepoCloneUrlForHost,
|
|
1735
1843
|
getRepoPoolSize,
|
|
1736
1844
|
getRepoPoolFetchInterval,
|
|
1737
1845
|
getRepoLoadSkills,
|
package/src/git/worktree.js
CHANGED
|
@@ -73,6 +73,11 @@ class GitWorktreeManager {
|
|
|
73
73
|
* repository's git config. This preserves proxy/mirror setups where the
|
|
74
74
|
* canonical fetch URL may differ from GitHub's clone URL.
|
|
75
75
|
*
|
|
76
|
+
* A remote matching `cloneUrl` always wins over one matching `sshUrl`,
|
|
77
|
+
* regardless of `git remote -v` ordering: `cloneUrl` may be the user's
|
|
78
|
+
* explicitly configured `repos[...].clone_url`, while `sshUrl` still comes
|
|
79
|
+
* from the API and can name a different host.
|
|
80
|
+
*
|
|
76
81
|
* @param {Object} git - simple-git instance
|
|
77
82
|
* @param {string} cloneUrl - HTTPS clone URL of the target repository
|
|
78
83
|
* @param {string} sshUrl - SSH URL of the target repository (may be empty/null)
|
|
@@ -88,10 +93,15 @@ class GitWorktreeManager {
|
|
|
88
93
|
throw new Error(`No remotes configured — cannot resolve base repository for ${cloneUrl}`);
|
|
89
94
|
}
|
|
90
95
|
|
|
91
|
-
// Parse remote output into { name: url } map (fetch URLs only)
|
|
96
|
+
// Parse remote output into { name: url } map (fetch URLs only).
|
|
97
|
+
// `git remote -v` annotates a partial-clone remote's fetch line with its
|
|
98
|
+
// object filter (`origin<TAB>https://… (fetch) [blob:none]`), so the
|
|
99
|
+
// `(fetch)` marker is not always the end of the line. Anchoring on it
|
|
100
|
+
// would drop every filtered remote — typically `origin` itself on a
|
|
101
|
+
// partial clone — and send resolution to an unrelated remote.
|
|
92
102
|
const remotes = {};
|
|
93
103
|
for (const line of remoteOutput.trim().split('\n')) {
|
|
94
|
-
const match = line.match(/^(\S+)\s+(\S+)\s+\(fetch\)
|
|
104
|
+
const match = line.match(/^(\S+)\s+(\S+)\s+\(fetch\)(?:\s|$)/);
|
|
95
105
|
if (match) {
|
|
96
106
|
remotes[match[1]] = match[2];
|
|
97
107
|
}
|
|
@@ -122,16 +132,25 @@ class GitWorktreeManager {
|
|
|
122
132
|
? 'origin'
|
|
123
133
|
: remoteNames.find((name) => name !== MANAGED_REMOTE) || 'origin';
|
|
124
134
|
|
|
125
|
-
// Check each non-managed remote for a direct URL match
|
|
126
|
-
|
|
127
|
-
|
|
135
|
+
// Check each non-managed remote for a direct URL match, in TWO passes:
|
|
136
|
+
// the clone URL first across every remote, only then the SSH URL.
|
|
137
|
+
//
|
|
138
|
+
// A single pass would let `git remote -v` ordering decide between them,
|
|
139
|
+
// which breaks an explicitly configured `repos[...].clone_url`: that value
|
|
140
|
+
// replaces the API's `base.repo.clone_url` but NOT its `ssh_url`, so an
|
|
141
|
+
// earlier-sorting remote matching the (possibly wrong-host) API ssh_url
|
|
142
|
+
// would outrank the remote the user pointed us at. When both URLs name the
|
|
143
|
+
// same repository the two passes pick the same remote as before.
|
|
144
|
+
const nonManagedRemotes = Object.entries(remotes).filter(([name]) => name !== MANAGED_REMOTE);
|
|
145
|
+
for (const target of [normalizedCloneUrl, normalizedSshUrl]) {
|
|
146
|
+
if (!target) {
|
|
128
147
|
continue;
|
|
129
148
|
}
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
(
|
|
133
|
-
|
|
134
|
-
|
|
149
|
+
for (const [name, url] of nonManagedRemotes) {
|
|
150
|
+
if (normalizeUrl(url) === target) {
|
|
151
|
+
console.log(`Found matching remote '${name}' for base repository`);
|
|
152
|
+
return name;
|
|
153
|
+
}
|
|
135
154
|
}
|
|
136
155
|
}
|
|
137
156
|
|
package/src/github/client.js
CHANGED
|
@@ -50,8 +50,15 @@ function withAuthorizationPrefix(token) {
|
|
|
50
50
|
* `refresh: null`, so a github.com PAT client behaves exactly as before
|
|
51
51
|
* (no hook-driven retry).
|
|
52
52
|
*
|
|
53
|
+
* The optional `cloneUrl` from an object binding (the repo's explicitly
|
|
54
|
+
* configured `clone_url`) is carried through so `fetchPullRequest` can report
|
|
55
|
+
* it in place of the API's `base.repo.clone_url` — some GitHub-compatible
|
|
56
|
+
* hosts omit that field entirely. The legacy bare-token path keeps
|
|
57
|
+
* `cloneUrl: null`, so a github.com PAT client reports exactly what the API
|
|
58
|
+
* returned.
|
|
59
|
+
*
|
|
53
60
|
* @param {string|Object} arg - Token string or binding object
|
|
54
|
-
* @returns {{ token: string, apiHost: string|null, features: Object, refresh: (function(): (string|Promise<string>))|null }}
|
|
61
|
+
* @returns {{ token: string, apiHost: string|null, features: Object, cloneUrl: string|null, refresh: (function(): (string|Promise<string>))|null }}
|
|
55
62
|
*/
|
|
56
63
|
function normaliseBinding(arg) {
|
|
57
64
|
if (typeof arg === 'string') {
|
|
@@ -59,6 +66,7 @@ function normaliseBinding(arg) {
|
|
|
59
66
|
token: arg,
|
|
60
67
|
apiHost: null,
|
|
61
68
|
features: { ...DEFAULT_FEATURES },
|
|
69
|
+
cloneUrl: null,
|
|
62
70
|
refresh: null
|
|
63
71
|
};
|
|
64
72
|
}
|
|
@@ -68,20 +76,23 @@ function normaliseBinding(arg) {
|
|
|
68
76
|
const features = (arg.features && typeof arg.features === 'object')
|
|
69
77
|
? { ...DEFAULT_FEATURES, ...arg.features }
|
|
70
78
|
: { ...DEFAULT_FEATURES };
|
|
79
|
+
const cloneUrl = (typeof arg.cloneUrl === 'string' && arg.cloneUrl) ? arg.cloneUrl : null;
|
|
71
80
|
const refresh = typeof arg.refresh === 'function' ? arg.refresh : null;
|
|
72
|
-
return { token, apiHost, features, refresh };
|
|
81
|
+
return { token, apiHost, features, cloneUrl, refresh };
|
|
73
82
|
}
|
|
74
|
-
return { token: '', apiHost: null, features: { ...DEFAULT_FEATURES }, refresh: null };
|
|
83
|
+
return { token: '', apiHost: null, features: { ...DEFAULT_FEATURES }, cloneUrl: null, refresh: null };
|
|
75
84
|
}
|
|
76
85
|
|
|
77
86
|
/**
|
|
78
87
|
* GitHub API client wrapper with error handling and rate limiting.
|
|
79
88
|
*
|
|
80
89
|
* Constructor accepts either a bare token string (legacy) or a binding
|
|
81
|
-
* object `{ token, apiHost, features }` returned by
|
|
90
|
+
* object `{ token, apiHost, features, cloneUrl }` returned by
|
|
82
91
|
* `resolveHostBinding()`. When a binding is provided, `apiHost` is passed
|
|
83
|
-
* to Octokit as `baseUrl` (defaults to `api.github.com` when null)
|
|
84
|
-
* `features` controls per-area dispatch into the operations layer
|
|
92
|
+
* to Octokit as `baseUrl` (defaults to `api.github.com` when null),
|
|
93
|
+
* `features` controls per-area dispatch into the operations layer, and
|
|
94
|
+
* `cloneUrl` (the repo's configured `clone_url`) overrides the clone URL
|
|
95
|
+
* reported by `fetchPullRequest`.
|
|
85
96
|
*
|
|
86
97
|
* The public method signatures remain identical to the pre-refactor
|
|
87
98
|
* shape — all GraphQL operations are now thin delegations to the
|
|
@@ -98,6 +109,11 @@ class GitHubClient {
|
|
|
98
109
|
this.features = binding.features;
|
|
99
110
|
this.apiHost = binding.apiHost;
|
|
100
111
|
this.token = binding.token;
|
|
112
|
+
// Explicitly configured canonical clone URL for this repo (`repos[...]
|
|
113
|
+
// .clone_url`), or null. Wins over the API's `base.repo.clone_url` in
|
|
114
|
+
// `fetchPullRequest` — it is the user's direct statement of where the git
|
|
115
|
+
// objects live, and some alt hosts omit the API field altogether.
|
|
116
|
+
this.cloneUrl = binding.cloneUrl;
|
|
101
117
|
// Capability to obtain a fresh token (e.g. re-run a token_command).
|
|
102
118
|
// Only present for refreshable bindings; null for bare-token / literal
|
|
103
119
|
// / env sources, which therefore get NO 401 refresh-and-retry behaviour.
|
|
@@ -257,11 +273,15 @@ class GitHubClient {
|
|
|
257
273
|
mergeable: data.mergeable,
|
|
258
274
|
mergeable_state: data.mergeable_state,
|
|
259
275
|
html_url: data.html_url,
|
|
276
|
+
// `base.repo` is absent on some GitHub-compatible hosts, so every
|
|
277
|
+
// field is read defensively. A configured `clone_url` wins over the
|
|
278
|
+
// API's value: it is the user's explicit statement of where the git
|
|
279
|
+
// objects live.
|
|
260
280
|
repository: {
|
|
261
|
-
full_name: data.base
|
|
262
|
-
clone_url: data.base
|
|
263
|
-
ssh_url: data.base
|
|
264
|
-
default_branch: data.base
|
|
281
|
+
full_name: data.base?.repo?.full_name || `${owner}/${repo}`,
|
|
282
|
+
clone_url: this.cloneUrl || data.base?.repo?.clone_url,
|
|
283
|
+
ssh_url: data.base?.repo?.ssh_url,
|
|
284
|
+
default_branch: data.base?.repo?.default_branch
|
|
265
285
|
}
|
|
266
286
|
};
|
|
267
287
|
} catch (error) {
|
package/src/main.js
CHANGED
|
@@ -230,18 +230,19 @@ OPTIONS:
|
|
|
230
230
|
--model <name> Override the AI model. Claude Code is the default provider.
|
|
231
231
|
Available models: opus, sonnet, haiku (Claude Code);
|
|
232
232
|
also: fable-5.1-xhigh, fable-5.1-high,
|
|
233
|
-
fable-5-xhigh, fable-5-high, opus-5-xhigh,
|
|
234
|
-
opus-5-high, opus-
|
|
235
|
-
opus-4.
|
|
236
|
-
opus-4.
|
|
237
|
-
sonnet-4.6
|
|
238
|
-
(default is opus-5-high; opus is Opus
|
|
233
|
+
fable-5-xhigh, fable-5-high, opus-5.5-xhigh,
|
|
234
|
+
opus-5.5-high, opus-5-xhigh, opus-5-high,
|
|
235
|
+
opus-4.8-xhigh, opus-4.8-high, opus-4.7-xhigh,
|
|
236
|
+
opus-4.7-high, opus-4.6-high, opus-4.6-1m,
|
|
237
|
+
sonnet-5-xhigh, sonnet-5-high, sonnet-4.6
|
|
238
|
+
(default is opus-5.5-high; opus is Opus 5.5 XHigh;
|
|
239
|
+
a saved default_model wins over the default)
|
|
239
240
|
or use provider-specific models with Antigravity/Codex
|
|
240
241
|
--provider <name> Override the AI provider for headless modes
|
|
241
242
|
(--ai-draft / --ai-review). Defaults to the
|
|
242
243
|
repo/app default provider (claude). Pair with
|
|
243
244
|
--model when the model belongs to a non-default
|
|
244
|
-
provider (e.g. --provider codex --model gpt-5.
|
|
245
|
+
provider (e.g. --provider codex --model gpt-5.6-sol-high).
|
|
245
246
|
Available: claude, antigravity, codex, copilot,
|
|
246
247
|
opencode, cursor-agent, pi, omp, muse
|
|
247
248
|
--council <handle> Run analysis with a saved council (multi-voice). Handle is a
|
|
@@ -152,7 +152,7 @@ function sanitizeSingleConfig(config) {
|
|
|
152
152
|
// to the provider's own default rather than forwarding an invalid pair. Unknown
|
|
153
153
|
// providers (custom/unavailable, not in the registry) pass through unchanged.
|
|
154
154
|
// A model "belongs" to the provider if config.model matches a model id OR one of
|
|
155
|
-
// its aliases (e.g. 'opus' is an alias of the canonical 'opus-
|
|
155
|
+
// its aliases (e.g. 'opus' is an alias of the canonical 'opus-5.5-xhigh'). Matching
|
|
156
156
|
// id-only would wrongly treat a valid alias as a mismatched pair and silently coerce
|
|
157
157
|
// it to the provider default.
|
|
158
158
|
let normalizedModel = config.model;
|
package/src/settings/registry.js
CHANGED
|
@@ -129,7 +129,7 @@ const REGISTRY = [
|
|
|
129
129
|
description: "Model within the default provider for the Default Provider/Model analysis and single-model tasks.",
|
|
130
130
|
group: 'ai',
|
|
131
131
|
type: 'string',
|
|
132
|
-
default: 'opus',
|
|
132
|
+
default: 'opus-5.5-high',
|
|
133
133
|
editable: true,
|
|
134
134
|
restartRequired: false
|
|
135
135
|
},
|
|
@@ -230,7 +230,7 @@ const REGISTRY = [
|
|
|
230
230
|
{
|
|
231
231
|
key: 'tours.model',
|
|
232
232
|
label: 'Tours model',
|
|
233
|
-
description:
|
|
233
|
+
description: "Model for tour generation. Empty uses the summaries model if set, then the provider's default model.",
|
|
234
234
|
group: 'tours',
|
|
235
235
|
type: 'string',
|
|
236
236
|
default: '',
|
package/src/setup/pr-setup.js
CHANGED
|
@@ -17,7 +17,7 @@ const { WorktreePoolLifecycle } = require('../git/worktree-pool-lifecycle');
|
|
|
17
17
|
const { GitHubClient } = require('../github/client');
|
|
18
18
|
const { normalizeRepository } = require('../utils/paths');
|
|
19
19
|
const { findMainGitRoot } = require('../local-review');
|
|
20
|
-
const { getConfigDir, getRepoPath, resolveRepoOptions, resolvePoolConfig, getRepoResetScript, resolveHostBinding, resolveBindingRepositoryFromPR, getRepoConfig, DEFAULT_CHECKOUT_TIMEOUT_MS } = require('../config');
|
|
20
|
+
const { getConfigDir, getRepoPath, resolveRepoOptions, resolvePoolConfig, getRepoResetScript, resolveHostBinding, resolveBindingRepositoryFromPR, getRepoConfig, getRepoCloneUrlForHost, DEFAULT_CHECKOUT_TIMEOUT_MS } = require('../config');
|
|
21
21
|
const { storedHostToOption, isDualHostRepoConfig, resolveRecordedHost, bindingRepositoryForHost } = require('../utils/host-resolution');
|
|
22
22
|
const logger = require('../utils/logger');
|
|
23
23
|
const { fireReviewStartedHook } = require('../hooks/payloads');
|
|
@@ -373,6 +373,37 @@ async function resolvePrHostBinding({ db, config, bindingRepository, owner, repo
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
/**
|
|
377
|
+
* Resolve which host a RESTORED PR lives on, without contacting any API.
|
|
378
|
+
*
|
|
379
|
+
* Restore mode replays a stored snapshot, so `resolvePrHostBinding` (which
|
|
380
|
+
* fetches) never runs. This applies the same host precedence minus the probe:
|
|
381
|
+
*
|
|
382
|
+
* 1. the explicit `host` parameter when defined (URL paste / dashboard row);
|
|
383
|
+
* 2. otherwise the stored `pr_metadata` row, read through the SAME
|
|
384
|
+
* `getPRHostWithRecordedUrl` + `resolveRecordedHost` pair that
|
|
385
|
+
* `resolvePrHostBinding` uses, so a pre-stamping NULL row is interpreted
|
|
386
|
+
* identically;
|
|
387
|
+
* 3. otherwise `undefined` — host unknown, leaving the caller's ambiguity
|
|
388
|
+
* rule to decide.
|
|
389
|
+
*
|
|
390
|
+
* @param {Object} params
|
|
391
|
+
* @param {Object} params.db
|
|
392
|
+
* @param {Object} params.config
|
|
393
|
+
* @param {string} params.bindingRepository - `repos[...]` config-lookup key
|
|
394
|
+
* @param {string} params.repository - normalized "owner/repo"
|
|
395
|
+
* @param {number} params.prNumber
|
|
396
|
+
* @param {string|null|undefined} params.host - explicit host override
|
|
397
|
+
* @returns {Promise<string|null|undefined>} The host, or `undefined` if unknown
|
|
398
|
+
*/
|
|
399
|
+
async function resolveRestoreHost({ db, config, bindingRepository, repository, prNumber, host }) {
|
|
400
|
+
if (host !== undefined) return host;
|
|
401
|
+
if (!db) return undefined;
|
|
402
|
+
const recorded = await new PRMetadataRepository(db).getPRHostWithRecordedUrl(repository, prNumber);
|
|
403
|
+
if (recorded === undefined) return undefined;
|
|
404
|
+
return resolveRecordedHost(config, bindingRepository, recorded.host, recorded.recordedUrl);
|
|
405
|
+
}
|
|
406
|
+
|
|
376
407
|
/**
|
|
377
408
|
* Register the known location of a GitHub repository in the database.
|
|
378
409
|
* This allows the web UI to find the repo without cloning when reviewing PRs.
|
|
@@ -646,6 +677,28 @@ async function setupPRReview({ db, owner, repo, prNumber, githubToken, bindingRe
|
|
|
646
677
|
|
|
647
678
|
if (isRestore) {
|
|
648
679
|
prData = restoreMetadata;
|
|
680
|
+
// Restore mode replays a stored snapshot and never calls the API, so
|
|
681
|
+
// `fetchPullRequest` never gets to substitute the repo's configured
|
|
682
|
+
// `clone_url`. Snapshots taken before the option existed (or from a host
|
|
683
|
+
// that omits `base.repo.clone_url` entirely) therefore carry no clone URL
|
|
684
|
+
// at all, and restore also skips `storePRData` — so the gap never heals.
|
|
685
|
+
// Hydrate a copy here so EVERY downstream consumer sees it: the clone in
|
|
686
|
+
// `findRepositoryPath` AND the `resolveRemoteForPR` calls reached via
|
|
687
|
+
// `acquireForPR` / `createWorktreeForPR`. Never mutate `restoreMetadata`
|
|
688
|
+
// itself — the caller may reuse that object.
|
|
689
|
+
if (config && !prData?.repository?.clone_url) {
|
|
690
|
+
const configuredCloneUrl = getRepoCloneUrlForHost(
|
|
691
|
+
config,
|
|
692
|
+
bindingRepository,
|
|
693
|
+
await resolveRestoreHost({ db, config, bindingRepository, repository, prNumber, host })
|
|
694
|
+
);
|
|
695
|
+
if (configuredCloneUrl) {
|
|
696
|
+
prData = {
|
|
697
|
+
...restoreMetadata,
|
|
698
|
+
repository: { ...(restoreMetadata.repository || {}), clone_url: configuredCloneUrl }
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
}
|
|
649
702
|
progress({ step: 'verify', status: 'completed', message: 'Restoring previous review state.' });
|
|
650
703
|
progress({ step: 'fetch', status: 'completed', message: 'Using stored PR data.' });
|
|
651
704
|
} else {
|