github-router 0.3.352 → 0.3.354

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 (72) hide show
  1. package/README.md +1 -38
  2. package/dist/ado-tools-CN4i9OVl.js +1 -0
  3. package/dist/{aic-statusline-settings-LnoxjBPe.js → aic-statusline-settings-EdsV1gzY.js} +6 -4
  4. package/dist/aic-statusline-settings-EdsV1gzY.js.map +1 -0
  5. package/dist/{attribution-settings-ul6VU6iP.js → attribution-settings-8Uv97n9j.js} +51 -39
  6. package/dist/{attribution-settings-ul6VU6iP.js.map → attribution-settings-8Uv97n9j.js.map} +1 -1
  7. package/dist/balanced-profile-contract-DtnTIBjL.js +105 -0
  8. package/dist/balanced-profile-contract-DtnTIBjL.js.map +1 -0
  9. package/dist/browser-ext/manifest.json +1 -1
  10. package/dist/{claude-xO1XW-Nn.js → claude-C_1OM7ce.js} +68 -59
  11. package/dist/claude-C_1OM7ce.js.map +1 -0
  12. package/dist/{claude-md-injection-BoXOsg7h.js → claude-md-injection-CDOoGNEJ.js} +20 -15
  13. package/dist/claude-md-injection-CDOoGNEJ.js.map +1 -0
  14. package/dist/{codex-DzUR40JA.js → codex-5eTmciDG.js} +5 -5
  15. package/dist/{codex-DzUR40JA.js.map → codex-5eTmciDG.js.map} +1 -1
  16. package/dist/{copilot-discount-C3jfysK-.js → copilot-discount-kpOLluHm.js} +3 -1
  17. package/dist/copilot-discount-kpOLluHm.js.map +1 -0
  18. package/dist/engine-CIAopp0h.js +1 -0
  19. package/dist/fast-profile-contract-JOnZBgFB.js +61 -0
  20. package/dist/fast-profile-contract-JOnZBgFB.js.map +1 -0
  21. package/dist/{gate-discovery-Cvdko01z.js → gate-discovery-CqJVzT_D.js} +2 -2
  22. package/dist/{gate-discovery-Cvdko01z.js.map → gate-discovery-CqJVzT_D.js.map} +1 -1
  23. package/dist/hooks.mjs +193 -12
  24. package/dist/hooks.sha256 +1 -1
  25. package/dist/{internal-aic-status-Dmi2bCsR.js → internal-aic-status-wYPsCG4r.js} +2 -2
  26. package/dist/{internal-aic-status-Dmi2bCsR.js.map → internal-aic-status-wYPsCG4r.js.map} +1 -1
  27. package/dist/{internal-fast-dispatch-guard-Cv7zf0ZI.js → internal-fast-dispatch-guard-A8teEib4.js} +1 -1
  28. package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js → internal-fast-dispatch-guard-D_TCtJhQ.js} +3 -2
  29. package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js.map → internal-fast-dispatch-guard-D_TCtJhQ.js.map} +1 -1
  30. package/dist/{internal-max-dispatch-guard-T-M7DRIW.js → internal-max-dispatch-guard-BM_B15EH.js} +1 -1
  31. package/dist/{internal-max-dispatch-guard-DkJixDmG.js → internal-max-dispatch-guard-D7ByWH4v.js} +2 -2
  32. package/dist/{internal-max-dispatch-guard-DkJixDmG.js.map → internal-max-dispatch-guard-D7ByWH4v.js.map} +1 -1
  33. package/dist/{internal-prompt-submit-B9MJxc3K.js → internal-prompt-submit-C77GnEaW.js} +3 -3
  34. package/dist/internal-prompt-submit-C77GnEaW.js.map +1 -0
  35. package/dist/{internal-prompt-submit-6OXEdQCK.js → internal-prompt-submit-CDTwamkW.js} +2 -2
  36. package/dist/{internal-rebrief-zIdunX3R.js → internal-rebrief-DZygfGHp.js} +6 -6
  37. package/dist/internal-rebrief-DZygfGHp.js.map +1 -0
  38. package/dist/{internal-stop-hook-DGcRVh_2.js → internal-stop-hook-Dn_AF0BF.js} +2 -2
  39. package/dist/{internal-stop-hook-DGcRVh_2.js.map → internal-stop-hook-Dn_AF0BF.js.map} +1 -1
  40. package/dist/main.js +11 -11
  41. package/dist/{max-profile-contract-DQDEDCsR.js → max-profile-contract-CMvzKSsg.js} +2 -2
  42. package/dist/max-profile-contract-CMvzKSsg.js.map +1 -0
  43. package/dist/{peer-mcp-personas-DDMKRFFG.js → peer-mcp-personas-DlF1dKCs.js} +142 -165
  44. package/dist/peer-mcp-personas-DlF1dKCs.js.map +1 -0
  45. package/dist/{pi-jVNeQXWf.js → pi-2m2IgZlm.js} +61 -62
  46. package/dist/pi-2m2IgZlm.js.map +1 -0
  47. package/dist/{provision-BtYRtvrj.js → provision-DLGlhu3a.js} +2 -2
  48. package/dist/{provision-BtYRtvrj.js.map → provision-DLGlhu3a.js.map} +1 -1
  49. package/dist/{serve-CmgmxigM.js → serve-8tXHVHOr.js} +7 -7
  50. package/dist/{serve-CmgmxigM.js.map → serve-8tXHVHOr.js.map} +1 -1
  51. package/dist/{server-setup-DinOFWiC.js → server-setup-BBSmse1J.js} +190 -127
  52. package/dist/server-setup-BBSmse1J.js.map +1 -0
  53. package/dist/{start-Dgsaz0HM.js → start-B7jTBpAc.js} +3 -3
  54. package/dist/{start-Dgsaz0HM.js.map → start-B7jTBpAc.js.map} +1 -1
  55. package/dist/{static-context-pack-CyucviRD.js → static-context-pack-BRqt4ajJ.js} +313 -6
  56. package/dist/static-context-pack-BRqt4ajJ.js.map +1 -0
  57. package/package.json +1 -1
  58. package/dist/ado-tools-xbuVU7YN.js +0 -1
  59. package/dist/aic-statusline-settings-LnoxjBPe.js.map +0 -1
  60. package/dist/balanced-profile-contract-XiIj4O1U.js +0 -127
  61. package/dist/balanced-profile-contract-XiIj4O1U.js.map +0 -1
  62. package/dist/claude-md-injection-BoXOsg7h.js.map +0 -1
  63. package/dist/claude-xO1XW-Nn.js.map +0 -1
  64. package/dist/copilot-discount-C3jfysK-.js.map +0 -1
  65. package/dist/engine-DwLIk1Zn.js +0 -1
  66. package/dist/internal-prompt-submit-B9MJxc3K.js.map +0 -1
  67. package/dist/internal-rebrief-zIdunX3R.js.map +0 -1
  68. package/dist/max-profile-contract-DQDEDCsR.js.map +0 -1
  69. package/dist/peer-mcp-personas-DDMKRFFG.js.map +0 -1
  70. package/dist/pi-jVNeQXWf.js.map +0 -1
  71. package/dist/server-setup-DinOFWiC.js.map +0 -1
  72. package/dist/static-context-pack-CyucviRD.js.map +0 -1
@@ -6,12 +6,13 @@ import { t as state } from "./state-CfEVoqBM.js";
6
6
  import { C as githubAgentGraphQLHeaders, S as copilotVersion, b as copilotBaseUrl, d as resolveModel, f as sleep$2, g as HTTPError, h as isAllowedCopilotHost, i as tryRefreshAndRetry, v as GITHUB_API_BASE_URL, w as githubAgentHeaders, x as copilotHeaders, y as GITHUB_GRAPHQL_URL } from "./token-CTf5jCmP.js";
