codex-multi-auth 2.4.0 → 2.6.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/.codex-plugin/plugin.json +1 -2
- package/README.md +2 -1
- package/config/README.md +1 -1
- package/config/codex-legacy.json +425 -0
- package/config/codex-modern.json +139 -0
- package/dist/lib/codex-manager/commands/best.js +2 -2
- package/dist/lib/codex-manager/commands/forecast.js +4 -4
- package/dist/lib/codex-manager/commands/report.js +4 -4
- package/dist/lib/codex-manager/help.js +2 -2
- package/dist/lib/codex-manager/quota-cache-helpers.d.ts +1 -1
- package/dist/lib/codex-manager/quota-cache-helpers.d.ts.map +1 -1
- package/dist/lib/codex-manager/quota-cache-helpers.js +2 -2
- package/dist/lib/codex-manager/repair-commands.js +4 -4
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +5 -1
- package/dist/lib/constants.d.ts +19 -0
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +19 -0
- package/dist/lib/quota-probe.d.ts.map +1 -1
- package/dist/lib/quota-probe.js +5 -2
- package/dist/lib/request/helpers/model-map.d.ts +17 -2
- package/dist/lib/request/helpers/model-map.d.ts.map +1 -1
- package/dist/lib/request/helpers/model-map.js +141 -1
- package/dist/lib/request/request-transformer.d.ts.map +1 -1
- package/dist/lib/request/request-transformer.js +26 -13
- package/dist/lib/runtime/quota-probe.d.ts.map +1 -1
- package/dist/lib/runtime/quota-probe.js +5 -2
- package/dist/lib/types.d.ts +8 -2
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/usage/pricing.d.ts.map +1 -1
- package/dist/lib/usage/pricing.js +18 -0
- package/package.json +1 -1
- package/scripts/codex.js +129 -15
|
@@ -4,7 +4,7 @@ import { extractAccountEmail, extractAccountId, formatAccountLabel, sanitizeEmai
|
|
|
4
4
|
import { evaluateForecastAccounts, recommendForecastAccount, summarizeForecast, } from "../../forecast.js";
|
|
5
5
|
import { applyRefreshedAccountPatch, persistRefreshedAccountPatch, serializeForecastResults, } from "../forecast-report-shared.js";
|
|
6
6
|
import { formatQuotaSnapshotLine, describeCodexProbeFailure, } from "../../quota-probe.js";
|
|
7
|
-
import {
|
|
7
|
+
import { DEFAULT_PROBE_MODEL, getModelCapabilities, getModelProfile, resolveNormalizedModel, } from "../../request/helpers/model-map.js";
|
|
8
8
|
import { sleep } from "../../utils.js";
|
|
9
9
|
import { tempPathFor } from "../../temp-path.js";
|
|
10
10
|
function parsePositiveIntegerOption(rawValue) {
|
|
@@ -31,7 +31,7 @@ function printReportUsage(logInfo) {
|
|
|
31
31
|
" --live, -l Probe live quota headers via Codex backend",
|
|
32
32
|
" --json, -j Print machine-readable JSON output",
|
|
33
33
|
" --explain Print per-account reasoning in text mode",
|
|
34
|
-
` --model, -m Probe model for live mode (default: ${
|
|
34
|
+
` --model, -m Probe model for live mode (default: ${DEFAULT_PROBE_MODEL})`,
|
|
35
35
|
" --max-accounts N Limit how many enabled accounts live mode can consider",
|
|
36
36
|
" --max-probes N Limit how many live quota probes can run",
|
|
37
37
|
" --cached-only Skip refreshes and only use already-usable access tokens",
|
|
@@ -43,7 +43,7 @@ function parseReportArgs(args) {
|
|
|
43
43
|
live: false,
|
|
44
44
|
json: false,
|
|
45
45
|
explain: false,
|
|
46
|
-
model:
|
|
46
|
+
model: DEFAULT_PROBE_MODEL,
|
|
47
47
|
cachedOnly: false,
|
|
48
48
|
};
|
|
49
49
|
for (let i = 0; i < args.length; i += 1) {
|
|
@@ -209,7 +209,7 @@ export async function runReportCommand(args, deps) {
|
|
|
209
209
|
return 1;
|
|
210
210
|
}
|
|
211
211
|
const options = parsedArgs.options;
|
|
212
|
-
const requestedModel = options.model?.trim() ||
|
|
212
|
+
const requestedModel = options.model?.trim() || DEFAULT_PROBE_MODEL;
|
|
213
213
|
const modelInspection = inspectRequestedModel(requestedModel);
|
|
214
214
|
deps.setStoragePath(null);
|
|
215
215
|
const storagePath = deps.getStoragePath();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const DEFAULT_LIVE_PROBE_MODEL =
|
|
1
|
+
import { DEFAULT_PROBE_MODEL } from "../request/helpers/model-map.js";
|
|
2
|
+
const DEFAULT_LIVE_PROBE_MODEL = DEFAULT_PROBE_MODEL;
|
|
3
3
|
export function printUsage() {
|
|
4
4
|
console.log([
|
|
5
5
|
"Codex Multi-Auth CLI",
|
|
@@ -10,7 +10,7 @@ import type { AccountMetadataV3 } from "../storage.js";
|
|
|
10
10
|
* implementation.
|
|
11
11
|
*/
|
|
12
12
|
/** Default model used for live quota probes across manager commands. */
|
|
13
|
-
export declare const DEFAULT_LIVE_PROBE_MODEL = "gpt-5.
|
|
13
|
+
export declare const DEFAULT_LIVE_PROBE_MODEL = "gpt-5.6-sol";
|
|
14
14
|
export declare function getPersistedQuotaViewForAccount(cache: QuotaCacheData | null, account: Pick<AccountMetadataV3, "accountId" | "email" | "rateLimitResetTimes">, accounts: readonly Pick<AccountMetadataV3, "accountId" | "email">[], now: number, emailFallbackState?: ReadonlyMap<string, import("../quota-readiness.js").QuotaEmailFallbackState>): QuotaCacheEntry | null;
|
|
15
15
|
export declare function updateQuotaCacheForAccount(cache: QuotaCacheData, account: Pick<AccountMetadataV3, "accountId" | "email">, snapshot: CodexQuotaSnapshot, accounts: readonly Pick<AccountMetadataV3, "accountId" | "email">[], emailFallbackState?: ReadonlyMap<string, import("../quota-readiness.js").QuotaEmailFallbackState>): boolean;
|
|
16
16
|
export declare function cloneQuotaCacheData(cache: QuotaCacheData): QuotaCacheData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-cache-helpers.d.ts","sourceRoot":"","sources":["../../../lib/codex-manager/quota-cache-helpers.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
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
|
|
|
1
1
|
import { buildQuotaEmailFallbackState, hasSafeQuotaEmailFallback, hasUniqueQuotaAccountId, normalizeQuotaAccountId, normalizeQuotaEmail, } from "../quota-readiness.js";
|
|
2
|
-
import { DEFAULT_MODEL } from "../request/helpers/model-map.js";
|
|
2
|
+
import { DEFAULT_MODEL, DEFAULT_PROBE_MODEL, } from "../request/helpers/model-map.js";
|
|
3
3
|
import { getRateLimitResetTimeForFamily } from "../runtime/account-status.js";
|
|
4
4
|
/**
|
|
5
5
|
* Quota-cache lookup/update helpers shared by the manager CLI commands (audit
|
|
@@ -10,7 +10,7 @@ import { getRateLimitResetTimeForFamily } from "../runtime/account-status.js";
|
|
|
10
10
|
* implementation.
|
|
11
11
|
*/
|
|
12
12
|
/** Default model used for live quota probes across manager commands. */
|
|
13
|
-
export const DEFAULT_LIVE_PROBE_MODEL =
|
|
13
|
+
export const DEFAULT_LIVE_PROBE_MODEL = DEFAULT_PROBE_MODEL;
|
|
14
14
|
function getQuotaCacheEntryForAccount(cache, account, accounts, emailFallbackState = buildQuotaEmailFallbackState(accounts)) {
|
|
15
15
|
const accountId = normalizeQuotaAccountId(account.accountId);
|
|
16
16
|
if (accountId &&
|
|
@@ -11,7 +11,7 @@ import { findMatchingAccountIndex, getStoragePath, loadAccounts, loadFlaggedAcco
|
|
|
11
11
|
import { getCodexCliAuthPath, getCodexCliConfigPath, loadCodexCliState, } from "../codex-cli/state.js";
|
|
12
12
|
import { setCodexCliActiveSelection } from "../codex-cli/writer.js";
|
|
13
13
|
import { MODEL_FAMILIES } from "../prompts/codex.js";
|
|
14
|
-
import {
|
|
14
|
+
import { DEFAULT_PROBE_MODEL, resolveNormalizedModel } from "../request/helpers/model-map.js";
|
|
15
15
|
import { loadPersistedRuntimeObservabilitySnapshot } from "../runtime/runtime-observability.js";
|
|
16
16
|
function printFixUsage() {
|
|
17
17
|
console.log([
|
|
@@ -22,7 +22,7 @@ function printFixUsage() {
|
|
|
22
22
|
" --dry-run, -n Preview changes without writing storage",
|
|
23
23
|
" --json, -j Print machine-readable JSON output",
|
|
24
24
|
" --live, -l Run live session probe before deciding health",
|
|
25
|
-
` --model, -m Probe model for live mode (default: ${
|
|
25
|
+
` --model, -m Probe model for live mode (default: ${DEFAULT_PROBE_MODEL})`,
|
|
26
26
|
"",
|
|
27
27
|
"Behavior:",
|
|
28
28
|
" - Refreshes tokens for enabled accounts",
|
|
@@ -66,7 +66,7 @@ export function parseFixArgs(args) {
|
|
|
66
66
|
dryRun: false,
|
|
67
67
|
json: false,
|
|
68
68
|
live: false,
|
|
69
|
-
model:
|
|
69
|
+
model: DEFAULT_PROBE_MODEL,
|
|
70
70
|
};
|
|
71
71
|
for (let i = 0; i < args.length; i += 1) {
|
|
72
72
|
const argValue = args[i];
|
|
@@ -822,7 +822,7 @@ export async function runFix(args, deps) {
|
|
|
822
822
|
return 1;
|
|
823
823
|
}
|
|
824
824
|
const options = parsedArgs.options;
|
|
825
|
-
const probeModel = resolveNormalizedModel(options.model.trim() ||
|
|
825
|
+
const probeModel = resolveNormalizedModel(options.model.trim() || DEFAULT_PROBE_MODEL);
|
|
826
826
|
const display = DEFAULT_DASHBOARD_DISPLAY_SETTINGS;
|
|
827
827
|
const quotaCache = options.live ? await loadQuotaCache() : null;
|
|
828
828
|
const workingQuotaCache = quotaCache ? deps.cloneQuotaCacheData(quotaCache) : null;
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAoE/C,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE3D,KAAK,wBAAwB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAE3E,KAAK,yBAAyB,GAAG,OAAO,CACvC,wBAAwB,EACxB,SAAS,GAAG,MAAM,CAClB,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;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAOjF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAO3E;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAM3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAM7E;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CACnD,YAAY,EAAE,YAAY,GACxB,MAAM,CAOR;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oCAAoC,CACnD,YAAY,EAAE,YAAY,GACxB,MAAM,CAOR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAC9C,YAAY,EAAE,YAAY,GACxB,MAAM,CAOR;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAClC,YAAY,EAAE,YAAY,GACxB,SAAS,GAAG,QAAQ,CAOtB;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACpC,YAAY,EAAE,YAAY,GACxB,QAAQ,GAAG,YAAY,CAOzB;AAuWD,wBAAgB,4BAA4B,IAAI,mBAAmB,CA0BlE"}
|
package/dist/lib/config.js
CHANGED
|
@@ -144,7 +144,11 @@ export const DEFAULT_PLUGIN_CONFIG = {
|
|
|
144
144
|
rateLimitStateResetMs: 120_000,
|
|
145
145
|
rateLimitMaxBackoffMs: 60_000,
|
|
146
146
|
rateLimitShortRetryThresholdMs: 5_000,
|
|
147
|
-
|
|
147
|
+
// Default-on so parallel `codex-multi-auth-codex` processes (e.g. many agents
|
|
148
|
+
// run concurrently) each bias toward a different account, reducing cascading
|
|
149
|
+
// 429s under high parallelism (#628). No-op for single-account pools; a manual
|
|
150
|
+
// pin and health/quota scoring still take precedence over the small offset.
|
|
151
|
+
pidOffsetEnabled: true,
|
|
148
152
|
fetchTimeoutMs: 60_000,
|
|
149
153
|
streamStallTimeoutMs: 45_000,
|
|
150
154
|
liveAccountSync: true,
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -85,4 +85,23 @@ export declare const ACCOUNT_LIMITS: {
|
|
|
85
85
|
/** Number of consecutive auth failures before auto-removing account */
|
|
86
86
|
readonly MAX_AUTH_FAILURES_BEFORE_REMOVAL: 3;
|
|
87
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Every reasoning-effort level, weakest first.
|
|
90
|
+
*
|
|
91
|
+
* Single source of truth: the effort union and the model-id suffix pattern in
|
|
92
|
+
* `lib/request/request-transformer.ts` are both derived from this, so a new
|
|
93
|
+
* tier cannot be added to one and forgotten in the other.
|
|
94
|
+
*
|
|
95
|
+
* `max` and `ultra` arrived with GPT-5.6.
|
|
96
|
+
*/
|
|
97
|
+
export declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"];
|
|
98
|
+
/**
|
|
99
|
+
* `ultra` is selectable but never reaches the wire: Codex rewrites it to `max`
|
|
100
|
+
* before the request is sent (see `reasoning_effort_for_request` in
|
|
101
|
+
* codex-rs/core/src/client.rs). It denotes automatic subagent delegation on the
|
|
102
|
+
* client, not a distinct backend effort level.
|
|
103
|
+
*/
|
|
104
|
+
export type ModelReasoningEffort = (typeof REASONING_EFFORTS)[number];
|
|
105
|
+
/** Effort levels the Responses API actually accepts. */
|
|
106
|
+
export type WireReasoningEffort = Exclude<ModelReasoningEffort, "ultra">;
|
|
88
107
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../lib/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,uDAAuD;AACvD,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAE9C,uCAAuC;AACvC,eAAO,MAAM,cAAc,oCAAoC,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,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,oCAAoC;AACpC,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,wBAAwB;AACxB,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,cAAc,EAAG,6BAAsC,CAAC;AAErE,qBAAqB;AACrB,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX,qCAAqC;AACrC,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,gDAAgD;AAChD,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,iCAAiC;AACjC,eAAO,MAAM,WAAW;;;;;;CAQd,CAAC;AAEX,kCAAkC;AAClC,eAAO,MAAM,cAAc;IAC1B,8DAA8D;;IAE9D,sEAAsE;;IAEtE,uEAAuE;;CAE9D,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,gFASpB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,wDAAwD;AACxD,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC"}
|
package/dist/lib/constants.js
CHANGED
|
@@ -85,3 +85,22 @@ export const ACCOUNT_LIMITS = {
|
|
|
85
85
|
/** Number of consecutive auth failures before auto-removing account */
|
|
86
86
|
MAX_AUTH_FAILURES_BEFORE_REMOVAL: 3,
|
|
87
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Every reasoning-effort level, weakest first.
|
|
90
|
+
*
|
|
91
|
+
* Single source of truth: the effort union and the model-id suffix pattern in
|
|
92
|
+
* `lib/request/request-transformer.ts` are both derived from this, so a new
|
|
93
|
+
* tier cannot be added to one and forgotten in the other.
|
|
94
|
+
*
|
|
95
|
+
* `max` and `ultra` arrived with GPT-5.6.
|
|
96
|
+
*/
|
|
97
|
+
export const REASONING_EFFORTS = [
|
|
98
|
+
"none",
|
|
99
|
+
"minimal",
|
|
100
|
+
"low",
|
|
101
|
+
"medium",
|
|
102
|
+
"high",
|
|
103
|
+
"xhigh",
|
|
104
|
+
"max",
|
|
105
|
+
"ultra",
|
|
106
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-probe.d.ts","sourceRoot":"","sources":["../../lib/quota-probe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quota-probe.d.ts","sourceRoot":"","sources":["../../lib/quota-probe.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,yCAAyC,CAAC;AAEnF;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,OAAO,EACd,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GACrC,MAAM,CAMR;AAED,MAAM,WAAW,gBAAgB;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACd;AAiQD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAa5E;AAED,MAAM,WAAW,sBAAsB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,uBAAuB,CAC5C,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,kBAAkB,CAAC,CA4G7B"}
|
package/dist/lib/quota-probe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CODEX_BASE_URL } from "./constants.js";
|
|
2
2
|
import { createCodexHeaders, getUnsupportedCodexModelInfo } from "./request/fetch-helpers.js";
|
|
3
|
-
import { QUOTA_PROBE_MODEL_CHAIN } from "./request/helpers/model-map.js";
|
|
3
|
+
import { QUOTA_PROBE_MODEL_CHAIN, resolveProbeReasoningEffort, } from "./request/helpers/model-map.js";
|
|
4
4
|
import { CodexUnavailableError, isCodexUnavailableError } from "./errors.js";
|
|
5
5
|
import { getCodexInstructions } from "./prompts/codex.js";
|
|
6
6
|
import { mutateRuntimeObservabilitySnapshot } from "./runtime/runtime-observability.js";
|
|
@@ -338,7 +338,10 @@ export async function fetchCodexQuotaSnapshot(options) {
|
|
|
338
338
|
content: [{ type: "input_text", text: "quota ping" }],
|
|
339
339
|
},
|
|
340
340
|
],
|
|
341
|
-
|
|
341
|
+
// Send the cheapest effort each probe model actually declares (the
|
|
342
|
+
// GPT-5.6 tiers and codex models do not list `none`), keeping the
|
|
343
|
+
// probe consistent with normal request routing (issue #627).
|
|
344
|
+
reasoning: { effort: resolveProbeReasoningEffort(model), summary: "auto" },
|
|
342
345
|
text: { verbosity: "low" },
|
|
343
346
|
};
|
|
344
347
|
const headers = createCodexHeaders(undefined, options.accountId, options.accessToken, {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* tool-surface metadata so routing logic stays consistent across the request
|
|
7
7
|
* transformer, prompt selection, and CLI diagnostics.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
import type { ModelReasoningEffort, WireReasoningEffort } from "../../constants.js";
|
|
10
|
+
export type { ModelReasoningEffort, WireReasoningEffort };
|
|
10
11
|
export type PromptModelFamily = "gpt-5-codex" | "codex-max" | "codex" | "gpt-5.2" | "gpt-5.1";
|
|
11
12
|
/**
|
|
12
13
|
* Model family type for prompt selection
|
|
@@ -32,7 +33,8 @@ export interface ModelProfile {
|
|
|
32
33
|
}
|
|
33
34
|
export declare const CURRENT_CODEX_MODEL = "gpt-5.3-codex";
|
|
34
35
|
export declare const DEFAULT_MODEL = "gpt-5.5";
|
|
35
|
-
export declare const
|
|
36
|
+
export declare const DEFAULT_PROBE_MODEL = "gpt-5.6-sol";
|
|
37
|
+
export declare const QUOTA_PROBE_MODEL_CHAIN: readonly ["gpt-5.6-sol", "gpt-5.5", "gpt-5.4", "gpt-5.3-codex", "gpt-5.2-codex", "gpt-5-codex"];
|
|
36
38
|
/**
|
|
37
39
|
* Effective model profiles keyed by canonical model name.
|
|
38
40
|
*
|
|
@@ -67,6 +69,19 @@ export declare function getModelProfile(model: string | undefined): ModelProfile
|
|
|
67
69
|
* Expose current tool-surface metadata for diagnostics and capability checks.
|
|
68
70
|
*/
|
|
69
71
|
export declare function getModelCapabilities(model: string | undefined): ModelCapabilities;
|
|
72
|
+
/**
|
|
73
|
+
* Resolve the cheapest reasoning effort a probe model actually supports.
|
|
74
|
+
*
|
|
75
|
+
* A quota probe only needs the response's quota headers, so it wants the
|
|
76
|
+
* lowest-cost effort. Rather than hardcoding `none`, it sends the cheapest
|
|
77
|
+
* effort the probe model actually declares support for, mirroring how
|
|
78
|
+
* `getReasoningConfig` coerces a real request: the GPT-5.6 tiers and the codex
|
|
79
|
+
* models do not list `none`/`minimal` in the upstream catalog, so the probe
|
|
80
|
+
* sends `low` for them and `none` for the pre-5.6 general models that do
|
|
81
|
+
* (issue #627). Keeps the probe's effort consistent with normal routing and
|
|
82
|
+
* within each model's declared range. Never returns `ultra`.
|
|
83
|
+
*/
|
|
84
|
+
export declare function resolveProbeReasoningEffort(model: string | undefined): WireReasoningEffort;
|
|
70
85
|
/**
|
|
71
86
|
* Check if a model ID is in the explicit model map.
|
|
72
87
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-map.d.ts","sourceRoot":"","sources":["../../../../lib/request/helpers/model-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"model-map.d.ts","sourceRoot":"","sources":["../../../../lib/request/helpers/model-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EACX,oBAAoB,EACpB,mBAAmB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAC1B,aAAa,GACb,WAAW,GACX,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAMvC,CAAC;AAEX,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,iBAAiB,CAAC;IAChC,sBAAsB,EAAE,oBAAoB,CAAC;IAC7C,yBAAyB,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC3D,YAAY,EAAE,iBAAiB,CAAC;CAChC;AA6CD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,aAAa,YAAY,CAAC;AAQvC,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAOjD,eAAO,MAAM,uBAAuB,iGAO1B,CAAC;AA4EX;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA6G9C,CAAC;AAEX,QAAA,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,CAAC;AAqG7C,OAAO,EAAE,SAAS,EAAE,CAAC;AAoKrB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQtE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CA2BxE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAavE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAEjF;AAeD;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,GACvB,mBAAmB,CASrB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -54,10 +54,20 @@ const TOOL_CAPABILITIES = {
|
|
|
54
54
|
};
|
|
55
55
|
export const CURRENT_CODEX_MODEL = "gpt-5.3-codex";
|
|
56
56
|
export const DEFAULT_MODEL = "gpt-5.5";
|
|
57
|
+
// Model used for diagnostic live/quota probes (`check`, `report`, `best`).
|
|
58
|
+
// Deliberately distinct from DEFAULT_MODEL: GPT-5.6 is the latest general family
|
|
59
|
+
// (issue #627), so the probe leads with it, while DEFAULT_MODEL stays on 5.5 so
|
|
60
|
+
// actual request routing and the legacy `gpt-5` alias remain opt-in per 2.5.0.
|
|
61
|
+
// Bare `gpt-5.6` aliases to Sol; we pin the canonical id so the probe display
|
|
62
|
+
// and report `modelSelection` read `gpt-5.6-sol` without a remap arrow.
|
|
63
|
+
export const DEFAULT_PROBE_MODEL = "gpt-5.6-sol";
|
|
57
64
|
// Single source of truth for the live/quota probe fallback chain. Both the
|
|
58
65
|
// manager probe (lib/quota-probe.ts) and the runtime probe (lib/runtime/quota-probe.ts)
|
|
59
|
-
// import this so the ordered candidate list cannot drift between them.
|
|
66
|
+
// import this so the ordered candidate list cannot drift between them. It leads
|
|
67
|
+
// with GPT-5.6 and steps down so accounts without 5.6 entitlement still resolve
|
|
68
|
+
// a working probe model.
|
|
60
69
|
export const QUOTA_PROBE_MODEL_CHAIN = [
|
|
70
|
+
DEFAULT_PROBE_MODEL,
|
|
61
71
|
DEFAULT_MODEL,
|
|
62
72
|
"gpt-5.4",
|
|
63
73
|
"gpt-5.3-codex",
|
|
@@ -65,6 +75,33 @@ export const QUOTA_PROBE_MODEL_CHAIN = [
|
|
|
65
75
|
"gpt-5-codex",
|
|
66
76
|
];
|
|
67
77
|
const LEGACY_CODEX_MODEL = "gpt-5-codex";
|
|
78
|
+
/**
|
|
79
|
+
* GPT-5.6 tiers, per the upstream Codex catalog
|
|
80
|
+
* (openai/codex `codex-rs/models-manager/models.json`).
|
|
81
|
+
*
|
|
82
|
+
* Sol and Terra expose `ultra`; Luna stops at `max`. No tier accepts `none` or
|
|
83
|
+
* `minimal`, so those aliases are deliberately never generated for them.
|
|
84
|
+
*/
|
|
85
|
+
const GPT_5_6_SOL_MODEL = "gpt-5.6-sol";
|
|
86
|
+
const GPT_5_6_TERRA_MODEL = "gpt-5.6-terra";
|
|
87
|
+
const GPT_5_6_LUNA_MODEL = "gpt-5.6-luna";
|
|
88
|
+
/** Bare `gpt-5.6` is OpenAI's documented alias for the flagship (Sol) tier. */
|
|
89
|
+
const GPT_5_6_FLAGSHIP_ALIAS = "gpt-5.6";
|
|
90
|
+
const GPT_5_6_SOL_TERRA_EFFORTS = [
|
|
91
|
+
"low",
|
|
92
|
+
"medium",
|
|
93
|
+
"high",
|
|
94
|
+
"xhigh",
|
|
95
|
+
"max",
|
|
96
|
+
"ultra",
|
|
97
|
+
];
|
|
98
|
+
const GPT_5_6_LUNA_EFFORTS = [
|
|
99
|
+
"low",
|
|
100
|
+
"medium",
|
|
101
|
+
"high",
|
|
102
|
+
"xhigh",
|
|
103
|
+
"max",
|
|
104
|
+
];
|
|
68
105
|
const GPT_5_5_CANONICAL_MODEL = "gpt-5.5";
|
|
69
106
|
const GPT_5_5_PRO_CANONICAL_MODEL = "gpt-5.5-pro";
|
|
70
107
|
const GPT_5_5_RELEASE_MODEL = "gpt-5.5-2026-04-23";
|
|
@@ -143,6 +180,30 @@ export const MODEL_PROFILES = {
|
|
|
143
180
|
supportedReasoningEfforts: ["medium"],
|
|
144
181
|
capabilities: TOOL_CAPABILITIES.compactOnly,
|
|
145
182
|
},
|
|
183
|
+
// GPT-5.6 ships its base instructions inline in the upstream model catalog
|
|
184
|
+
// rather than as a `gpt_5_6_prompt.md`, so these stay on the GPT-5.2 prompt
|
|
185
|
+
// family alongside the other post-5.2 general models.
|
|
186
|
+
[GPT_5_6_SOL_MODEL]: {
|
|
187
|
+
normalizedModel: GPT_5_6_SOL_MODEL,
|
|
188
|
+
promptFamily: "gpt-5.2",
|
|
189
|
+
defaultReasoningEffort: "low",
|
|
190
|
+
supportedReasoningEfforts: GPT_5_6_SOL_TERRA_EFFORTS,
|
|
191
|
+
capabilities: TOOL_CAPABILITIES.full,
|
|
192
|
+
},
|
|
193
|
+
[GPT_5_6_TERRA_MODEL]: {
|
|
194
|
+
normalizedModel: GPT_5_6_TERRA_MODEL,
|
|
195
|
+
promptFamily: "gpt-5.2",
|
|
196
|
+
defaultReasoningEffort: "medium",
|
|
197
|
+
supportedReasoningEfforts: GPT_5_6_SOL_TERRA_EFFORTS,
|
|
198
|
+
capabilities: TOOL_CAPABILITIES.full,
|
|
199
|
+
},
|
|
200
|
+
[GPT_5_6_LUNA_MODEL]: {
|
|
201
|
+
normalizedModel: GPT_5_6_LUNA_MODEL,
|
|
202
|
+
promptFamily: "gpt-5.2",
|
|
203
|
+
defaultReasoningEffort: "medium",
|
|
204
|
+
supportedReasoningEfforts: GPT_5_6_LUNA_EFFORTS,
|
|
205
|
+
capabilities: TOOL_CAPABILITIES.full,
|
|
206
|
+
},
|
|
146
207
|
[GPT_5_5_CANONICAL_MODEL]: {
|
|
147
208
|
normalizedModel: GPT_5_5_CANONICAL_MODEL,
|
|
148
209
|
promptFamily: "gpt-5.2",
|
|
@@ -203,6 +264,24 @@ function addReasoningAliases(alias, normalizedModel) {
|
|
|
203
264
|
addAlias(`${alias}-${variant}`, normalizedModel);
|
|
204
265
|
}
|
|
205
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Register a model plus one alias per effort it actually supports.
|
|
269
|
+
*
|
|
270
|
+
* Unlike `addReasoningAliases`, this does not assume the global variant list:
|
|
271
|
+
* GPT-5.6 rejects `none`/`minimal` and only Sol/Terra accept `ultra`.
|
|
272
|
+
*/
|
|
273
|
+
function addEffortAliases(alias, normalizedModel, efforts) {
|
|
274
|
+
addAlias(alias, normalizedModel);
|
|
275
|
+
for (const effort of efforts) {
|
|
276
|
+
addAlias(`${alias}-${effort}`, normalizedModel);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function addGpt56Aliases() {
|
|
280
|
+
addEffortAliases(GPT_5_6_SOL_MODEL, GPT_5_6_SOL_MODEL, GPT_5_6_SOL_TERRA_EFFORTS);
|
|
281
|
+
addEffortAliases(GPT_5_6_TERRA_MODEL, GPT_5_6_TERRA_MODEL, GPT_5_6_SOL_TERRA_EFFORTS);
|
|
282
|
+
addEffortAliases(GPT_5_6_LUNA_MODEL, GPT_5_6_LUNA_MODEL, GPT_5_6_LUNA_EFFORTS);
|
|
283
|
+
addEffortAliases(GPT_5_6_FLAGSHIP_ALIAS, GPT_5_6_SOL_MODEL, GPT_5_6_SOL_TERRA_EFFORTS);
|
|
284
|
+
}
|
|
206
285
|
function addGeneralAliases() {
|
|
207
286
|
addReasoningAliases(GPT_5_5_CANONICAL_MODEL, GPT_5_5_CANONICAL_MODEL);
|
|
208
287
|
addReasoningAliases(GPT_5_5_RELEASE_MODEL, GPT_5_5_CANONICAL_MODEL);
|
|
@@ -240,6 +319,7 @@ function addCodexAliases() {
|
|
|
240
319
|
}
|
|
241
320
|
addCodexAliases();
|
|
242
321
|
addGeneralAliases();
|
|
322
|
+
addGpt56Aliases();
|
|
243
323
|
export { MODEL_MAP };
|
|
244
324
|
function stripProviderPrefix(modelId) {
|
|
245
325
|
return modelId.includes("/") ? (modelId.split("/").pop() ?? modelId) : modelId;
|
|
@@ -306,6 +386,28 @@ function resolveCodexCatalogModel(modelId) {
|
|
|
306
386
|
}
|
|
307
387
|
return undefined;
|
|
308
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* Resolve GPT-5.6 identifiers that are not exact aliases (for example a future
|
|
391
|
+
* `gpt-5.6-terra-fast`).
|
|
392
|
+
*
|
|
393
|
+
* Without this, the general GPT-5 resolver sees minor `6`, finds no catalog
|
|
394
|
+
* entry, and silently falls back to the stable 5.5 model — running a different
|
|
395
|
+
* model than the caller asked for. Unrecognised tiers resolve to Sol, matching
|
|
396
|
+
* OpenAI's bare `gpt-5.6` alias.
|
|
397
|
+
*/
|
|
398
|
+
function resolveGpt56CatalogModel(modelId) {
|
|
399
|
+
const tokens = tokenizeModelId(modelId);
|
|
400
|
+
const gptIndex = tokens.indexOf("gpt");
|
|
401
|
+
const isGpt56 = gptIndex !== -1 && tokens[gptIndex + 1] === "5" && tokens[gptIndex + 2] === "6";
|
|
402
|
+
if (!isGpt56 || tokens.includes("codex")) {
|
|
403
|
+
return undefined;
|
|
404
|
+
}
|
|
405
|
+
if (tokens.includes("terra"))
|
|
406
|
+
return GPT_5_6_TERRA_MODEL;
|
|
407
|
+
if (tokens.includes("luna"))
|
|
408
|
+
return GPT_5_6_LUNA_MODEL;
|
|
409
|
+
return GPT_5_6_SOL_MODEL;
|
|
410
|
+
}
|
|
309
411
|
function resolveGeneralGpt5CatalogModel(modelId) {
|
|
310
412
|
const tokens = tokenizeModelId(modelId);
|
|
311
413
|
const gptIndex = tokens.indexOf("gpt");
|
|
@@ -378,6 +480,10 @@ export function resolveNormalizedModel(model) {
|
|
|
378
480
|
if (codexCatalogModel) {
|
|
379
481
|
return codexCatalogModel;
|
|
380
482
|
}
|
|
483
|
+
const gpt56CatalogModel = resolveGpt56CatalogModel(modelId);
|
|
484
|
+
if (gpt56CatalogModel) {
|
|
485
|
+
return gpt56CatalogModel;
|
|
486
|
+
}
|
|
381
487
|
const generalGpt5CatalogModel = resolveGeneralGpt5CatalogModel(modelId);
|
|
382
488
|
if (generalGpt5CatalogModel) {
|
|
383
489
|
return generalGpt5CatalogModel;
|
|
@@ -405,6 +511,40 @@ export function getModelProfile(model) {
|
|
|
405
511
|
export function getModelCapabilities(model) {
|
|
406
512
|
return getModelProfile(model).capabilities;
|
|
407
513
|
}
|
|
514
|
+
// Cheapest-first ordering used to pick a quota-probe reasoning effort. `ultra`
|
|
515
|
+
// is intentionally absent: it never reaches the wire (upstream rewrites it to
|
|
516
|
+
// `max`) and would only ever be a more expensive choice than `max` anyway.
|
|
517
|
+
const PROBE_REASONING_EFFORT_PREFERENCE = [
|
|
518
|
+
"none",
|
|
519
|
+
"minimal",
|
|
520
|
+
"low",
|
|
521
|
+
"medium",
|
|
522
|
+
"high",
|
|
523
|
+
"xhigh",
|
|
524
|
+
"max",
|
|
525
|
+
];
|
|
526
|
+
/**
|
|
527
|
+
* Resolve the cheapest reasoning effort a probe model actually supports.
|
|
528
|
+
*
|
|
529
|
+
* A quota probe only needs the response's quota headers, so it wants the
|
|
530
|
+
* lowest-cost effort. Rather than hardcoding `none`, it sends the cheapest
|
|
531
|
+
* effort the probe model actually declares support for, mirroring how
|
|
532
|
+
* `getReasoningConfig` coerces a real request: the GPT-5.6 tiers and the codex
|
|
533
|
+
* models do not list `none`/`minimal` in the upstream catalog, so the probe
|
|
534
|
+
* sends `low` for them and `none` for the pre-5.6 general models that do
|
|
535
|
+
* (issue #627). Keeps the probe's effort consistent with normal routing and
|
|
536
|
+
* within each model's declared range. Never returns `ultra`.
|
|
537
|
+
*/
|
|
538
|
+
export function resolveProbeReasoningEffort(model) {
|
|
539
|
+
const profile = getModelProfile(model);
|
|
540
|
+
for (const effort of PROBE_REASONING_EFFORT_PREFERENCE) {
|
|
541
|
+
if (profile.supportedReasoningEfforts.includes(effort)) {
|
|
542
|
+
return effort;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
const fallback = profile.defaultReasoningEffort;
|
|
546
|
+
return fallback === "ultra" ? "max" : fallback;
|
|
547
|
+
}
|
|
408
548
|
/**
|
|
409
549
|
* Check if a model ID is in the explicit model map.
|
|
410
550
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-transformer.d.ts","sourceRoot":"","sources":["../../../lib/request/request-transformer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-transformer.d.ts","sourceRoot":"","sources":["../../../lib/request/request-transformer.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACX,aAAa,EACb,SAAS,EACT,eAAe,EACf,WAAW,EAEX,UAAU,EACV,MAAM,aAAa,CAAC;AAGrB,KAAK,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAO/C,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,WAAW,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC;AAID,OAAO,EACN,kBAAkB,EAClB,uCAAuC,GACvC,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAEhE;AAkBD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,GAAE,UAAuC,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OAAO,GACf,SAAS,EAAE,GAAG,SAAS,CAezB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAC9B,QAAQ,EAAE,OAAO,GACf,SAAS,EAAE,GAAG,SAAS,CAezB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,0BAA0B,GAChC,OAAO,CAAC,WAAW,CAAC,CAAC;AACxB,wBAAsB,oBAAoB,CACzC,IAAI,EAAE,WAAW,EACjB,iBAAiB,EAAE,MAAM,EACzB,UAAU,CAAC,EAAE,UAAU,EACvB,SAAS,CAAC,EAAE,OAAO,EACnB,WAAW,CAAC,EAAE,OAAO,EACrB,mBAAmB,CAAC,EAAE,mBAAmB,EACzC,wBAAwB,CAAC,EAAE,MAAM,EACjC,6BAA6B,CAAC,EAAE,OAAO,EACvC,wBAAwB,CAAC,EAAE,OAAO,GAChC,OAAO,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { logDebug, logWarn } from "../logger.js";
|
|
|
2
2
|
import { TOOL_REMAP_MESSAGE } from "../prompts/codex.js";
|
|
3
3
|
import { CODEX_HOST_BRIDGE } from "../prompts/codex-host-bridge.js";
|
|
4
4
|
import { getHostCodexPrompt } from "../prompts/host-codex-prompt.js";
|
|
5
|
+
import { REASONING_EFFORTS, } from "../constants.js";
|
|
5
6
|
import { getModelCapabilities, getModelProfile, resolveNormalizedModel, } from "./helpers/model-map.js";
|
|
6
7
|
import { filterHostSystemPromptsWithCachedPrompt, normalizeOrphanedToolOutputs, injectMissingToolOutputs, } from "./helpers/input-utils.js";
|
|
7
8
|
import { cleanupToolDefinitions } from "./helpers/tool-utils.js";
|
|
@@ -19,6 +20,18 @@ export { isHostSystemPrompt, filterHostSystemPromptsWithCachedPrompt, } from "./
|
|
|
19
20
|
export function normalizeModel(model) {
|
|
20
21
|
return resolveNormalizedModel(model);
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Matches a trailing reasoning-effort suffix on a model id.
|
|
25
|
+
*
|
|
26
|
+
* The alternation is derived from `REASONING_EFFORTS` so a new tier cannot be
|
|
27
|
+
* added to the union and silently forgotten here.
|
|
28
|
+
*
|
|
29
|
+
* `max` is split into its own alternative because it needs a lookbehind:
|
|
30
|
+
* `gpt-5.1-codex-max` is a model id that ends in `-max`, not Codex at `max`
|
|
31
|
+
* effort, and stripping it would reroute the request. The guard cannot wrap the
|
|
32
|
+
* whole group -- `gpt-5-codex-low` must still parse `low`.
|
|
33
|
+
*/
|
|
34
|
+
const VARIANT_SUFFIX_PATTERN = new RegExp(`(?:-(${REASONING_EFFORTS.filter((effort) => effort !== "max").join("|")})|(?<!codex)-(max))$`, "i");
|
|
22
35
|
/**
|
|
23
36
|
* Extract configuration for a specific model
|
|
24
37
|
* Merges global options with model-specific options (model-specific takes precedence)
|
|
@@ -32,21 +45,13 @@ export function getModelConfig(modelName, userConfig = { global: {}, models: {}
|
|
|
32
45
|
const stripProviderPrefix = (name) => name.includes("/") ? (name.split("/").pop() ?? name) : name;
|
|
33
46
|
const getVariantFromModelName = (name) => {
|
|
34
47
|
const stripped = stripProviderPrefix(name).toLowerCase();
|
|
35
|
-
const match = stripped.match(
|
|
48
|
+
const match = stripped.match(VARIANT_SUFFIX_PATTERN);
|
|
36
49
|
if (!match)
|
|
37
50
|
return undefined;
|
|
38
|
-
const variant = match[1];
|
|
39
|
-
|
|
40
|
-
variant === "minimal" ||
|
|
41
|
-
variant === "low" ||
|
|
42
|
-
variant === "medium" ||
|
|
43
|
-
variant === "high" ||
|
|
44
|
-
variant === "xhigh") {
|
|
45
|
-
return variant;
|
|
46
|
-
}
|
|
47
|
-
return undefined;
|
|
51
|
+
const variant = match[1] ?? match[2];
|
|
52
|
+
return REASONING_EFFORTS.find((effort) => effort === variant);
|
|
48
53
|
};
|
|
49
|
-
const removeVariantSuffix = (name) => stripProviderPrefix(name).replace(
|
|
54
|
+
const removeVariantSuffix = (name) => stripProviderPrefix(name).replace(VARIANT_SUFFIX_PATTERN, "");
|
|
50
55
|
const findModelEntry = (candidates) => {
|
|
51
56
|
for (const key of candidates) {
|
|
52
57
|
const entry = modelMap[key];
|
|
@@ -324,7 +329,11 @@ export function getReasoningConfig(modelName, userConfig = {}) {
|
|
|
324
329
|
const profile = getModelProfile(modelName);
|
|
325
330
|
const defaultEffort = profile.defaultReasoningEffort;
|
|
326
331
|
const requestedEffort = userConfig.reasoningEffort ?? defaultEffort;
|
|
327
|
-
const
|
|
332
|
+
const coercedEffort = coerceReasoningEffort(profile.normalizedModel, requestedEffort, profile.supportedReasoningEfforts, defaultEffort);
|
|
333
|
+
// `ultra` is a client-side tier: upstream Codex rewrites Ultra -> Max in
|
|
334
|
+
// `reasoning_effort_for_request` before the request leaves the client, so the
|
|
335
|
+
// API never sees it. Mirror that here rather than sending a value it rejects.
|
|
336
|
+
const effort = coercedEffort === "ultra" ? "max" : coercedEffort;
|
|
328
337
|
const summary = sanitizeReasoningSummary(userConfig.reasoningSummary);
|
|
329
338
|
return {
|
|
330
339
|
effort,
|
|
@@ -338,6 +347,10 @@ const REASONING_FALLBACKS = {
|
|
|
338
347
|
medium: ["medium", "low", "high", "minimal", "none", "xhigh"],
|
|
339
348
|
high: ["high", "medium", "xhigh", "low", "minimal", "none"],
|
|
340
349
|
xhigh: ["xhigh", "high", "medium", "low", "minimal", "none"],
|
|
350
|
+
// `max` and `ultra` only exist on GPT-5.6. Step down one rung at a time so a
|
|
351
|
+
// request against a pre-5.6 model lands on that model's strongest tier.
|
|
352
|
+
max: ["max", "xhigh", "high", "medium", "low", "minimal", "none"],
|
|
353
|
+
ultra: ["ultra", "max", "xhigh", "high", "medium", "low", "minimal", "none"],
|
|
341
354
|
};
|
|
342
355
|
function coerceReasoningEffort(modelName, effort, supportedEfforts, defaultEffort) {
|
|
343
356
|
if (supportedEfforts.includes(effort)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-probe.d.ts","sourceRoot":"","sources":["../../../lib/runtime/quota-probe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"quota-probe.d.ts","sourceRoot":"","sources":["../../../lib/runtime/quota-probe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAQnE,wBAAsB,8BAA8B,CAAC,MAAM,EAAE;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,KAAK,CAAC;IACxB,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,kBAAkB,EAAE,CACnB,IAAI,EAAE,WAAW,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KACnB,OAAO,CAAC;IACb,uBAAuB,EAAE,CACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,KACV,wBAAwB,GAAG,IAAI,CAAC;IACrC,4BAA4B,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK;QACrD,aAAa,EAAE,OAAO,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACF,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA8F9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QUOTA_PROBE_MODEL_CHAIN } from "../request/helpers/model-map.js";
|
|
1
|
+
import { QUOTA_PROBE_MODEL_CHAIN, resolveProbeReasoningEffort, } from "../request/helpers/model-map.js";
|
|
2
2
|
const QUOTA_PROBE_MODELS = QUOTA_PROBE_MODEL_CHAIN;
|
|
3
3
|
export async function fetchRuntimeCodexQuotaSnapshot(params) {
|
|
4
4
|
let lastError = null;
|
|
@@ -18,7 +18,10 @@ export async function fetchRuntimeCodexQuotaSnapshot(params) {
|
|
|
18
18
|
content: [{ type: "input_text", text: "quota ping" }],
|
|
19
19
|
},
|
|
20
20
|
],
|
|
21
|
-
|
|
21
|
+
// Send the cheapest effort each probe model actually declares (the
|
|
22
|
+
// GPT-5.6 tiers and codex models do not list `none`), keeping the
|
|
23
|
+
// probe consistent with normal request routing (issue #627).
|
|
24
|
+
reasoning: { effort: resolveProbeReasoningEffort(model), summary: "auto" },
|
|
22
25
|
text: { verbosity: "low" },
|
|
23
26
|
};
|
|
24
27
|
const headers = params.createCodexHeaders(undefined, params.accountId, params.accessToken, { model });
|