@oh-my-pi/pi-catalog 18.1.13 → 18.1.14

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/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.1.14] - 2026-09-07
6
+
7
+ ### Fixed
8
+
9
+ - Bills Astra API requests above 272K input at the documented 2x input / 1.5x output long-context tier; the Codex subscription route stays exempt with free cache writes ([#11157](https://github.com/can1357/oh-my-pi/pull/11157) by [@H4vC](https://github.com/H4vC)).
10
+ - Fixed Astra's extended window over-advertising input by 128K; it now uses the documented 922K input cap inside the 1.05M total context ([#11157](https://github.com/can1357/oh-my-pi/pull/11157) by [@H4vC](https://github.com/H4vC)).
11
+ - Fixed explicit Codex context-window overrides widening past the server-honored maximum; they now clamp to the documented ceiling like upstream Codex ([#11157](https://github.com/can1357/oh-my-pi/pull/11157) by [@H4vC](https://github.com/H4vC)).
12
+ - Fixed Codex Astra using its larger window without opt-in; its default is 272K and Extended Context enables at least the documented 1.05M window ([#11126](https://github.com/can1357/oh-my-pi/pull/11126) by [@H4vC](https://github.com/H4vC)).
13
+ - Fixed GitHub Copilot enterprise-only model ids inheriting another provider's wire routing (e.g. `gpt-5.6-sol-fast` pinning every request to the `-none` sibling id regardless of thinking level) ([#11128](https://github.com/can1357/oh-my-pi/pull/11128) by [@H4vC](https://github.com/H4vC)).
14
+
15
+ ## [18.1.13] - 2026-09-07
16
+
17
+ ### Fixed
18
+
19
+ - Fixed GPT-6 Astra compacting early at a 272K-token window with its full window gated behind `/extended-context`: it now defaults to the documented 1.05M-token window.
20
+
5
21
  ## [18.1.12] - 2026-09-06
6
22
 
7
23
  ### Added
@@ -15,7 +31,6 @@
15
31
  - Fixed OpenCode Go/Zen live model discovery (`GET /v1/models`) missing `x-opencode-session` and omp's `User-Agent`: discovery requests now attribute with the stable install id so the requests OpenCode flags as `Bun fetch` carry the required session header.
16
32
  - Fixed GPT-6 Astra requests through GitHub Copilot failing with an unsupported endpoint error ([#10874](https://github.com/can1357/oh-my-pi/pull/10874) by [@xpcmdshell](https://github.com/xpcmdshell)).
17
33
  - Fixed GPT-6 Astra showing as free with a 272K-token window in the OpenAI Codex catalog by applying its documented pricing; `/extended-context` enables the wire-advertised 872K-token maximum ([#10980](https://github.com/can1357/oh-my-pi/pull/10980) by [@H4vC](https://github.com/H4vC)).
18
- - Fixed GPT-6 Astra compacting early at a 272K-token window with its full window gated behind `/extended-context`: it now defaults to the documented 1.05M-token window.
19
34
  - Made extended-context catalog rebuilds faster by resolving each model's maximum window once per process ([#11039](https://github.com/can1357/oh-my-pi/pull/11039) by [@H4vC](https://github.com/H4vC)).
20
35
 
21
36
  ## [18.1.9] - 2026-09-04
@@ -1,7 +1,32 @@
1
1
  import type { Model } from "../types.js";
2
2
  /**
3
- * Maximum prompt window for extended context. Live discovery takes precedence
4
- * over rule-owned fallbacks for older bundled or cached model metadata. Resolve
5
- * at catalog composition time so frozen bundled rows need no runtime mutation.
3
+ * Extended-context capacity. Curated maxima correct stale lower discovery
4
+ * values; a higher live maximum still wins. The registry applies this capacity
5
+ * only when extended context is enabled, before explicit user overrides.
6
6
  */
7
7
  export declare function resolveMaxContextWindow(model: Model): number | undefined;
8
+ /**
9
+ * Override ceiling for Codex models. Upstream clamps `model_context_window`
10
+ * to `min(override, max_context_window)` (`with_config_overrides` in
11
+ * `models-manager/src/model_info.rs`); the ceiling here is stale-aware — the
12
+ * curated maximum corrects a lower server value (Astra reports a stale 872K
13
+ * maximum; OpenAI documents at most 922K input) while a higher live maximum
14
+ * still wins. No curated or live maximum means no ceiling: overrides pass
15
+ * through, matching upstream's unclamped branch.
16
+ */
17
+ export declare function codexOverrideCeiling(model: Model): number | undefined;
18
+ /**
19
+ * Whether explicit context-window overrides for this model clamp to the
20
+ * server-honored ceiling. KDL-owned (`clamp-context-override`): branching on
21
+ * it here keeps provider deployment contracts out of TypeScript.
22
+ */
23
+ export declare function clampsContextOverride(model: Model): boolean;
24
+ /**
25
+ * Clamp a requested Codex context window to the override ceiling, mirroring
26
+ * upstream. `model` is the pre-override model: the ceiling never shrinks the
27
+ * request below the window that already works, so a stale-low live maximum
28
+ * (e.g. 128K base with a 64K advertised maximum) cannot punish an explicit
29
+ * override. Returns the request unchanged when no ceiling applies or it
30
+ * already fits.
31
+ */
32
+ export declare function clampCodexContextWindow(model: Model, requested: number): number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-catalog",
4
- "version": "18.1.13",
4
+ "version": "18.1.14",
5
5
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Stencil Labs, Inc.",
@@ -35,12 +35,12 @@
35
35
  "gen:proto": "bun scripts/generate-protocols.ts"
36
36
  },
37
37
  "dependencies": {
38
- "@oh-my-pi/omptype": "18.1.13",
39
- "@oh-my-pi/pi-utils": "18.1.13"
38
+ "@oh-my-pi/omptype": "18.1.14",
39
+ "@oh-my-pi/pi-utils": "18.1.14"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@bgotink/kdl": "0.4.0",
43
- "@oh-my-pi/pi-ai": "18.1.13",
43
+ "@oh-my-pi/pi-ai": "18.1.14",
44
44
  "@types/bun": "^1.3.14"
45
45
  },
46
46
  "engines": {
@@ -267,6 +267,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
267
267
  shape: "scalar",
268
268
  values: ["freeform", "function"],
269
269
  },
270
+ "clamp-context-override": { key: "clampContextOverride", set: "catalog", shape: "scalar" },
270
271
  "context-promotion-target": { key: "contextPromotionTarget", set: "catalog", shape: "scalar" },
271
272
  "context-window-floor": { key: "contextWindowFloor", set: "catalog", shape: "scalar" },
272
273
  "cost-patch": { key: "costPatch", set: "catalog", shape: "object" },
@@ -3,29 +3,72 @@ import type { Model } from "../types";
3
3
  import { resolveModelPolicy } from "./resolve";
4
4
 
5
5
  /**
6
- * Rule-owned fallback maxima by `provider/id/api`. The rule table is static
7
- * per process (compiled into rules.json), so one resolution per model key is
8
- * enough — composition calls this per model on every rebuild while extended
9
- * context is enabled, and the full policy resolve (identity classification
10
- * plus cascade walk) is wasted work per call.
6
+ * Rule-owned maxima by provider/id/api. Resolve once per process rather than
7
+ * walking the static policy cascade on every catalog rebuild. Null caches the
8
+ * absence of a curated maximum; undefined means the key has not been resolved.
11
9
  */
12
- const ruleFallbackCache = new Map<string, number | undefined>();
10
+ const ruleMaximumCache = new Map<string, number | null>();
13
11
 
14
12
  /**
15
- * Maximum prompt window for extended context. Live discovery takes precedence
16
- * over rule-owned fallbacks for older bundled or cached model metadata. Resolve
17
- * at catalog composition time so frozen bundled rows need no runtime mutation.
13
+ * Extended-context capacity. Curated maxima correct stale lower discovery
14
+ * values; a higher live maximum still wins. The registry applies this capacity
15
+ * only when extended context is enabled, before explicit user overrides.
18
16
  */
19
17
  export function resolveMaxContextWindow(model: Model): number | undefined {
18
+ const key = `${model.provider} ${model.id} ${model.api}`;
19
+ let curated = ruleMaximumCache.get(key);
20
+ if (curated === undefined) {
21
+ const maximum = resolveModelPolicy(toModelSpec(model)).catalog.maxContextWindow;
22
+ curated = typeof maximum === "number" && Number.isFinite(maximum) && maximum > 0 ? maximum : null;
23
+ ruleMaximumCache.set(key, curated);
24
+ }
25
+
20
26
  const maximum = model.maxContextWindow;
21
27
  if (typeof maximum === "number" && Number.isFinite(maximum) && maximum > 0) {
22
- return maximum;
28
+ return Math.max(maximum, curated ?? 0);
23
29
  }
30
+ return curated ?? undefined;
31
+ }
24
32
 
25
- const key = `${model.provider} ${model.id} ${model.api}`;
26
- if (ruleFallbackCache.has(key)) return ruleFallbackCache.get(key);
27
- const fallback = resolveModelPolicy(toModelSpec(model)).catalog.maxContextWindow;
28
- const resolved = typeof fallback === "number" && Number.isFinite(fallback) && fallback > 0 ? fallback : undefined;
29
- ruleFallbackCache.set(key, resolved);
30
- return resolved;
33
+ /**
34
+ * Override ceiling for Codex models. Upstream clamps `model_context_window`
35
+ * to `min(override, max_context_window)` (`with_config_overrides` in
36
+ * `models-manager/src/model_info.rs`); the ceiling here is stale-aware — the
37
+ * curated maximum corrects a lower server value (Astra reports a stale 872K
38
+ * maximum; OpenAI documents at most 922K input) while a higher live maximum
39
+ * still wins. No curated or live maximum means no ceiling: overrides pass
40
+ * through, matching upstream's unclamped branch.
41
+ */
42
+ export function codexOverrideCeiling(model: Model): number | undefined {
43
+ return resolveMaxContextWindow(model);
44
+ }
45
+
46
+ /**
47
+ * Whether explicit context-window overrides for this model clamp to the
48
+ * server-honored ceiling. KDL-owned (`clamp-context-override`): branching on
49
+ * it here keeps provider deployment contracts out of TypeScript.
50
+ */
51
+ export function clampsContextOverride(model: Model): boolean {
52
+ return resolveModelPolicy(toModelSpec(model)).catalog.clampContextOverride === true;
53
+ }
54
+
55
+ /**
56
+ * Clamp a requested Codex context window to the override ceiling, mirroring
57
+ * upstream. `model` is the pre-override model: the ceiling never shrinks the
58
+ * request below the window that already works, so a stale-low live maximum
59
+ * (e.g. 128K base with a 64K advertised maximum) cannot punish an explicit
60
+ * override. Returns the request unchanged when no ceiling applies or it
61
+ * already fits.
62
+ */
63
+ export function clampCodexContextWindow(model: Model, requested: number): number {
64
+ if (!Number.isFinite(requested) || requested <= 0) {
65
+ return requested;
66
+ }
67
+ const ceiling = codexOverrideCeiling(model);
68
+ if (ceiling === undefined || requested <= ceiling) {
69
+ return requested;
70
+ }
71
+ const current = model.contextWindow;
72
+ const floor = typeof current === "number" && Number.isFinite(current) && current > 0 ? current : 0;
73
+ return Math.min(requested, Math.max(ceiling, floor));
31
74
  }
@@ -9,6 +9,11 @@ provider "openai-codex" {
9
9
  // Harmony-protocol leak detection/mitigation applies to every Codex model,
10
10
  // current and future; replaces the provider check in harmony-leak.ts.
11
11
  harmony-leak-mitigation #true
12
+ // Every Codex SKU clamps explicit context-window overrides to the
13
+ // server-honored ceiling (`min(override, max)`, mirroring upstream
14
+ // `with_config_overrides`); models without a curated or live maximum
15
+ // pass through. Replaces the provider check in model-registry.ts.
16
+ clamp-context-override #true
12
17
  // Subscription (Codex) discovery reports no pricing; the curated Daybreak
13
18
  // aliases carry the standard GPT-5.6 Sol/Cyber API list price so cost
14
19
  // display reads as API-equivalent spend. The `-wm` worker sibling bills
@@ -29,16 +34,15 @@ provider "openai-codex" {
29
34
  cache-write 15.625
30
35
  }
31
36
  }
32
- // Codex discovery still reports Astra's stale 272K window with
33
- // max_context_window=872000 (client 0.153.1, 2026-09-04) — the same stale
34
- // pair it reports for Luna/Sol/Terra. Public docs list a 1.05M window and
35
- // live Codex traffic succeeds past the wire maximum (895,302 input tokens
36
- // observed, including cached input), so floor to the documented window like
37
- // the GPT-5.6 1M floor below. Astra carries no long-context surcharge, so
38
- // the window must not be gated behind `/extended-context`; the
39
- // `maximum > contextWindow` guard then ignores the stale 872K live maximum.
40
- // Pricing stays at the documented credit-equivalent rates, with free cache
41
- // writes and no >272K multiplier.
37
+ // Codex reports a 272K default and a stale 872K maximum for Astra. Keep
38
+ // the default explicit so cached 1.05M rows from #11089 cannot bypass the
39
+ // opt-in; the curated maximum is applied only with extended context on.
40
+ // OpenAI documents 1.05M total context with at most 922K input and 128K
41
+ // output, so the input ceiling is 922K — not the total. A higher live
42
+ // maximum still wins as the ceiling.
43
+ // Subscription credit-equivalent pricing: no per-token billing, free cache
44
+ // writes, exempt from the API long-context multiplier. The first-party API
45
+ // route bills the documented >272K tier instead — see providers/openai.kdl.
42
46
  models "gpt-6-astra" "gpt-6-astra-wm" {
43
47
  cost-patch {
44
48
  input 10.0
@@ -50,7 +54,10 @@ provider "openai-codex" {
50
54
  flex 0.5
51
55
  priority 2.5
52
56
  }
53
- context-window-floor 1050000
57
+ limits-patch {
58
+ context-window 272000
59
+ }
60
+ max-context-window 922000
54
61
  }
55
62
  class "openai" {
56
63
  revision ">=5.3 <5.7" {
@@ -141,8 +148,4 @@ provider "openai-codex" {
141
148
  models "gpt-5.6-luna" "gpt-5.6-sol" "gpt-5.6-terra" {
142
149
  context-window-floor 1000000
143
150
  }
144
- // (No `max-context-window` fallback: the 1.05M floor already exceeds the
145
- // stale 872K wire maximum, so offline and cached rows compose to the
146
- // documented window and the live maximum is ignored by the
147
- // `maximum > contextWindow` guard — same as Luna/Sol/Terra above.)
148
151
  }
@@ -72,6 +72,19 @@ provider "openai" {
72
72
  cache-write 5.0
73
73
  }
74
74
  }
75
+ // Astra API route bills the documented long-context tier above 272K input:
76
+ // 2x input and cache rates, 1.5x output for the full request; cache writes
77
+ // stay 1.25x the long input rate (25.0). The Codex subscription route stays
78
+ // exempt (credit-equivalent, free cache writes) — see openai-codex.kdl.
79
+ models "gpt-6-astra*" {
80
+ long-context-cost {
81
+ input-threshold 272000
82
+ input 20.0
83
+ output 75.0
84
+ cache-read 2.0
85
+ cache-write 25.0
86
+ }
87
+ }
75
88
  // residue: the bare Daybreak rolling aliases pin the documented 5.6-gen
76
89
  // wire restrictions without carrying the gpt- prefix identity.
77
90
  models "daybreak-blue-latest" "daybreak-red-latest" {
@@ -10544,7 +10544,7 @@
10544
10544
  }
10545
10545
  },
10546
10546
  {
10547
- "source": "providers/openai-codex.kdl:16",
10547
+ "source": "providers/openai-codex.kdl:21",
10548
10548
  "providers": [
10549
10549
  "openai-codex"
10550
10550
  ],
@@ -10568,7 +10568,7 @@
10568
10568
  }
10569
10569
  },
10570
10570
  {
10571
- "source": "providers/openai-codex.kdl:24",
10571
+ "source": "providers/openai-codex.kdl:29",
10572
10572
  "providers": [
10573
10573
  "openai-codex"
10574
10574
  ],
@@ -10592,7 +10592,7 @@
10592
10592
  }
10593
10593
  },
10594
10594
  {
10595
- "source": "providers/openai-codex.kdl:42",
10595
+ "source": "providers/openai-codex.kdl:46",
10596
10596
  "providers": [
10597
10597
  "openai-codex"
10598
10598
  ],
@@ -10617,11 +10617,14 @@
10617
10617
  "flex": 0.5,
10618
10618
  "priority": 2.5
10619
10619
  },
10620
- "contextWindowFloor": 1050000
10620
+ "limitsPatch": {
10621
+ "contextWindow": 272000
10622
+ },
10623
+ "maxContextWindow": 922000
10621
10624
  }
10622
10625
  },
10623
10626
  {
10624
- "source": "providers/openai-codex.kdl:56",
10627
+ "source": "providers/openai-codex.kdl:63",
10625
10628
  "class": "openai",
10626
10629
  "providers": [
10627
10630
  "openai-codex"
@@ -10641,7 +10644,7 @@
10641
10644
  }
10642
10645
  },
10643
10646
  {
10644
- "source": "providers/openai-codex.kdl:61",
10647
+ "source": "providers/openai-codex.kdl:68",
10645
10648
  "class": "openai",
10646
10649
  "providers": [
10647
10650
  "openai-codex"
@@ -10657,7 +10660,7 @@
10657
10660
  }
10658
10661
  },
10659
10662
  {
10660
- "source": "providers/openai-codex.kdl:64",
10663
+ "source": "providers/openai-codex.kdl:71",
10661
10664
  "class": "openai",
10662
10665
  "providers": [
10663
10666
  "openai-codex"
@@ -10673,7 +10676,7 @@
10673
10676
  }
10674
10677
  },
10675
10678
  {
10676
- "source": "providers/openai-codex.kdl:69",
10679
+ "source": "providers/openai-codex.kdl:76",
10677
10680
  "class": "openai",
10678
10681
  "providers": [
10679
10682
  "openai-codex"
@@ -10692,7 +10695,7 @@
10692
10695
  }
10693
10696
  },
10694
10697
  {
10695
- "source": "providers/openai-codex.kdl:81",
10698
+ "source": "providers/openai-codex.kdl:88",
10696
10699
  "class": "openai",
10697
10700
  "providers": [
10698
10701
  "openai-codex"
@@ -10718,7 +10721,7 @@
10718
10721
  }
10719
10722
  },
10720
10723
  {
10721
- "source": "providers/openai-codex.kdl:87",
10724
+ "source": "providers/openai-codex.kdl:94",
10722
10725
  "class": "openai",
10723
10726
  "providers": [
10724
10727
  "openai-codex"
@@ -10744,7 +10747,7 @@
10744
10747
  }
10745
10748
  },
10746
10749
  {
10747
- "source": "providers/openai-codex.kdl:79",
10750
+ "source": "providers/openai-codex.kdl:86",
10748
10751
  "class": "openai",
10749
10752
  "providers": [
10750
10753
  "openai-codex"
@@ -10761,7 +10764,7 @@
10761
10764
  }
10762
10765
  },
10763
10766
  {
10764
- "source": "providers/openai-codex.kdl:97",
10767
+ "source": "providers/openai-codex.kdl:104",
10765
10768
  "class": "openai",
10766
10769
  "providers": [
10767
10770
  "openai-codex"
@@ -10781,7 +10784,7 @@
10781
10784
  }
10782
10785
  },
10783
10786
  {
10784
- "source": "providers/openai-codex.kdl:103",
10787
+ "source": "providers/openai-codex.kdl:110",
10785
10788
  "class": "unknown",
10786
10789
  "providers": [
10787
10790
  "openai-codex"
@@ -10797,7 +10800,7 @@
10797
10800
  }
10798
10801
  },
10799
10802
  {
10800
- "source": "providers/openai-codex.kdl:106",
10803
+ "source": "providers/openai-codex.kdl:113",
10801
10804
  "class": "unknown",
10802
10805
  "providers": [
10803
10806
  "openai-codex"
@@ -10813,7 +10816,7 @@
10813
10816
  }
10814
10817
  },
10815
10818
  {
10816
- "source": "providers/openai-codex.kdl:112",
10819
+ "source": "providers/openai-codex.kdl:119",
10817
10820
  "providers": [
10818
10821
  "openai-codex"
10819
10822
  ],
@@ -10834,7 +10837,7 @@
10834
10837
  }
10835
10838
  },
10836
10839
  {
10837
- "source": "providers/openai-codex.kdl:121",
10840
+ "source": "providers/openai-codex.kdl:128",
10838
10841
  "providers": [
10839
10842
  "openai-codex"
10840
10843
  ],
@@ -10859,7 +10862,7 @@
10859
10862
  }
10860
10863
  },
10861
10864
  {
10862
- "source": "providers/openai-codex.kdl:130",
10865
+ "source": "providers/openai-codex.kdl:137",
10863
10866
  "providers": [
10864
10867
  "openai-codex"
10865
10868
  ],
@@ -10880,7 +10883,7 @@
10880
10883
  }
10881
10884
  },
10882
10885
  {
10883
- "source": "providers/openai-codex.kdl:141",
10886
+ "source": "providers/openai-codex.kdl:148",
10884
10887
  "providers": [
10885
10888
  "openai-codex"
10886
10889
  ],
@@ -10914,7 +10917,8 @@
10914
10917
  "serviceTierCost": {
10915
10918
  "flex": 0.5,
10916
10919
  "priority": 2
10917
- }
10920
+ },
10921
+ "clampContextOverride": true
10918
10922
  }
10919
10923
  },
10920
10924
  {
@@ -11157,7 +11161,28 @@
11157
11161
  }
11158
11162
  },