7
7
  import { a as withTransientRetry, i as sanitizeTransportText, n as classifyTransportError, r as fetchWithTransientRetry } from "./upstream-retry-i1k1Xai2.js";
8
8
  import { a as parseBoolEnv, d as runManagedExeCapture, o as parseIntEnv, s as resolveExecutable } from "./exec-Bf8g_bIR.js";
9
- import { S as FAST_PROFILE_ORACLE_MODEL, _ as FAST_PROFILE_MODELS, a as BALANCED_PROFILE_NATIVE_EFFORTS, b as FAST_PROFILE_NATIVE_MODELS, c as BALANCED_PROFILE_ORACLE_MODEL, d as FAST_PROFILE_ADVISOR_EFFORT, f as FAST_PROFILE_ADVISOR_MODEL, m as FAST_PROFILE_ASTRA_MODEL, r as BALANCED_PROFILE_MODELS, x as FAST_PROFILE_ORACLE_EFFORT, y as FAST_PROFILE_NATIVE_EFFORTS } from "./balanced-profile-contract-XiIj4O1U.js";
10
- import { A as normalizeTrailingOneMSuffix, D as maxPeerInstructions, E as maxPeerDescription, O as fastEndpointForCatalogId, b as MAX_ADVISOR_SYSTEM_PROMPT, f as maxCodexReviewerModel, g as maxProReplacementModel, h as maxOpusModel, i as MAX_PROFILE_MODELS, k as fastEndpointForModel, m as maxGrokModel, p as maxGeminiModel, r as MAX_PROFILE_LEAD_MODEL, v as maxSonnetModel } from "./max-profile-contract-DQDEDCsR.js";
9
+ import { a as FAST_PROFILE_ASTRA_MODEL, c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, f as FAST_PROFILE_ORACLE_EFFORT, n as FAST_PROFILE_ADVISOR_EFFORT, p as FAST_PROFILE_ORACLE_MODEL, r as FAST_PROFILE_ADVISOR_MODEL, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-JOnZBgFB.js";
10
+ import { C as CHEAPEST_PROFILE_ADVISOR_MODEL, D as CHEAPEST_PROFILE_MODELS, E as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN, T as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX, _ as isBalancedFamily, b as CHEAPEST2_PROFILE_MODELS, d as isCheapestRewriteEligible, f as runCheapestRewrite, g as displayModelName, h as cheapestRewriteModelFor, m as cheapestContractFor, p as balancedContractFor, s as isNonTrivialPrompt, t as buildStaticPack, u as isCheapestRewriteDisabledEnv, v as isCheapestFamily, w as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT, x as BALANCED2_PROFILE_MODELS, y as isPinnedLaunchProfile } from "./static-context-pack-BRqt4ajJ.js";
11
+ import { r as BALANCED_PROFILE_MODELS } from "./balanced-profile-contract-DtnTIBjL.js";
12
+ import { A as normalizeTrailingOneMSuffix, D as maxPeerInstructions, E as maxPeerDescription, O as fastEndpointForCatalogId, b as MAX_ADVISOR_SYSTEM_PROMPT, f as maxCodexReviewerModel, g as maxProReplacementModel, h as maxOpusModel, i as MAX_PROFILE_MODELS, k as fastEndpointForModel, m as maxGrokModel, p as maxGeminiModel, r as MAX_PROFILE_LEAD_MODEL, v as maxSonnetModel } from "./max-profile-contract-CMvzKSsg.js";
11
13
  import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-aApO0hZW.js";
12
14
  import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-DBQugQlQ.js";
13
15
  import { n as ArtifactError, r as applyInsecureTls, t as ArtifactClient } from "./client-CQMfroGV.js";
14
- import { d as isCheapestRewriteDisabledEnv, f as isCheapestRewriteEligible, p as runCheapestRewrite, s as isNonTrivialPrompt, t as buildStaticPack } from "./static-context-pack-CyucviRD.js";
15
16
  import { f as stopReviewStateDir, o as fileRewriteFlagStore } from "./stop-gate-policy-FGAfpfc-.js";
16
17
  import { _ as isRecord$3, b as sleep$3, g as RemoteMcpError, h as RemoteMcpClient, l as ensureBluebirdClient, m as describeAzFailure, o as BluebirdError, p as AzCliAccessTokenCache, v as parseRetryAfter, y as sanitizeRemoteDetail } from "./bluebird-client-ltPIiyJU.js";
17
18
  import { r as registerColbertExitHandlers } from "./lifecycle-BJ83L0tz.js";
@@ -121,92 +122,6 @@ Object.freeze({
121
122
  reviewer: Object.freeze([])
122
123
  });
123
124
  //#endregion
124
- //#region src/lib/cheapest-profile-contract.ts
125
- /**
126
- * Fixed identities for the literal `github-router claude -m cheapest` profile.
127
- *
128
- * The cheapest all-200K tier: a `gpt-6-luna`/max LEAD at Claude Code's
129
- * DEFAULT (bare-slug) 200K window, every subagent at the same 200K default,
130
- * a `gpt-5.6-sol`/medium Advisor (bare slug), and a `gpt-5.6-sol`/high
131
- * primary Oracle. Oracle-only peer set (no `astra`) and a three-agent
132
- * surface (`Explore`/`General-Purpose`/`reviewer` — no `Plan`): the lead
133
- * plans directly and reviews the final plan with the Advisor (advisory)
134
- * before presenting it.
135
- *
136
- * "max" on the lead is enforced at two layers: the launcher seeds
137
- * `CLAUDE_CODE_EFFORT_LEVEL=max` (so the client stamps max instead of its
138
- * `high` default on lead requests) and the request preprocessor defaults
139
- * bare-Luna lead traffic to max when no explicit effort is present.
140
- *
141
- * The "200K window" here is enforced client-side by the launcher-seeded
142
- * `CLAUDE_CODE_DISABLE_1M_CONTEXT=1` (see `getClaudeCodeEnvVars`), not by
143
- * the bare slugs alone: every row maps via `behavesAs` onto a known Claude
144
- * model whose client-side profile is native-1M.
145
- *
146
- * This module is deliberately dependency-free, including its own delegation
147
- * graph literal: each pinned profile owns its graph so tuning one roster
148
- * cannot silently retune another.
149
- */
150
- const CHEAPEST_PROFILE_MODELS = Object.freeze({
151
- lead: "gpt-6-luna",
152
- explore: "gpt-6-luna",
153
- "General-Purpose": "gpt-6-luna",
154
- reviewer: "gpt-6-luna",
155
- advisor: "gpt-5.6-sol",
156
- oracle: "gpt-5.6-sol"
157
- });
158
- const CHEAPEST_PROFILE_NATIVE_AGENT_NAMES = [
159
- "Explore",
160
- "General-Purpose",
161
- "reviewer"
162
- ];
163
- const CHEAPEST_PROFILE_NATIVE_MODELS = Object.freeze({
164
- Explore: CHEAPEST_PROFILE_MODELS.explore,
165
- "General-Purpose": CHEAPEST_PROFILE_MODELS["General-Purpose"],
166
- reviewer: CHEAPEST_PROFILE_MODELS.reviewer
167
- });
168
- const CHEAPEST_PROFILE_NATIVE_EFFORTS = Object.freeze({
169
- Explore: "high",
170
- "General-Purpose": "max",
171
- reviewer: "max"
172
- });
173
- /**
174
- * Subagent/peer context window (tokens). Every non-lead role (and the lead
175
- * as well) runs at Claude Code's DEFAULT (bare-slug) budget — 200K.
176
- */
177
- const CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS = 2e5;
178
- const CHEAPEST_PROFILE_ADVISOR_MODEL = CHEAPEST_PROFILE_MODELS.advisor;
179
- /**
180
- * Client-visible Advisor identity for cheapest mode. The BARE Sol slug
181
- * (no `[1m]` bracket): Claude Code budgets the Advisor tool as a 200K-model
182
- * and forwards no more than ~200K of the lead's transcript, and the proxy
183
- * mirrors that with `CHEAPEST_PROFILE_ADVISOR_CONTEXT_TOKENS`.
184
- */
185
- const CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL = CHEAPEST_PROFILE_MODELS.advisor;
186
- /**
187
- * Curated-transcript token budget for the cheapest Advisor (the protégé
188
- * consult). Unlike every other advisor profile, the cheapest lead CURATES the
189
- * window: the proxy renders a small, tool-aware transcript and the lead's
190
- * pre-call brief (`<caller_context>`) leads, so the advisor reads signal
191
- * rather than a 200K dump of raw tool output.
192
- *
193
- * This is deliberately much smaller than the 200K client budget: the point is
194
- * to bound advisor read cost and focus attention, not to maximize context.
195
- * Default 24K, clamped to [16K, 32K], overridable via
196
- * `GH_ROUTER_ADVISOR_TRANSCRIPT_TOKENS` (see `resolveCheapestAdvisorTranscriptTokens`).
197
- */
198
- const CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT = 24e3;
199
- const CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN = 16e3;
200
- const CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX = 32e3;
201
- const CHEAPEST_PROFILE_ADVISOR_EFFORT = "medium";
202
- const CHEAPEST_PROFILE_ORACLE_MODEL = CHEAPEST_PROFILE_MODELS.oracle;
203
- const CHEAPEST_PROFILE_ORACLE_EFFORT = "high";
204
- Object.freeze({
205
- Explore: Object.freeze([]),
206
- "General-Purpose": Object.freeze(["reviewer"]),
207
- reviewer: Object.freeze([])
208
- });
209
- //#endregion
210
125
  //#region src/lib/one-m-context.ts
211
126
  /**
212
127
  * Context-window threshold at which Claude Code's `[1m]` accounting unlock is
@@ -588,6 +503,16 @@ const CHEAPEST_LEAD_MODEL = CHEAPEST_PROFILE_MODELS.lead;
588
503
  * included, at the default budget.
589
504
  */
590
505
  const BALANCED_LEAD_MODEL = BALANCED_PROFILE_MODELS.lead;
506
+ /**
507
+ * The lead `-m cheapest2` / `-m balanced2` select. Both are family siblings,
508
+ * so the lead is inherited unchanged from the base contract (Luna for
509
+ * `cheapest2`, which itself swaps only the Sol identities; Sol for
510
+ * `balanced2`, whose lead IS the 6.1 upgrade). Kept as named exports so the
511
+ * resolver below reads one binding per alias and a future lead change only
512
+ * edits the contract.
513
+ */
514
+ const CHEAPEST2_LEAD_MODEL = CHEAPEST2_PROFILE_MODELS.lead;
515
+ const BALANCED2_LEAD_MODEL = BALANCED2_PROFILE_MODELS.lead;
591
516
  /** Small/fast tier for a budget lead, in the two forms this codebase needs.
592
517
  *
593
518
  * `SLUG` is the Anthropic-published DASHED form and is what goes into
@@ -613,15 +538,20 @@ const BUDGET_SMALL_FAST_CATALOG_ID = "claude-haiku-4.5";
613
538
  * - `balanced` → `BALANCED_LEAD_MODEL` BARE (the most-complex-tasks
614
539
  * launch: Sol leader at the 200K DEFAULT window, Grok
615
540
  * Oracle, no astra peer)
541
+ * - `cheapest2` → `CHEAPEST2_LEAD_MODEL` BARE (the `cheapest` sibling with
542
+ * the Sol Advisor/Oracle at `gpt-6.1-sol`; same Luna lead)
543
+ * - `balanced2` → `BALANCED2_LEAD_MODEL` BARE (the `balanced` sibling with
544
+ * the lead/reviewer at `gpt-6.1-sol` and the Grok-4.7 Oracle)
616
545
  * - `N.M` → the best variant of that Opus family, via `pickClaudeDefault`
617
546
  * - a full slug → unchanged, including Copilot slugs a power user pins
618
547
  * - absent → the ordinary default
619
548
  *
620
- * Every branch except `cheap`/`cheapest`/`balanced` is `[1m]`-decorated against the
621
- * live catalog, by `pickClaudeDefault` on the two Opus-family branches and
622
- * by `withOneMSuffixForLead` on the rest — the decoration is catalog-gated
623
- * per model, so a genuinely 200K model (`claude-haiku-4-5`) still comes back
624
- * bare. `cheap`/`cheapest`/`balanced` deliberately skip the decoration entirely because
549
+ * Every branch except the 200K aliases (`cheap`/`cheapest`/`cheapest2`/
550
+ * `balanced`/`balanced2`) is `[1m]`-decorated against the live catalog, by
551
+ * `pickClaudeDefault` on the two Opus-family branches and by
552
+ * `withOneMSuffixForLead` on the rest — the decoration is catalog-gated per
553
+ * model, so a genuinely 200K model (`claude-haiku-4-5`) still comes back
554
+ * bare. The pinned aliases deliberately skip the decoration entirely because
625
555
  * their whole cost lever is the 200K default lead window.
626
556
  *
627
557
  * `fast` resolves to an ordinary slug rather than setting a mode flag —
@@ -648,6 +578,8 @@ function resolveLeadSlugArg(modelArg) {
648
578
  if (arg.toLowerCase() === "cheap") return CHEAP_LEAD_MODEL;
649
579
  if (arg.toLowerCase() === "cheapest") return CHEAPEST_LEAD_MODEL;
650
580
  if (arg.toLowerCase() === "balanced") return BALANCED_LEAD_MODEL;
581
+ if (arg.toLowerCase() === "cheapest2") return CHEAPEST2_LEAD_MODEL;
582
+ if (arg.toLowerCase() === "balanced2") return BALANCED2_LEAD_MODEL;
651
583
  const opusFamilyShorthand = arg.match(/^(\d+\.\d+)$/)?.[1];
652
584
  if (opusFamilyShorthand) return pickClaudeDefault(opusFamilyShorthand);
653
585
  return withOneMSuffixForLead(arg);
@@ -1617,7 +1549,8 @@ async function searchText(query, mode, workspace, signal) {
1617
1549
  /**
1618
1550
  * Produce the cheapest-profile brief for one prompt.
1619
1551
  *
1620
- * `profile` is the launch profile id; only `"cheapest"` is eligible, matching
1552
+ * `profile` is the launch profile id; only the cheapest family
1553
+ * (`cheapest`/`cheapest2`) is eligible, matching
1621
1554
  * the Claude hook exactly (the launcher exports `GH_ROUTER_PROFILE` into the
1622
1555
  * hook process there, and the launch registry carries it here). The one-shot
1623
1556
  * flag is keyed on `sessionId` and marked on ATTEMPT, so a session that spends
@@ -15760,6 +15693,15 @@ function currentInFlight() {
15760
15693
  const MIN_CACHEABLE_PREFIX_BYTES = 4096;
15761
15694
  const CACHE_KEY_NAMESPACE = "ghr-cache-v1";
15762
15695
  const CACHE_DIAGNOSTIC_LIMIT = 128;
15696
+ /**
15697
+ * Membership is an EVIDENCE claim, not a naming pattern: a model belongs here
15698
+ * only if a live probe shows Copilot needs an explicit breakpoint to cache its
15699
+ * prefix. `gpt-6.1-sol` is deliberately ABSENT — measured 2026-10-21 on a
15700
+ * 29,809-char reusable prefix, an unmarked repeat request already reported
15701
+ * `cached_tokens=5454/5457`, and adding the explicit fields changed that to
15702
+ * 5443. Copilot's provider-managed caching already covers it, and explicit
15703
+ * mode would only trade unmarked bytes out of the implicit cache.
15704
+ */
15763
15705
  const GPT56_EXPLICIT_CACHE_MODELS = /* @__PURE__ */ new Set([
15764
15706
  "gpt-6-sol",
15765
15707
  "gpt-5.6-sol",
@@ -20724,6 +20666,10 @@ const FALLBACK_TOKEN_PRICES = Object.freeze({
20724
20666
  in: 200,
20725
20667
  out: 1e3
20726
20668
  },
20669
+ "gpt-6.1-sol": {
20670
+ in: 200,
20671
+ out: 1e3
20672
+ },
20727
20673
  "gpt-5.6-sol": {
20728
20674
  in: 400,
20729
20675
  out: 2e3
@@ -20732,6 +20678,10 @@ const FALLBACK_TOKEN_PRICES = Object.freeze({
20732
20678
  in: 200,
20733
20679
  out: 600
20734
20680
  },
20681
+ "grok-4.7": {
20682
+ in: 200,
20683
+ out: 600
20684
+ },
20735
20685
  "gpt-5.5": {
20736
20686
  in: 500,
20737
20687
  out: 3e3
@@ -20834,8 +20784,10 @@ const INDICATIVE_TOKENS_PER_SECOND = Object.freeze({
20834
20784
  "claude-opus-5.5": 80,
20835
20785
  "claude-opus-5": 80,
20836
20786
  "gpt-6-sol": 75,
20787
+ "gpt-6.1-sol": 75,
20837
20788
  "gpt-5.6-sol": 75,
20838
20789
  "grok-4.5": 70,
20790
+ "grok-4.7": 70,
20839
20791
  "gpt-5.5": 65,
20840
20792
  "gemini-3.8-flash": 91,
20841
20793
  "gemini-3.6-flash": 45,
@@ -24382,38 +24334,43 @@ function cheapReviewerModel() {
24382
24334
  if (fastEndpointForModel(found) !== "responses") return void 0;
24383
24335
  return CHEAP_PROFILE_MODELS.reviewer;
24384
24336
  }
24385
- /** Sol/medium Advisor for the cheapest profile at the 200K default window. */
24386
- function cheapestAdvisorModel() {
24387
- const found = state.models?.data.find((m) => m.id === CHEAPEST_PROFILE_ADVISOR_MODEL);
24337
+ /** Sol Advisor for the cheapest family at the 200K default window. The
24338
+ * `profileId` selects the family contract: `cheapest` gates
24339
+ * `gpt-5.6-sol`/medium, `cheapest2` gates `gpt-6.1-sol`/high. */
24340
+ function cheapestAdvisorModel(profileId) {
24341
+ const contract = cheapestContractFor(profileId);
24342
+ const found = state.models?.data.find((m) => m.id === contract.advisorModel);
24388
24343
  if (!found) return void 0;
24389
- if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
24344
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < contract.subagentContextTokens) return void 0;
24390
24345
  if (found.capabilities?.supports?.tool_calls !== true) return void 0;
24391
24346
  const efforts = found.capabilities?.supports?.reasoning_effort;
24392
- if (!Array.isArray(efforts) || !efforts.includes("medium")) return void 0;
24347
+ if (!Array.isArray(efforts) || !efforts.includes(contract.advisorEffort)) return void 0;
24393
24348
  if (fastEndpointForModel(found) !== "responses") return void 0;
24394
- return CHEAPEST_PROFILE_ADVISOR_MODEL;
24349
+ return contract.advisorModel;
24395
24350
  }
24396
- /** Sol/high Oracle for the cheapest profile at the 200K default window. */
24397
- function cheapestOracleModel() {
24398
- const found = state.models?.data.find((m) => m.id === CHEAPEST_PROFILE_ORACLE_MODEL);
24351
+ /** Sol Oracle for the cheapest family at the 200K default window. */
24352
+ function cheapestOracleModel(profileId) {
24353
+ const contract = cheapestContractFor(profileId);
24354
+ const found = state.models?.data.find((m) => m.id === contract.oracleModel);
24399
24355
  if (!found) return void 0;
24400
- if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
24356
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < contract.subagentContextTokens) return void 0;
24401
24357
  if ((found.capabilities?.limits?.max_prompt_tokens ?? 0) <= 0) return void 0;
24402
24358
  const efforts = found.capabilities?.supports?.reasoning_effort;
24403
- if (!Array.isArray(efforts) || !efforts.includes("high")) return void 0;
24359
+ if (!Array.isArray(efforts) || !efforts.includes(contract.oracleEffort)) return void 0;
24404
24360
  if (fastEndpointForModel(found) !== "responses") return void 0;
24405
- return CHEAPEST_PROFILE_ORACLE_MODEL;
24361
+ return contract.oracleModel;
24406
24362
  }
24407
- /** Luna/max reviewer for the cheapest profile at the 200K default window. */
24408
- function cheapestReviewerModel() {
24409
- const reviewer = state.models?.data.find((m) => m.id === CHEAPEST_PROFILE_MODELS.reviewer);
24363
+ /** Luna/max reviewer for the cheapest family at the 200K default window. */
24364
+ function cheapestReviewerModel(profileId) {
24365
+ const contract = cheapestContractFor(profileId);
24366
+ const reviewer = state.models?.data.find((m) => m.id === contract.nativeModels.reviewer);
24410
24367
  if (!reviewer) return void 0;
24411
24368
  if (reviewer.capabilities?.supports?.tool_calls !== true) return void 0;
24412
- if ((reviewer.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
24369
+ if ((reviewer.capabilities?.limits?.max_context_window_tokens ?? 0) < contract.subagentContextTokens) return void 0;
24413
24370
  const efforts = reviewer.capabilities?.supports?.reasoning_effort;
24414
- if (!Array.isArray(efforts) || !efforts.includes(CHEAPEST_PROFILE_NATIVE_EFFORTS.reviewer)) return void 0;
24371
+ if (!Array.isArray(efforts) || !efforts.includes(contract.nativeEfforts.reviewer)) return void 0;
24415
24372
  if (fastEndpointForModel(reviewer) !== "responses") return void 0;
24416
- return CHEAPEST_PROFILE_MODELS.reviewer;
24373
+ return contract.nativeModels.reviewer;
24417
24374
  }
24418
24375
  /** Exact GPT-6 Astra only: cheap escalation consultant at 200K/medium. */
24419
24376
  function cheapAstraModel() {
@@ -24428,27 +24385,30 @@ function cheapAstraModel() {
24428
24385
  if (fastEndpointForModel(found) !== "responses") return void 0;
24429
24386
  return CHEAP_PROFILE_ASTRA_MODEL;
24430
24387
  }
24431
- /** Exact Grok 4.6 only: the balanced Oracle at 200K/medium, like cheap. */
24432
- function balancedOracleModel() {
24433
- const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_ORACLE_MODEL);
24388
+ /** Exact Grok only: the balanced-family Oracle at 200K/medium, like cheap.
24389
+ * `balanced` gates `grok-4.6`, `balanced2` gates `grok-4.7`. */
24390
+ function balancedOracleModel(profileId) {
24391
+ const contract = balancedContractFor(profileId);
24392
+ const found = state.models?.data.find((m) => m.id === contract.oracleModel);
24434
24393
  if (!found) return void 0;
24435
- if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
24394
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < contract.subagentContextTokens) return void 0;
24436
24395
  if ((found.capabilities?.limits?.max_prompt_tokens ?? 0) <= 0) return void 0;
24437
24396
  const efforts = found.capabilities?.supports?.reasoning_effort;
24438
- if (!Array.isArray(efforts) || !efforts.includes("medium")) return void 0;
24397
+ if (!Array.isArray(efforts) || !efforts.includes(contract.oracleEffort)) return void 0;
24439
24398
  if (fastEndpointForModel(found) !== "responses") return void 0;
24440
- return BALANCED_PROFILE_ORACLE_MODEL;
24399
+ return contract.oracleModel;
24441
24400
  }
24442
- /** Sol/high reviewer for the balanced profile at the 200K default window. */
24443
- function balancedReviewerModel() {
24444
- const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_MODELS.reviewer);
24401
+ /** Sol reviewer for the balanced family at the 200K default window. */
24402
+ function balancedReviewerModel(profileId) {
24403
+ const contract = balancedContractFor(profileId);
24404
+ const found = state.models?.data.find((m) => m.id === contract.nativeModels.reviewer);
24445
24405
  if (!found) return void 0;
24446
24406
  if (found.capabilities?.supports?.tool_calls !== true) return void 0;
24447
- if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
24407
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < contract.subagentContextTokens) return void 0;
24448
24408
  const efforts = found.capabilities?.supports?.reasoning_effort;
24449
- if (!Array.isArray(efforts) || !efforts.includes(BALANCED_PROFILE_NATIVE_EFFORTS.reviewer)) return void 0;
24409
+ if (!Array.isArray(efforts) || !efforts.includes(contract.nativeEfforts.reviewer)) return void 0;
24450
24410
  if (fastEndpointForModel(found) !== "responses") return void 0;
24451
- return BALANCED_PROFILE_MODELS.reviewer;
24411
+ return contract.nativeModels.reviewer;
24452
24412
  }
24453
24413
  /**
24454
24414
  * Gate for the worker tools (`explore`, `review`, `implement`).
@@ -25201,6 +25161,18 @@ function activePersonas(launch) {
25201
25161
  };
25202
25162
  });
25203
25163
  }
25164
+ /** Oracle descriptor derived from the family contract, so a model swap in the
25165
+ * contract renames itself here instead of leaving stale prose behind. */
25166
+ function familyOracleDescriptor(profileId) {
25167
+ if (isCheapestFamily(profileId)) {
25168
+ const contract = cheapestContractFor(profileId);
25169
+ return `${displayModelName(contract.oracleModel)} (200K context, ${contract.oracleEffort} effort)`;
25170
+ }
25171
+ if (isBalancedFamily(profileId)) {
25172
+ const contract = balancedContractFor(profileId);
25173
+ return `${displayModelName(contract.oracleModel)} (200K context, ${contract.oracleEffort} effort)`;
25174
+ }
25175
+ }
25204
25176
  function oracleToolEntry(isCheap = false, astraAvailable = true, oracleDescriptor) {
25205
25177
  return {
25206
25178
  name: "oracle",
@@ -25324,7 +25296,7 @@ function fastToolIsEnabled(tool) {
25324
25296
  }
25325
25297
  /** Shared Fast projection for list and call, including non-persona dispatch kind. */
25326
25298
  function fastAllowsTool(scope, launch, item) {
25327
- if (launch.profileId !== "fast" && launch.profileId !== "cheap" && launch.profileId !== "cheap1m" && launch.profileId !== "cheapest" && launch.profileId !== "balanced") return true;
25299
+ if (!isPinnedLaunchProfile(launch.profileId)) return true;
25328
25300
  if (scope !== "all" && item.group !== scope) return false;
25329
25301
  if (!launch.allowedGroups?.has(item.group)) return false;
25330
25302
  if (item.persona) return false;
@@ -25379,14 +25351,14 @@ function toolEntries(scope, launch, audience = "shared") {
25379
25351
  });
25380
25352
  return [...personaEntries, ...nonPersonaEntries];
25381
25353
  }
25382
- if (launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") {
25383
- const isCheap = launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced";
25384
- const isCheapest = launch.profileId === "cheapest";
25385
- const isBalanced = launch.profileId === "balanced";
25354
+ if (isPinnedLaunchProfile(launch.profileId)) {
25355
+ const isCheapest = isCheapestFamily(launch.profileId);
25356
+ const isBalanced = isBalancedFamily(launch.profileId);
25357
+ const isCheap = launch.profileId === "cheap" || launch.profileId === "cheap1m" || isCheapest || isBalanced;
25386
25358
  const astraWired = launch.profileId === "fast" || launch.profileId === "cheap1m";
25387
25359
  const astraAvailable = astraWired && (isCheap && !isCheapest ? cheapAstraModel() : isCheapest ? void 0 : fastAstraModel()) != null;
25388
- const oracleGate = isCheapest ? cheapestOracleModel() : isBalanced ? balancedOracleModel() : isCheap ? cheapOracleModel() : fastOracleModel();
25389
- const oracleDescriptor = isCheapest ? "GPT-6 Sol (200K context, high effort)" : void 0;
25360
+ const oracleGate = isCheapest ? cheapestOracleModel(launch.profileId) : isBalanced ? balancedOracleModel(launch.profileId) : isCheap ? cheapOracleModel() : fastOracleModel();
25361
+ const oracleDescriptor = familyOracleDescriptor(launch.profileId);
25390
25362
  const entries = [];
25391
25363
  if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && oracleGate) entries.push(oracleToolEntry(isCheap, astraAvailable, oracleDescriptor));
25392
25364
  if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("astra") && audience === "lead-peers" && astraWired && (isCheap ? cheapAstraModel() : fastAstraModel())) entries.push(astraToolEntry(isCheap));
@@ -25829,7 +25801,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
25829
25801
  tool: maxTool
25830
25802
  }) : false)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
25831
25803
  }
25832
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") && name !== "oracle" && name !== "astra") {
25804
+ if (isPinnedLaunchProfile(launch.profileId) && name !== "oracle" && name !== "astra") {
25833
25805
  const fastPersona = activePersonas(launch).find((persona) => persona.toolNameHttp === name);
25834
25806
  const fastTool = allNonPersonaTools().find((tool) => tool.toolNameHttp === name);
25835
25807
  if (!(fastPersona ? fastAllowsTool(scope, launch, {
@@ -25914,14 +25886,15 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
25914
25886
  release();
25915
25887
  }
25916
25888
  }
25917
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") && name === "oracle") {
25918
- const isCheapestOracle = launch.profileId === "cheapest";
25919
- const isBalancedOracle = launch.profileId === "balanced";
25889
+ if (isPinnedLaunchProfile(launch.profileId) && name === "oracle") {
25890
+ const isCheapestOracle = isCheapestFamily(launch.profileId);
25891
+ const isBalancedOracle = isBalancedFamily(launch.profileId);
25920
25892
  const isCheapOracle = launch.profileId === "cheap" || launch.profileId === "cheap1m" || isCheapestOracle || isBalancedOracle;
25921
- const oracleModel = isCheapestOracle ? CHEAPEST_PROFILE_ORACLE_MODEL : isCheapOracle ? CHEAP_PROFILE_ORACLE_MODEL : "claude-opus-5.5";
25893
+ const oracleModel = isCheapestOracle ? cheapestContractFor(launch.profileId).oracleModel : isBalancedOracle ? balancedContractFor(launch.profileId).oracleModel : isCheapOracle ? CHEAP_PROFILE_ORACLE_MODEL : "claude-opus-5.5";
25922
25894
  const oracleEndpoint = isCheapOracle ? "/v1/responses" : "/v1/messages";
25923
- const oracleEffort = isCheapestOracle ? CHEAPEST_PROFILE_ORACLE_EFFORT : isCheapOracle ? CHEAP_PROFILE_ORACLE_EFFORT : "high";
25924
- if (scope !== "all" && scope !== "peers" || !launch.allowedGroups?.has("peers") || !launch.allowedPersonas?.has("oracle") || !(isCheapestOracle ? cheapestOracleModel() : isBalancedOracle ? balancedOracleModel() : isCheapOracle ? cheapOracleModel() : fastOracleModel())) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
25895
+ const oracleEffort = isCheapestOracle ? cheapestContractFor(launch.profileId).oracleEffort : isBalancedOracle ? balancedContractFor(launch.profileId).oracleEffort : isCheapOracle ? CHEAP_PROFILE_ORACLE_EFFORT : "high";
25896
+ const oracleGateFn = isCheapestOracle ? () => cheapestOracleModel(launch.profileId) : isBalancedOracle ? () => balancedOracleModel(launch.profileId) : isCheapOracle ? cheapOracleModel : fastOracleModel;
25897
+ if (scope !== "all" && scope !== "peers" || !launch.allowedGroups?.has("peers") || !launch.allowedPersonas?.has("oracle") || !oracleGateFn()) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
25925
25898
  const query = typeof args.query === "string" ? args.query.trim() : "";
25926
25899
  const context = typeof args.context === "string" ? args.context.trim() : "";
25927
25900
  if (!query || !context) return rpcError(body.id, RPC_INVALID_PARAMS, "tools/call: oracle requires non-empty arguments.query and arguments.context");
@@ -25935,7 +25908,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
25935
25908
  model: oracleModel,
25936
25909
  endpoint: oracleEndpoint,
25937
25910
  description: "Fast/cheap-profile Oracle",
25938
- baseInstructions: isCheapestOracle ? "You are Oracle, an expert architectural and technical consultant running on GPT-6 Sol. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action." : isCheapOracle ? "You are Oracle, an expert architectural and technical consultant running on Grok 4.6. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action." : "You are Oracle, an expert architectural and technical consultant running on Opus 5. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action.",
25911
+ baseInstructions: `You are Oracle, an expert architectural and technical consultant running on ${displayModelName(oracleModel)}. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action.`,
25939
25912
  agentPrompt: "",
25940
25913
  writeCapable: false,
25941
25914
  requiresHttp: true,
@@ -25988,7 +25961,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
25988
25961
  release();
25989
25962
  }
25990
25963
  }
25991
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") && PERSONAS_READ.some((p) => p.toolNameHttp === name)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
25964
+ if (isPinnedLaunchProfile(launch.profileId) && PERSONAS_READ.some((p) => p.toolNameHttp === name)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
25992
25965
  const persona = activePersonas(launch).find((p) => p.toolNameHttp === name);
25993
25966
  const nonPersonaTool = persona ? void 0 : allNonPersonaTools().find((t) => t.toolNameHttp === name);
25994
25967
  if (!persona && !nonPersonaTool) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
@@ -27040,17 +27013,18 @@ function fastProfileAdvisorAvailable() {
27040
27013
  * `gpt-5.6-sol` at medium effort over its Responses endpoint, transcript
27041
27014
  * capped at `CHEAPEST_PROFILE_ADVISOR_CONTEXT_TOKENS` (200K). */
27042
27015
  const ADVISOR_CHEAPEST_PROFILE_MODEL = CHEAPEST_PROFILE_ADVISOR_MODEL;
27043
- /** True only when the live Sol entry satisfies the fixed cheapest
27044
- * transport (Responses). */
27045
- function cheapestProfileAdvisorAvailable() {
27046
- return fastEndpointForCatalogId(ADVISOR_CHEAPEST_PROFILE_MODEL, state.models?.data) === "responses";
27047
- }
27048
- /** Pick the cheapest Advisor model. Throws when the catalog gate fails so
27049
- * the launch prerequisite surface (not a silent downgrade) owns the error. */
27050
- function resolveCheapestAdvisorModel() {
27051
- if (!cheapestProfileAdvisorAvailable()) throw new Error(`cheapest Advisor invariant failed: ${ADVISOR_CHEAPEST_PROFILE_MODEL} must advertise the Responses endpoint`);
27016
+ /** True only when the live family Sol entry satisfies the fixed cheapest
27017
+ * transport (Responses). The family id is supplied by the caller so
27018
+ * `cheapest2`'s `gpt-6.1-sol` goes through the same gate. */
27019
+ function cheapestProfileAdvisorAvailable(model = ADVISOR_CHEAPEST_PROFILE_MODEL) {
27020
+ return fastEndpointForCatalogId(model, state.models?.data) === "responses";
27021
+ }
27022
+ /** Pick the cheapest-family Advisor model. Throws when the catalog gate fails
27023
+ * so the launch prerequisite surface (not a silent downgrade) owns the error. */
27024
+ function resolveCheapestAdvisorModel(model = ADVISOR_CHEAPEST_PROFILE_MODEL) {
27025
+ if (!cheapestProfileAdvisorAvailable(model)) throw new Error(`cheapest Advisor invariant failed: ${displayModelName(model)} (${model}) must advertise the Responses endpoint`);
27052
27026
  return {
27053
- model: ADVISOR_CHEAPEST_PROFILE_MODEL,
27027
+ model,
27054
27028
  escalated: false,
27055
27029
  fastProfile: true
27056
27030
  };
@@ -33188,12 +33162,13 @@ function buildPeerAwarenessSnippet(opts) {
33188
33162
  `\`mcp__${searchKey}__code\` provides ${opts.bluebirdEnabled === true ? "Bluebird semantic + lexical search (failures stay visible with no local fallback)" : opts.semanticSearchAvailable === true ? "local ColBERT semantic-first search with lexical fallback" : "local lexical search"} and \`mcp__${searchKey}__web\` provides citable web sources. Advisor is transcript-aware, primary-lead-only, and unavailable to native subagents and browse workers; it can detect framing drift but is not independent verification.${browserClause}${workerClause}${decideClause}${fleetClause}${agentsClause}${artifactClause}`
33189
33163
  ].join("\n");
33190
33164
  }
33191
- if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
33165
+ if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || isCheapestFamily(opts.profile) || isBalancedFamily(opts.profile)) {
33192
33166
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
33193
- const isCheapest = opts.profile === "cheapest";
33194
- const isBalanced = opts.profile === "balanced";
33195
- const profileLabel = isCheapest ? "cheapest" : isCheap ? "cheap" : isBalanced ? "balanced" : "fast";
33196
- const oracleDescriptor = isCheapest ? "GPT-6 Sol (200K/high)" : isCheap || isBalanced ? "Grok 4.6 (200K/medium)" : "exact Opus 5.5 (1M/high)";
33167
+ const isCheapest = isCheapestFamily(opts.profile);
33168
+ const isBalanced = isBalancedFamily(opts.profile);
33169
+ const profileLabel = isCheapest || isBalanced ? opts.profile : isCheap ? "cheap" : "fast";
33170
+ const familyContract = isCheapest ? cheapestContractFor(opts.profile) : isBalanced ? balancedContractFor(opts.profile) : void 0;
33171
+ const oracleDescriptor = familyContract ? `${displayModelName(familyContract.oracleModel)} (200K/${familyContract.oracleEffort})` : isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5.5 (1M/high)";
33197
33172
  const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
33198
33173
  const fastPeersKey = key("peers");
33199
33174
  const fastSearchKey = key("search");
@@ -33276,12 +33251,13 @@ function buildPeerAwarenessSummary(opts) {
33276
33251
  "Max native roster: `Explore` for broad discovery; `Plan` for interfaces, sequencing, risks, and acceptance criteria; `general-purpose` for bounded mixed execution; `implementer` for settled coding changes; `reviewer` for repository-aware verification and reproduction; `brainstorm` for materially different open approaches; and `peer-review-coordinator` for several distinct fresh-context review lenses. Configured models are deliberate role defaults.",
33277
33252
  `Native roles can inspect the repository within their listed tools. Fresh-context peers see only the artifact and constraints supplied to them. Advisor is transcript-aware, optional, non-binding, and primary-lead-only; it can identify framing drift but is not independent verification or an approval gate.${opts.bluebirdEnabled === true ? " Code search uses Bluebird for semantic and lexical modes with visible no-fallback errors; exact/regex/AST remain local." : opts.semanticSearchAvailable === true ? " Code search uses local ColBERT semantic search with lexical fallback." : " Code search uses local lexical search."} Detailed routing lives in each role or tool description, and the full gated capability inventory lives in CLAUDE.md.`
33278
33253
  ].join("\n");
33279
- if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
33254
+ if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || isCheapestFamily(opts.profile) || isBalancedFamily(opts.profile)) {
33280
33255
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
33281
- const isCheapest = opts.profile === "cheapest";
33282
- const isBalanced = opts.profile === "balanced";
33283
- const profileLabel = isCheapest ? "Cheapest" : isCheap ? "Cheap" : isBalanced ? "Balanced" : "Fast";
33284
- const oracleDescriptor = isCheapest ? "GPT-6 Sol (200K/high)" : isCheap || isBalanced ? "Grok 4.6 (200K/medium)" : "exact Opus 5.5 (1M/high)";
33256
+ const isCheapest = isCheapestFamily(opts.profile);
33257
+ const isBalanced = isBalancedFamily(opts.profile);
33258
+ const profileLabel = isCheapest || isBalanced ? opts.profile.charAt(0).toUpperCase() + opts.profile.slice(1) : isCheap ? "Cheap" : "Fast";
33259
+ const familyContract = isCheapest ? cheapestContractFor(opts.profile) : isBalanced ? balancedContractFor(opts.profile) : void 0;
33260
+ const oracleDescriptor = familyContract ? `${displayModelName(familyContract.oracleModel)} (200K/${familyContract.oracleEffort})` : isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5.5 (1M/high)";
33285
33261
  const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
33286
33262
  const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
33287
33263
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${key("workers")}__browse\`.` : "";
@@ -33826,18 +33802,19 @@ const NON_PERSONA_MCP_TOOLS = Object.freeze([
33826
33802
  isError: true
33827
33803
  };
33828
33804
  try {
33805
+ const profile = ctx?.profileId ?? "standard";
33829
33806
  return { content: [{
33830
33807
  type: "text",
33831
33808
  text: (await runHookPromptBrief({
33832
33809
  prompt,
33833
33810
  sessionId,
33834
33811
  workspace,
33835
- profile: ctx?.profileId ?? "standard",
33812
+ profile,
33836
33813
  searchEnabled: state.searchEnabled === true,
33837
33814
  bluebirdEnabled: state.bluebirdEnabled === true,
33838
33815
  signal,
33839
33816
  infer: (system, user, callSignal) => dispatchModelCall({
33840
- model: "gpt-5.6-sol",
33817
+ model: cheapestRewriteModelFor(profile),
33841
33818
  endpoint: "/v1/responses",
33842
33819
  instructions: system,
33843
33820
  userText: user,
@@ -34851,6 +34828,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
34851
34828
  return [...new Set(names)];
34852
34829
  }
34853
34830
  //#endregion
34854
- export { readIteratorWithTimeout as $, CHEAP_PROFILE_MODELS as $n, getTokenizerFromModel as $t, TOOLBELT_TOOLS$1 as A, UPSTREAM_INACTIVITY_TIMEOUT_MS as An, fastGeneralPurposeModel as At, injectAdvisorTool as B, withOneMSuffix as Bn, nativeSubagentModel as Bt, runWorkerAgent as C, BUDGET_SMALL_FAST_CATALOG_ID as Cn, cheapOracleModel as Ct, toolbeltEnabled as D, DEFAULT_CODEX_MODEL_FALLBACKS as Dn, cheapestReviewerModel as Dt, buildToolbeltAwareness as E, DEFAULT_CODEX_MODEL as En, cheapestOracleModel as Et, ADVISOR_TOOL_INSTRUCTIONS as F, upstreamAllowH2 as Fn, fleetToolsEnabled as Ft, formatThinkingRepairDecline as G, CHEAPEST_PROFILE_MODELS as Gn, scribeModel as Gt, resolveAdvisorEffort as H, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as Hn, reviewerFastModel as Ht, CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS as I, upstreamMaxConnections as In, geminiAvailable as It, repairRejectedThinkingHistory as J, CHEAPEST_PROFILE_NATIVE_MODELS as Jn, shimDefaultsToXhigh as Jt, rememberThinkingHistoryRepair as K, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as Kn, standInToolEnabled as Kt, CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as L, classifyMessagesRoute as Ln, generalPurposeFastModel as Lt, satisfiesMinVersion as M, isBudgetClaudeLead as Mn, fastPlanModel as Mt, searchWeb as N, pickClaudeDefault as Nn, fastReviewerModel as Nt, toolbeltSkipSet as O, DEFAULT_PORT as On, fastAdvisorModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, resolveLeadSlugArg as Pn, fastScoutModel as Pt, logStreamError as Q, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as Qn, getTokenCount as Qt, FAST_ADVISOR_TOOL_INSTRUCTIONS as R, catalogAdvertises1M as Rn, implementerFastModel as Rt, resolveWorkerRunOpts as S, toolbeltPathOverride as Sn, cheapAdvisorModel as St, availableToolCommands as T, DEFAULT_CLAUDE_MODEL_FALLBACKS as Tn, cheapestAdvisorModel as Tt, resolveAdvisorModel as U, CHEAPEST_PROFILE_ADVISOR_EFFORT as Un, reviewerModel as Ut, isAdvisorRequested as V, withOneMSuffixForLead as Vn, resolveGeminiReviewModel as Vt, resolveCheapestAdvisorModel as W, CHEAPEST_PROFILE_ADVISOR_MODEL as Wn, scoutModel as Wt, buildOpenAIErrorEvent as X, CHEAPEST_PROFILE_ORACLE_MODEL as Xn, createMessages as Xt, buildAnthropicErrorEvent as Y, CHEAPEST_PROFILE_ORACLE_EFFORT as Yn, countTokens as Yt, isControllerClosedError as Z, CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS as Zn, getTextTokenCount as Zt, REVIEW_DEFAULT_MODEL as _, colbertDegradedWarning as _n, balancedReviewerModel as _t, buildAgentPrompt as a, resolveMcpToolTimeoutMs as an, handleMcpDelete as at, resolveDefaultModel as b, shouldUseInsecureTls as bn, browserCompoundToolsEnabled as bt, enumerateInjectedMcpToolNames as c, MAX_RESPONSE_BODY_BYTES as cn, buildAdoToolEntries as ct, BROWSE_DEFAULT_MODEL as d, normalizeOpenAIUsage as dn, ADO_DEFAULT_TOOLSETS as dt, findLaunchBySecret as en, CHEAP_PROFILE_NATIVE_AGENT_NAMES as er, relayAnthropicStream as et, DEFAULT_MODEL_CHAIN as f, provisionBrowserAssets as fn, normalizeAdoToolsets as ft, PLAN_DEFAULT_MODEL as g, DEFINITION_OF_GREATNESS as gn, balancedOracleModel as gt, IMPLEMENT_DEFAULT_MODEL as h, CONDENSED_OPERATING_SEQUENCE as hn, artifactToolsEnabled as ht, assertMcpToolSurfaceConsistent as i, warnOnTokenPriceDrift as in, clampEffort as it, assetFor as j, generateRandomPort as jn, fastOracleModel as jt, vscodeRipgrepPath as k, UPSTREAM_FETCH_TIMEOUT_MS as kn, fastAstraModel as kt, maxPersonasFor as l, readResponseBodyCapped as ln, disposeAdoClients as lt, EXPLORE_DEFAULT_THINKING as m, normalizeKustoClusterUri as mn, agentToolsEnabled as mt, MCP_GROUPS as n, unregisterLaunch as nn, CHEAP_PROFILE_NATIVE_MODELS as nr, UNKNOWN_EFFORT_ANCHOR as nt, buildPeerAwarenessSnippet as o, createResponses as on, handleMcpPost as ot, EXPLORE_DEFAULT_MODEL as p, hasSupportedBrowserInstalled as pn, adoToolsEnabled as pt, repairKnownThinkingHistory as q, CHEAPEST_PROFILE_NATIVE_EFFORTS as qn, workerToolsEnabled as qt, agentNamesForToolAllowlist as r, assembleResponsesPayload as rn, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as rr, bucketEffort as rt, buildPeerAwarenessSummary as s, createChatCompletions as sn, adoMcpToolEntries as st, GROUP_META as t, registerLaunch as tn, CHEAP_PROFILE_NATIVE_EFFORTS as tr, EFFORT_ORDER as tt, personasFor as u, parseJsonOrDiagnose as un, provisionAdoTools as ut, TEST_DEFAULT_MODEL as v, provisionAndIndexColbert as vn, brainstormModel as vt, buildEnv as w, BUDGET_SMALL_FAST_SLUG as wn, cheapReviewerModel as wt, resolveModeDefaults as x, collapsePathKeys as xn, browserToolsEnabled as xt, appendPlanReminder as y, semanticSearchOptedIn as yn, browseAgentEnabled as yt, buildAdvisorStream as z, oneMContextDisabled as zn, kustoToolsEnabled as zt };
34831
+ export { readIteratorWithTimeout as $, getTokenizerFromModel as $t, TOOLBELT_TOOLS$1 as A, UPSTREAM_INACTIVITY_TIMEOUT_MS as An, fastGeneralPurposeModel as At, injectAdvisorTool as B, withOneMSuffix as Bn, nativeSubagentModel as Bt, runWorkerAgent as C, BUDGET_SMALL_FAST_CATALOG_ID as Cn, cheapOracleModel as Ct, toolbeltEnabled as D, DEFAULT_CODEX_MODEL_FALLBACKS as Dn, cheapestReviewerModel as Dt, buildToolbeltAwareness as E, DEFAULT_CODEX_MODEL as En, cheapestOracleModel as Et, ADVISOR_TOOL_INSTRUCTIONS as F, upstreamAllowH2 as Fn, fleetToolsEnabled as Ft, formatThinkingRepairDecline as G, CHEAP_PROFILE_NATIVE_EFFORTS as Gn, scribeModel as Gt, resolveAdvisorEffort as H, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as Hn, reviewerFastModel as Ht, CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS as I, upstreamMaxConnections as In, geminiAvailable as It, repairRejectedThinkingHistory as J, shimDefaultsToXhigh as Jt, rememberThinkingHistoryRepair as K, CHEAP_PROFILE_NATIVE_MODELS as Kn, standInToolEnabled as Kt, CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as L, classifyMessagesRoute as Ln, generalPurposeFastModel as Lt, satisfiesMinVersion as M, isBudgetClaudeLead as Mn, fastPlanModel as Mt, searchWeb as N, pickClaudeDefault as Nn, fastReviewerModel as Nt, toolbeltSkipSet as O, DEFAULT_PORT as On, fastAdvisorModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, resolveLeadSlugArg as Pn, fastScoutModel as Pt, logStreamError as Q, getTokenCount as Qt, FAST_ADVISOR_TOOL_INSTRUCTIONS as R, catalogAdvertises1M as Rn, implementerFastModel as Rt, resolveWorkerRunOpts as S, toolbeltPathOverride as Sn, cheapAdvisorModel as St, availableToolCommands as T, DEFAULT_CLAUDE_MODEL_FALLBACKS as Tn, cheapestAdvisorModel as Tt, resolveAdvisorModel as U, CHEAP_PROFILE_MODELS as Un, reviewerModel as Ut, isAdvisorRequested as V, withOneMSuffixForLead as Vn, resolveGeminiReviewModel as Vt, resolveCheapestAdvisorModel as W, CHEAP_PROFILE_NATIVE_AGENT_NAMES as Wn, scoutModel as Wt, buildOpenAIErrorEvent as X, createMessages as Xt, buildAnthropicErrorEvent as Y, countTokens as Yt, isControllerClosedError as Z, getTextTokenCount as Zt, REVIEW_DEFAULT_MODEL as _, colbertDegradedWarning as _n, balancedReviewerModel as _t, buildAgentPrompt as a, resolveMcpToolTimeoutMs as an, handleMcpDelete as at, resolveDefaultModel as b, shouldUseInsecureTls as bn, browserCompoundToolsEnabled as bt, enumerateInjectedMcpToolNames as c, MAX_RESPONSE_BODY_BYTES as cn, buildAdoToolEntries as ct, BROWSE_DEFAULT_MODEL as d, normalizeOpenAIUsage as dn, ADO_DEFAULT_TOOLSETS as dt, findLaunchBySecret as en, relayAnthropicStream as et, DEFAULT_MODEL_CHAIN as f, provisionBrowserAssets as fn, normalizeAdoToolsets as ft, PLAN_DEFAULT_MODEL as g, DEFINITION_OF_GREATNESS as gn, balancedOracleModel as gt, IMPLEMENT_DEFAULT_MODEL as h, CONDENSED_OPERATING_SEQUENCE as hn, artifactToolsEnabled as ht, assertMcpToolSurfaceConsistent as i, warnOnTokenPriceDrift as in, clampEffort as it, assetFor as j, generateRandomPort as jn, fastOracleModel as jt, vscodeRipgrepPath as k, UPSTREAM_FETCH_TIMEOUT_MS as kn, fastAstraModel as kt, maxPersonasFor as l, readResponseBodyCapped as ln, disposeAdoClients as lt, EXPLORE_DEFAULT_THINKING as m, normalizeKustoClusterUri as mn, agentToolsEnabled as mt, MCP_GROUPS as n, unregisterLaunch as nn, UNKNOWN_EFFORT_ANCHOR as nt, buildPeerAwarenessSnippet as o, createResponses as on, handleMcpPost as ot, EXPLORE_DEFAULT_MODEL as p, hasSupportedBrowserInstalled as pn, adoToolsEnabled as pt, repairKnownThinkingHistory as q, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as qn, workerToolsEnabled as qt, agentNamesForToolAllowlist as r, assembleResponsesPayload as rn, bucketEffort as rt, buildPeerAwarenessSummary as s, createChatCompletions as sn, adoMcpToolEntries as st, GROUP_META as t, registerLaunch as tn, EFFORT_ORDER as tt, personasFor as u, parseJsonOrDiagnose as un, provisionAdoTools as ut, TEST_DEFAULT_MODEL as v, provisionAndIndexColbert as vn, brainstormModel as vt, buildEnv as w, BUDGET_SMALL_FAST_SLUG as wn, cheapReviewerModel as wt, resolveModeDefaults as x, collapsePathKeys as xn, browserToolsEnabled as xt, appendPlanReminder as y, semanticSearchOptedIn as yn, browseAgentEnabled as yt, buildAdvisorStream as z, oneMContextDisabled as zn, kustoToolsEnabled as zt };
34855
34832
 
34856
- //# sourceMappingURL=peer-mcp-personas-DDMKRFFG.js.map
34833
+ //# sourceMappingURL=peer-mcp-personas-DlF1dKCs.js.map