@bitkyc08/opencodex 2.41.0 → 2.42.0
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/gui/dist/assets/index-BU1tE0sr.js +112 -0
- package/gui/dist/assets/index-DL9-iS6J.css +1 -0
- package/gui/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/adapters/cursor/protobuf-request.ts +41 -21
- package/src/adapters/identity.ts +8 -2
- package/src/adapters/openai-responses.ts +43 -3
- package/src/bridge.ts +25 -3
- package/src/cli/account-auth.ts +28 -3
- package/src/cli/account-extended.ts +7 -1
- package/src/cli/capabilities.ts +2 -2
- package/src/cli/observe.ts +3 -1
- package/src/codex/auth-api.ts +102 -9
- package/src/codex/catalog/effort.ts +15 -2
- package/src/codex/catalog/metadata.ts +114 -9
- package/src/codex/catalog/native-models.ts +71 -0
- package/src/codex/catalog/parsing.ts +3 -3
- package/src/codex/catalog/provider-fetch.ts +4 -3
- package/src/codex/catalog.ts +1 -1
- package/src/codex/data/upstream-models.json +169 -0
- package/src/codex/inject.ts +96 -6
- package/src/codex/injected-marker.ts +30 -4
- package/src/codex/journal.ts +14 -0
- package/src/generated/compatibility-version.json +40 -32
- package/src/oauth/account-quota-rank.ts +40 -1
- package/src/oauth/chatgpt-device.ts +187 -0
- package/src/oauth/chatgpt.ts +31 -4
- package/src/oauth/index.ts +13 -3
- package/src/oauth/log.ts +3 -0
- package/src/providers/muse-subscription-usage.ts +95 -0
- package/src/providers/quota.ts +96 -0
- package/src/providers/registry.ts +1 -1
- package/src/server/index.ts +15 -7
- package/src/server/live.ts +18 -4
- package/src/server/management/oauth-account-routes.ts +10 -3
- package/src/server/responses/core.ts +34 -0
- package/src/server/responses/empty-completion-guard.ts +4 -0
- package/src/types/request.ts +8 -0
- package/gui/dist/assets/index-B2YjLA-i.css +0 -1
- package/gui/dist/assets/index-aPup8CKb.js +0 -112
|
@@ -41,10 +41,14 @@ import { CODEX_NATIVE_ALIAS_CATALOG_KIND } from "./kinds";
|
|
|
41
41
|
import {
|
|
42
42
|
ACCOUNT_GATED_NATIVE_OPENAI_MODELS,
|
|
43
43
|
NATIVE_DAYBREAK_BLUE_MODEL,
|
|
44
|
+
NATIVE_GPT6_ASTRA_MODEL,
|
|
44
45
|
NATIVE_OPENAI_CAPABILITY_ALIAS_MODELS,
|
|
45
46
|
NATIVE_OPENAI_MODELS,
|
|
47
|
+
SELF_DESCRIBED_NATIVE_OPENAI_MODELS,
|
|
46
48
|
SUPPORTED_NATIVE_OPENAI_SLUGS,
|
|
49
|
+
hasNativeOpenAiCapabilityMetadata,
|
|
47
50
|
isNativeOpenAiCapabilityAliasModel,
|
|
51
|
+
nativeOpenAiAliasPresentation,
|
|
48
52
|
nativeOpenAiCapabilitySourceSlug,
|
|
49
53
|
} from "./native-models";
|
|
50
54
|
import { cachedAvailableAccountGatedNativeModels } from "../model-entitlements";
|
|
@@ -52,16 +56,25 @@ import { MAIN_CODEX_ACCOUNT_ID } from "../main-account";
|
|
|
52
56
|
export { CODEX_NATIVE_ALIAS_CATALOG_KIND } from "./kinds";
|
|
53
57
|
export {
|
|
54
58
|
NATIVE_DAYBREAK_BLUE_MODEL,
|
|
59
|
+
NATIVE_GPT6_ASTRA_MODEL,
|
|
55
60
|
NATIVE_OPENAI_CAPABILITY_ALIAS_MODELS,
|
|
56
61
|
NATIVE_OPENAI_MODELS,
|
|
62
|
+
SELF_DESCRIBED_NATIVE_OPENAI_MODELS,
|
|
57
63
|
SUPPORTED_NATIVE_OPENAI_SLUGS,
|
|
64
|
+
hasNativeOpenAiCapabilityMetadata,
|
|
58
65
|
isNativeOpenAiCapabilityAliasModel,
|
|
66
|
+
nativeOpenAiAliasPresentation,
|
|
59
67
|
nativeOpenAiCapabilitySourceSlug,
|
|
60
68
|
} from "./native-models";
|
|
61
69
|
|
|
62
70
|
export const DOCUMENTED_NATIVE_OPENAI_ADDITIONS = [
|
|
63
71
|
"gpt-5.3-codex-spark",
|
|
64
72
|
"gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna",
|
|
73
|
+
// Preemptive leak-based registration: no shipped codex-rs catalog carries it, so without this
|
|
74
|
+
// entry an install WITH a live catalog would drop the row that native-models.ts deliberately
|
|
75
|
+
// ungated. Listing it here keeps the bare slug reachable so a request actually dispatches and
|
|
76
|
+
// reports the upstream status.
|
|
77
|
+
NATIVE_GPT6_ASTRA_MODEL,
|
|
65
78
|
];
|
|
66
79
|
|
|
67
80
|
export function configuredNativeAliasSlugs(
|
|
@@ -161,6 +174,12 @@ export const NATIVE_OPENAI_CONTEXT_OVERRIDES: Record<string, { contextWindow?: n
|
|
|
161
174
|
// ChatGPT account."`), so the promotion rests on a report from an account that has
|
|
162
175
|
// access rather than on a probe. Treat it as the weaker evidence of the four.
|
|
163
176
|
[NATIVE_DAYBREAK_BLUE_MODEL]: { contextWindow: NATIVE_GPT56_CONTEXT_WINDOW, maxContextWindow: NATIVE_GPT56_MAX_INPUT_TOKENS, maxInputTokens: NATIVE_GPT56_MAX_INPUT_TOKENS },
|
|
177
|
+
// gpt-6-astra ships its own numbers (upstream models.json, #42607): a 272,000 default window
|
|
178
|
+
// against an 872,000 ceiling. It is NOT in NATIVE_GPT56_FAMILY, so it must not inherit that
|
|
179
|
+
// family's measured 922,000 clamp — advertising 922,000 here over-stated the ceiling by 50k.
|
|
180
|
+
// maxInputTokens is clamped to the resolved window by nativeOpenAiMaxInputTokens, so this reads
|
|
181
|
+
// 272,000 by default and 872,000 only under the long-window opt-in.
|
|
182
|
+
[NATIVE_GPT6_ASTRA_MODEL]: { contextWindow: 272_000, maxContextWindow: 872_000, maxInputTokens: 872_000 },
|
|
164
183
|
};
|
|
165
184
|
|
|
166
185
|
const PINNED_UPSTREAM_MODELS: Map<string, RawEntry> = new Map(
|
|
@@ -246,13 +265,36 @@ export function nativeContextLimits(
|
|
|
246
265
|
}
|
|
247
266
|
|
|
248
267
|
/** Apply the user levers to an authoritative value. */
|
|
268
|
+
/**
|
|
269
|
+
* The ceiling a native slug may be RAISED to by a user lever, or undefined when it has no
|
|
270
|
+
* separate long window.
|
|
271
|
+
*
|
|
272
|
+
* This is what makes the dashboard's 1M opt-in work: without an opt-in ceiling a lever can only
|
|
273
|
+
* ever narrow the advertised window, so the toggle would appear to do nothing. The GPT-5.6 family
|
|
274
|
+
* shares one measured ceiling; a self-described native carries its own in
|
|
275
|
+
* `NATIVE_OPENAI_CONTEXT_OVERRIDES.maxContextWindow` (`gpt-6-astra` ships 872,000 against a
|
|
276
|
+
* 272,000 default), and reading it per-slug is what keeps the toggle honest for a model whose
|
|
277
|
+
* ceiling is not the family's.
|
|
278
|
+
*/
|
|
279
|
+
function longWindowOptInCeiling(slug: string): number | undefined {
|
|
280
|
+
if (NATIVE_GPT56_FAMILY.has(slug)) return NATIVE_GPT56_MAX_INPUT_TOKENS;
|
|
281
|
+
const override = NATIVE_OPENAI_CONTEXT_OVERRIDES[slug];
|
|
282
|
+
const defaultWindow = positiveInt(override?.contextWindow);
|
|
283
|
+
const longWindow = positiveInt(override?.maxContextWindow);
|
|
284
|
+
if (defaultWindow === undefined || longWindow === undefined || longWindow <= defaultWindow) {
|
|
285
|
+
return undefined;
|
|
286
|
+
}
|
|
287
|
+
return longWindow;
|
|
288
|
+
}
|
|
289
|
+
|
|
249
290
|
function narrowToLimits(raw: number | undefined, slug: string, input: NativeContextLimitsInput): number | undefined {
|
|
250
291
|
if (raw === undefined) return undefined;
|
|
251
292
|
const limits = asLimits(input);
|
|
252
293
|
const overlay = positiveInt(limits.modelWindows?.[slug]) ?? positiveInt(limits.providerWindow);
|
|
253
294
|
const cap = positiveInt(limits.cap);
|
|
254
|
-
|
|
255
|
-
|
|
295
|
+
const optInCeiling = longWindowOptInCeiling(slug);
|
|
296
|
+
if (optInCeiling !== undefined) {
|
|
297
|
+
const ceiling = optInCeiling;
|
|
256
298
|
const chosen = overlay ?? cap ?? raw;
|
|
257
299
|
const window = Math.min(chosen, ceiling);
|
|
258
300
|
return overlay !== undefined && cap !== undefined ? Math.min(window, cap) : window;
|
|
@@ -496,15 +538,23 @@ export function applyNativeVisibility(
|
|
|
496
538
|
|
|
497
539
|
function upstreamNativeEntryForSlug(slug: string): RawEntry | undefined {
|
|
498
540
|
const sourceSlug = nativeOpenAiCapabilitySourceSlug(slug);
|
|
499
|
-
|
|
541
|
+
// A self-described native returns its OWN pinned row; the alias-cloning branch below stays
|
|
542
|
+
// reserved for slugs that genuinely borrow another model's identity. The allowlist is explicit
|
|
543
|
+
// rather than "has a pinned entry", which would also admit gpt-5.5/gpt-5.4/gpt-5.4-mini into
|
|
544
|
+
// the sync-replacement authority this map carries.
|
|
545
|
+
if (!sourceSlug.startsWith("gpt-5.6-") && !SELF_DESCRIBED_NATIVE_OPENAI_MODELS.has(slug)) {
|
|
546
|
+
return undefined;
|
|
547
|
+
}
|
|
500
548
|
const source = PINNED_UPSTREAM_MODELS.get(sourceSlug);
|
|
501
549
|
if (!source) return undefined;
|
|
502
|
-
if (slug === sourceSlug) return source;
|
|
550
|
+
if (slug === sourceSlug) return withDerivedBaseInstructions(source);
|
|
503
551
|
|
|
504
552
|
const alias = structuredClone(source) as RawEntry;
|
|
505
553
|
alias.slug = slug;
|
|
506
|
-
|
|
507
|
-
|
|
554
|
+
const presentation = nativeOpenAiAliasPresentation(slug);
|
|
555
|
+
if (!presentation) return undefined; // an alias with no product identity must not ship a wrong one
|
|
556
|
+
alias.display_name = presentation.displayName;
|
|
557
|
+
alias.description = presentation.description;
|
|
508
558
|
if (typeof alias.base_instructions === "string") {
|
|
509
559
|
alias.base_instructions = identifyRoutedModel(alias.base_instructions, slug);
|
|
510
560
|
}
|
|
@@ -521,6 +571,27 @@ function upstreamNativeEntryForSlug(slug: string): RawEntry | undefined {
|
|
|
521
571
|
return alias;
|
|
522
572
|
}
|
|
523
573
|
|
|
574
|
+
/**
|
|
575
|
+
* Backfill `base_instructions` from `model_messages.instructions_template` when upstream ships
|
|
576
|
+
* only the latter.
|
|
577
|
+
*
|
|
578
|
+
* `gpt-6-astra` is the first pinned row to arrive without a top-level `base_instructions`; every
|
|
579
|
+
* other native carries both. That field is not decorative here — `hasNativeCatalogRowShape`,
|
|
580
|
+
* `findNativeTemplate` and `findSupportedNativeTemplate` all test for it, so a row missing it is
|
|
581
|
+
* not recognized as a native catalog row at all. The two fields hold the same prompt upstream, so
|
|
582
|
+
* deriving one from the other preserves upstream's content while keeping this codebase's row
|
|
583
|
+
* shape intact. The pinned JSON is left byte-identical to upstream; only the projection fills in.
|
|
584
|
+
*/
|
|
585
|
+
function withDerivedBaseInstructions(entry: RawEntry): RawEntry {
|
|
586
|
+
if (typeof entry.base_instructions === "string" && entry.base_instructions.length > 0) return entry;
|
|
587
|
+
const messages = entry.model_messages;
|
|
588
|
+
const template = messages && typeof messages === "object" && !Array.isArray(messages)
|
|
589
|
+
? (messages as Record<string, unknown>).instructions_template
|
|
590
|
+
: undefined;
|
|
591
|
+
if (typeof template !== "string" || template.length === 0) return entry;
|
|
592
|
+
return { ...entry, base_instructions: template };
|
|
593
|
+
}
|
|
594
|
+
|
|
524
595
|
export const UPSTREAM_NATIVE_ENTRIES: Map<string, RawEntry> = new Map(
|
|
525
596
|
[...NATIVE_OPENAI_MODELS, ...NATIVE_OPENAI_CAPABILITY_ALIAS_MODELS].flatMap(slug => {
|
|
526
597
|
const entry = upstreamNativeEntryForSlug(slug);
|
|
@@ -536,10 +607,44 @@ export function upstreamNativeEntry(slug: string): RawEntry | null {
|
|
|
536
607
|
return clone;
|
|
537
608
|
}
|
|
538
609
|
|
|
610
|
+
/**
|
|
611
|
+
* Product label for a native slug whose custom row inherits native metadata.
|
|
612
|
+
*
|
|
613
|
+
* An alias carries a hand-written presentation because upstream never described it. A
|
|
614
|
+
* self-described native gets its label from its own pinned row instead, so the two kinds answer
|
|
615
|
+
* through one accessor and no caller has to know which it holds.
|
|
616
|
+
*/
|
|
617
|
+
export function nativeOpenAiCapabilityDisplayName(slug: string): string | undefined {
|
|
618
|
+
const presentation = nativeOpenAiAliasPresentation(slug);
|
|
619
|
+
if (presentation) return presentation.displayName;
|
|
620
|
+
const pinned = UPSTREAM_NATIVE_ENTRIES.get(slug);
|
|
621
|
+
return typeof pinned?.display_name === "string" ? pinned.display_name : undefined;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Slugs whose persisted row may be replaced by the pinned snapshot even when it carries a real
|
|
626
|
+
* display name — because THIS codebase wrote that name from a guess.
|
|
627
|
+
*
|
|
628
|
+
* `shouldUpgradeToUpstreamEntry`'s normal rule ("upgrade only fallback-quality rows, where
|
|
629
|
+
* `display_name === slug`") assumes any row with a real label came from upstream and is therefore
|
|
630
|
+
* authoritative. That assumption broke for `gpt-6-astra`: opencodex shipped a speculative row with
|
|
631
|
+
* a hand-written "GPT-6 Astra" label and a provisional description while the slug was still a leak.
|
|
632
|
+
* Those rows are already on disk in every install that ran that release, and they look genuine, so
|
|
633
|
+
* without this list they would survive every future sync and permanently shadow the real shipped
|
|
634
|
+
* metadata — the wrong label, the wrong 922k ceiling, the wrong priority.
|
|
635
|
+
*
|
|
636
|
+
* Membership is a statement about opencodex's own history, not about upstream. Add a slug only
|
|
637
|
+
* when a released version of this project wrote a fabricated row for it.
|
|
638
|
+
*/
|
|
639
|
+
const SELF_AUTHORED_NATIVE_ROWS: ReadonlySet<string> = new Set([NATIVE_GPT6_ASTRA_MODEL]);
|
|
640
|
+
|
|
539
641
|
export function shouldUpgradeToUpstreamEntry(entry: RawEntry): boolean {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
642
|
+
if (typeof entry.slug !== "string" || !UPSTREAM_NATIVE_ENTRIES.has(entry.slug)) return false;
|
|
643
|
+
if (entry.display_name === entry.slug) return true;
|
|
644
|
+
// A row this project authored from a guess is not evidence of upstream truth, however genuine
|
|
645
|
+
// its display name looks. Replace it once, from the pin.
|
|
646
|
+
return SELF_AUTHORED_NATIVE_ROWS.has(entry.slug)
|
|
647
|
+
&& entry.display_name !== UPSTREAM_NATIVE_ENTRIES.get(entry.slug)?.display_name;
|
|
543
648
|
}
|
|
544
649
|
|
|
545
650
|
export function nativeOpenAiSlugs(): string[] {
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
/** ChatGPT/Codex wire id observed for the account-native Daybreak Blue surface. */
|
|
2
2
|
export const NATIVE_DAYBREAK_BLUE_MODEL = "gpt-daybreak-blue-latest";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Leaked Responses API identifier for the announced next-generation OpenAI model
|
|
6
|
+
* (2026-09-03: OpenAI teased the launch on X; community probes report `gpt-6-astra` returning
|
|
7
|
+
* the same 404 as other internal staging slugs where an arbitrary slug returns 400).
|
|
8
|
+
* Registered preemptively so an entitled account can route it the moment it ships, before any
|
|
9
|
+
* codex-rs catalog carries it. Unlike Daybreak it is NOT wire-normalized to a serving id —
|
|
10
|
+
* the leaked slug IS the wire id.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* SHIPPED as of 2026-09-03: openai/codex `ed391d4dd` (#42607, bundled model catalog) and
|
|
14
|
+
* `1f7b99922` (#42619, Amazon Bedrock catalogs). The registration is no longer speculative —
|
|
15
|
+
* `src/codex/data/upstream-models.json` now pins the real row, so this slug is SELF-DESCRIBED
|
|
16
|
+
* and must not borrow another model's capability metadata.
|
|
17
|
+
*
|
|
18
|
+
* Still NOT wire-normalized: unlike Daybreak the slug IS the wire id.
|
|
19
|
+
*
|
|
20
|
+
* Deliberately NOT account-gated (owner decision, 2026-09-04, reaffirmed during rollout).
|
|
21
|
+
* Upstream `available_in_plans` lists 23 plans including `free`, but the model is rolling out,
|
|
22
|
+
* so a given account's Codex surface may still answer
|
|
23
|
+
* `"The 'gpt-6-astra' model is not supported when using Codex with a ChatGPT account."`
|
|
24
|
+
* — the same refusal Daybreak returns. Gating on an entitlement roster would hide the row until
|
|
25
|
+
* that roster catches up; listing it means the request dispatches and the real upstream status
|
|
26
|
+
* is what the user sees. Evidence: devlog/_plan/260904_astra_release_alignment/021.
|
|
27
|
+
*/
|
|
28
|
+
export const NATIVE_GPT6_ASTRA_MODEL = "gpt-6-astra";
|
|
29
|
+
|
|
4
30
|
/** Native ChatGPT/Codex ids whose availability is proven per authenticated account. */
|
|
5
31
|
export const ACCOUNT_GATED_NATIVE_OPENAI_MODELS: ReadonlySet<string> = new Set([
|
|
6
32
|
"gpt-5.6-sol",
|
|
@@ -25,6 +51,19 @@ const NATIVE_OPENAI_CAPABILITY_SOURCES: Readonly<Record<string, string>> = Objec
|
|
|
25
51
|
[NATIVE_DAYBREAK_BLUE_MODEL]: "gpt-5.6-sol",
|
|
26
52
|
});
|
|
27
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Native slugs that carry their OWN pinned upstream row rather than an alias's borrowed one.
|
|
56
|
+
*
|
|
57
|
+
* Membership authorizes `upstreamNativeEntryForSlug` to return the pinned entry directly. It is
|
|
58
|
+
* an explicit list, not a structural `PINNED_UPSTREAM_MODELS.has(slug)` predicate: the pin also
|
|
59
|
+
* holds `gpt-5.5`, `gpt-5.4` and `gpt-5.4-mini`, and admitting those into
|
|
60
|
+
* `UPSTREAM_NATIVE_ENTRIES` would newly authorize replacing their persisted catalog rows during
|
|
61
|
+
* sync — an invariant that map's own comment reserves for the GPT-5.6 family.
|
|
62
|
+
*/
|
|
63
|
+
export const SELF_DESCRIBED_NATIVE_OPENAI_MODELS: ReadonlySet<string> = new Set([
|
|
64
|
+
NATIVE_GPT6_ASTRA_MODEL,
|
|
65
|
+
]);
|
|
66
|
+
|
|
28
67
|
/**
|
|
29
68
|
* Native ids whose capability metadata is inherited from another pinned native row.
|
|
30
69
|
*
|
|
@@ -46,10 +85,41 @@ export function isNativeOpenAiCapabilityAliasModel(slug: string): boolean {
|
|
|
46
85
|
return Object.hasOwn(NATIVE_OPENAI_CAPABILITY_SOURCES, slug);
|
|
47
86
|
}
|
|
48
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Native slugs whose Codex-forward CUSTOM row inherits authoritative native metadata.
|
|
90
|
+
*
|
|
91
|
+
* Two shapes qualify and the distinction matters only to `upstreamNativeEntryForSlug`:
|
|
92
|
+
* a capability ALIAS borrows another model's pinned row, while a SELF-DESCRIBED native has its
|
|
93
|
+
* own. Every consumer that asks "does this custom row get real native capabilities and a real
|
|
94
|
+
* product label" wants both, which is why they call this rather than the alias check —
|
|
95
|
+
* `gpt-6-astra` stopped being an alias when its own row was pinned, and gating on
|
|
96
|
+
* `isNativeOpenAiCapabilityAliasModel` alone would have silently demoted it to a bare-slug label
|
|
97
|
+
* with no inherited ladder.
|
|
98
|
+
*/
|
|
99
|
+
export function hasNativeOpenAiCapabilityMetadata(slug: string): boolean {
|
|
100
|
+
return isNativeOpenAiCapabilityAliasModel(slug) || SELF_DESCRIBED_NATIVE_OPENAI_MODELS.has(slug);
|
|
101
|
+
}
|
|
102
|
+
|
|
49
103
|
export function nativeOpenAiCapabilitySourceSlug(slug: string): string {
|
|
50
104
|
return NATIVE_OPENAI_CAPABILITY_SOURCES[slug] ?? slug;
|
|
51
105
|
}
|
|
52
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Presentation identity per capability alias. Capability metadata (context, ladder, modalities)
|
|
109
|
+
* is inherited from the source model; the NAME and description are the alias's own product
|
|
110
|
+
* identity — hardcoding one alias's label would present every other alias as the wrong product.
|
|
111
|
+
*/
|
|
112
|
+
export const NATIVE_OPENAI_ALIAS_PRESENTATION: Readonly<Record<string, { displayName: string; description: string }>> = Object.freeze({
|
|
113
|
+
[NATIVE_DAYBREAK_BLUE_MODEL]: {
|
|
114
|
+
displayName: "Daybreak Blue",
|
|
115
|
+
description: "Frontier general-purpose model with safeguards for defensive cybersecurity work.",
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export function nativeOpenAiAliasPresentation(slug: string): { displayName: string; description: string } | undefined {
|
|
120
|
+
return NATIVE_OPENAI_ALIAS_PRESENTATION[slug];
|
|
121
|
+
}
|
|
122
|
+
|
|
53
123
|
/**
|
|
54
124
|
* Native OpenAI model ids that this release can route and restore with authoritative metadata.
|
|
55
125
|
*
|
|
@@ -70,6 +140,7 @@ export const NATIVE_OPENAI_MODELS = [
|
|
|
70
140
|
"gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex-spark",
|
|
71
141
|
"gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna",
|
|
72
142
|
NATIVE_DAYBREAK_BLUE_MODEL,
|
|
143
|
+
NATIVE_GPT6_ASTRA_MODEL,
|
|
73
144
|
];
|
|
74
145
|
|
|
75
146
|
export const SUPPORTED_NATIVE_OPENAI_SLUGS = new Set(NATIVE_OPENAI_MODELS);
|
|
@@ -31,7 +31,7 @@ import { redactSecretString } from "../../lib/redact";
|
|
|
31
31
|
import upstreamModelsSnapshot from "../data/upstream-models.json";
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
import { NATIVE_OPENAI_CONTEXT_OVERRIDES, SUPPORTED_NATIVE_OPENAI_SLUGS, UPSTREAM_NATIVE_ENTRIES,
|
|
34
|
+
import { NATIVE_OPENAI_CONTEXT_OVERRIDES, SUPPORTED_NATIVE_OPENAI_SLUGS, UPSTREAM_NATIVE_ENTRIES, hasNativeOpenAiCapabilityMetadata, nativeMultiAgentVersion, nativeOpenAiAutoCompactTokenLimit, nativeOpenAiContextWindow, nativeOpenAiMaxInputTokens, type NativeContextLimitsInput } from "./metadata";
|
|
35
35
|
import { clampAutoCompactTokenLimit } from "../../providers/auto-compact-budget";
|
|
36
36
|
import { trustedAccountBoundNativeCatalogSlug } from "./account-models";
|
|
37
37
|
import { CODEX_NATIVE_ALIAS_CATALOG_KIND } from "./kinds";
|
|
@@ -526,7 +526,7 @@ export function catalogEntryIsNativeChatGpt(entry: RawEntry): boolean {
|
|
|
526
526
|
if (
|
|
527
527
|
entry.opencodex_catalog_kind === CODEX_CUSTOM_MODEL_CATALOG_KIND
|
|
528
528
|
&& entry.use_responses_lite === true
|
|
529
|
-
&&
|
|
529
|
+
&& hasNativeOpenAiCapabilityMetadata(routedNativeSlug)
|
|
530
530
|
) return true;
|
|
531
531
|
if (UPSTREAM_NATIVE_ENTRIES.has(slug) || SUPPORTED_NATIVE_OPENAI_SLUGS.has(slug)) return true;
|
|
532
532
|
return false;
|
|
@@ -584,7 +584,7 @@ export function applyMultiAgentMode(
|
|
|
584
584
|
: "";
|
|
585
585
|
const codexForwardCapabilityAlias = entry.opencodex_catalog_kind === CODEX_CUSTOM_MODEL_CATALOG_KIND
|
|
586
586
|
&& entry.use_responses_lite === true
|
|
587
|
-
&&
|
|
587
|
+
&& hasNativeOpenAiCapabilityMetadata(routedNativeSlug)
|
|
588
588
|
? routedNativeSlug
|
|
589
589
|
: undefined;
|
|
590
590
|
const upstreamPin = nativeAlias
|
|
@@ -81,7 +81,7 @@ import { createAdmissionGate, ResourceAdmissionError, type AdmissionMetrics } fr
|
|
|
81
81
|
|
|
82
82
|
import { CODEX_CUSTOM_MODEL_CATALOG_KIND, JAWCODE_CATALOG_AUGMENT_PROVIDERS, catalogModelSlug, shouldExposeRoutedModel } from "./parsing";
|
|
83
83
|
import type { CatalogModel } from "./parsing";
|
|
84
|
-
import { disabledNativeSlugs, hasComboTargets,
|
|
84
|
+
import { disabledNativeSlugs, hasComboTargets, hasNativeOpenAiCapabilityMetadata, NATIVE_GPT56_MAX_INPUT_TOKENS, nativeContextLimits, nativeOpenAiCapabilityDisplayName, nativeDefaultReasoningEffort, nativeInputModalities, nativeOpenAiAutoCompactTokenLimit, nativeOpenAiContextWindow, nativeOpenAiMaxInputTokens, nativeOpenAiMaxOutputTokens, nativeOpenAiSlugs, nativeParallelToolCalls, nativeReasoningEfforts } from "./metadata";
|
|
85
85
|
import { deriveComboCatalogModel, normalizedOpenAiApiSignature, openAiApiCollisionWarnings, replaceLastComboCatalogOmissions, warnUncataloguedComboOnce } from "./aggregation";
|
|
86
86
|
import type { ComboCatalogOmission } from "./aggregation";
|
|
87
87
|
import type { CatalogGatherProviderAuthEvidence } from "./filesystem-evidence";
|
|
@@ -2190,7 +2190,7 @@ async function gatherRoutedModelsUncached(
|
|
|
2190
2190
|
const codexForwardNativeCapabilityAlias = cm.provider === OPENAI_CODEX_PROVIDER_ID
|
|
2191
2191
|
&& providerForCanonicalCheck !== undefined
|
|
2192
2192
|
&& isCanonicalOpenAiForwardProvider(providerForCanonicalCheck)
|
|
2193
|
-
&&
|
|
2193
|
+
&& hasNativeOpenAiCapabilityMetadata(cm.modelId);
|
|
2194
2194
|
const customNativeLimits = {
|
|
2195
2195
|
...nativeContextLimits(config),
|
|
2196
2196
|
...(typeof cm.contextWindow === "number" && cm.contextWindow > 0
|
|
@@ -2252,7 +2252,8 @@ async function gatherRoutedModelsUncached(
|
|
|
2252
2252
|
// Display-only label: never feeds routing (customModels are keyed by routedSlug below).
|
|
2253
2253
|
...(cm.displayName
|
|
2254
2254
|
? { displayName: cm.displayName }
|
|
2255
|
-
: codexForwardNativeCapabilityAlias
|
|
2255
|
+
: codexForwardNativeCapabilityAlias
|
|
2256
|
+
? { displayName: nativeOpenAiCapabilityDisplayName(cm.modelId) ?? cm.modelId } : {}),
|
|
2256
2257
|
...(customContextWindow !== undefined ? { contextWindow: customContextWindow } : {}),
|
|
2257
2258
|
...(customMaxInputTokens !== undefined ? { maxInputTokens: customMaxInputTokens } : {}),
|
|
2258
2259
|
...(customMaxOutputTokens !== undefined ? { maxOutputTokens: customMaxOutputTokens } : {}),
|
package/src/codex/catalog.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Public surface preserved exactly; importers keep using "src/codex/catalog".
|
|
3
3
|
export { isMediaGenerationModelId, shouldExposeRoutedModel, readCodexCatalogPath, readCatalog, normalizeRoutedCatalogEntry, catalogModelSlug, filterSupportedNativeSlugs, catalogModelSupportsReasoningSummaries } from "./catalog/parsing";
|
|
4
4
|
export type { CatalogModel, MultiAgentMode } from "./catalog/parsing";
|
|
5
|
-
export { accountBoundNativeOpenAiSlugs, accountBoundNativeOpenAiSlugsBySelector, CODEX_NATIVE_ALIAS_CATALOG_KIND, NATIVE_DAYBREAK_BLUE_MODEL, NATIVE_GPT56_CONTEXT_WINDOW, NATIVE_GPT56_MAX_INPUT_TOKENS, NATIVE_GPT56_OPT_IN_CONTEXT_WINDOW, NATIVE_OPENAI_CAPABILITY_ALIAS_MODELS, NATIVE_OPENAI_MODELS, configuredNativeAliasSlugs, desktopAllowlistSuppressedNativeSlugs, isNativeAliasCatalogEntry, isNativeOpenAiCapabilityAliasModel, nativeContextLimits, nativeOpenAiCapabilitySourceSlug, nativeOpenAiContextWindow, nativeOpenAiMaxInputTokens, nativeOpenAiMaxOutputTokens, nativeOpenAiContextTier, disabledNativeSlugs, visibleNativeSlugs, desktopVisibleNativeSlugs, nativeModelRows, applyNativeVisibility, observedAccountBoundNativeEntries, observedAccountBoundNativeOpenAiSlugs, upstreamNativeEntry, nativeOpenAiSlugs, listCatalogNativeSlugs, nativeInputModalities, nativeReasoningEfforts, nativeDefaultReasoningEffort, shouldIncludeAccountBoundNativeOpenAi, shouldIncludeNativeOpenAi, type NativeContextLimits, type NativeContextLimitsInput } from "./catalog/metadata";
|
|
5
|
+
export { accountBoundNativeOpenAiSlugs, accountBoundNativeOpenAiSlugsBySelector, CODEX_NATIVE_ALIAS_CATALOG_KIND, NATIVE_DAYBREAK_BLUE_MODEL, NATIVE_GPT6_ASTRA_MODEL, NATIVE_GPT56_CONTEXT_WINDOW, NATIVE_GPT56_MAX_INPUT_TOKENS, NATIVE_GPT56_OPT_IN_CONTEXT_WINDOW, NATIVE_OPENAI_CAPABILITY_ALIAS_MODELS, NATIVE_OPENAI_MODELS, configuredNativeAliasSlugs, desktopAllowlistSuppressedNativeSlugs, isNativeAliasCatalogEntry, isNativeOpenAiCapabilityAliasModel, nativeContextLimits, nativeOpenAiCapabilitySourceSlug, nativeOpenAiContextWindow, nativeOpenAiMaxInputTokens, nativeOpenAiMaxOutputTokens, nativeOpenAiContextTier, disabledNativeSlugs, visibleNativeSlugs, desktopVisibleNativeSlugs, nativeModelRows, applyNativeVisibility, observedAccountBoundNativeEntries, observedAccountBoundNativeOpenAiSlugs, upstreamNativeEntry, nativeOpenAiSlugs, listCatalogNativeSlugs, nativeInputModalities, nativeReasoningEfforts, nativeDefaultReasoningEffort, shouldIncludeAccountBoundNativeOpenAi, shouldIncludeNativeOpenAi, type NativeContextLimits, type NativeContextLimitsInput } from "./catalog/metadata";
|
|
6
6
|
export { isSpawnableCodexCandidate, codexExecInvocation, loadBundledCodexCatalog, materializeBundledCodexCatalog, loadCatalogTemplate } from "./catalog/bundled";
|
|
7
7
|
export { nativeEffortClamp, shouldApplyNativeEffortClamp, catalogModelEfforts, codexSupportedReasoningEfforts, clampedDefaultEffort, clampEntryToCodexSupportedEfforts, clampCatalogModelsToCodexSupport } from "./catalog/effort";
|
|
8
8
|
export { applyProviderConfigHints, isDatedVariantId, filterCatalogVisibleModels, gatherRoutedModels, clearGatherRoutedModelsInflight, augmentRoutedModelsWithRegistryOpenAiApiRows, augmentRoutedModelsWithMetadata, resolveComboCatalogMember, configuredComboTargetModelsByProvider } from "./catalog/provider-fetch";
|