11159
11163
  {
11160
- "source": "providers/openai.kdl:77",
11164
+ "source": "providers/openai.kdl:79",
11165
+ "providers": [
11166
+ "openai"
11167
+ ],
11168
+ "models": [
11169
+ {
11170
+ "kind": "glob",
11171
+ "value": "gpt-6-astra*"
11172
+ }
11173
+ ],
11174
+ "catalog": {
11175
+ "longContext": {
11176
+ "inputThreshold": 272000,
11177
+ "input": 20,
11178
+ "output": 75,
11179
+ "cacheRead": 2,
11180
+ "cacheWrite": 25
11181
+ }
11182
+ }
11183
+ },
11184
+ {
11185
+ "source": "providers/openai.kdl:90",
11161
11186
  "providers": [
11162
11187
  "openai"
11163
11188
  ],
package/src/models.json CHANGED
@@ -261375,7 +261375,7 @@
261375
261375
  "api": "openai-codex-responses",
261376
261376
  "v2StreamingEnabled": true
261377
261377
  },
261378
- "contextWindow": 1050000,
261378
+ "contextWindow": 272000,
261379
261379
  "maxTokens": 128000,
261380
261380
  "preferWebsockets": true,
261381
261381
  "useResponsesLite": true,
@@ -92,9 +92,15 @@ export function resolveModelCacheProviderId(providerId: string, options: ModelCa
92
92
  // switching `COPILOT_GITHUB_TOKEN` to a different account misses the
93
93
  // prior endpoint's cache and re-runs discovery instead of hitting the
94
94
  // stale host and 403ing (PR #8510 review).
95
+ // v2: rows cached before the cross-provider routing strip inherit
96
+ // Cursor collapsed-family wire ids (e.g. enterprise-only
97
+ // `gpt-5.6-sol-fast` pinned to `-none-fast`); use a fresh namespace
98
+ // so they refetch instead of serving the poisoned rows. Listing ids
99
+ // cannot cover this class — any enterprise-only sibling can carry
100
+ // another provider's routing — so version the namespace instead.
95
101
  const baseUrl = options.baseUrl ?? PERSONAL_GITHUB_COPILOT_BASE_URL;
96
102
  const scope = `${options.apiKey ?? ""}\u0000${baseUrl}`;
97
- return `github-copilot:models-v1:${Bun.hash(scope).toString(36)}`;
103
+ return `github-copilot:models-v2:${Bun.hash(scope).toString(36)}`;
98
104
  }
99
105
  case "openrouter":
100
106
  return "openrouter:pseudo-api";
@@ -6380,6 +6380,22 @@ export function githubCopilotModelManagerOptions(config?: GithubCopilotModelMana
6380
6380
  }
6381
6381
  : {}),
6382
6382
  };
6383
+ // Cross-provider fallback references (e.g. a Cursor
6384
+ // collapsed family for an enterprise-only sibling id)
6385
+ // carry provider-specific wire routing that must not
6386
+ // transfer: the off-tier `requestModelId` pin would send
6387
+ // every Copilot request under the `-none` sibling id
6388
+ // regardless of thinking level.
6389
+ if (reference && reference.provider !== "github-copilot") {
6390
+ delete base.requestModelId;
6391
+ if (base.thinking) {
6392
+ // `base` is a shallow copy of the shared global
6393
+ // reference: clone before deleting or the bundled
6394
+ // entry loses its routing process-wide.
6395
+ base.thinking = { ...base.thinking };
6396
+ delete base.thinking.effortRouting;
6397
+ }
6398
+ }
6383
6399
  const defaultCost = copilotTierCost(tokenPrices.defaultTier);
6384
6400
  if (defaultCost) {
6385
6401
  // Cache writes are not reported per tier; retain the bundled provider rate.