@prestyj/core 5.4.1 → 5.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/dist/{chunk-SCELSYVH.js → chunk-VESJPVGY.js} +6 -6
- package/dist/{chunk-SCELSYVH.js.map → chunk-VESJPVGY.js.map} +1 -1
- package/dist/index.cjs +32 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -23
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +5 -5
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1546,9 +1546,9 @@ var MODELS = [
|
|
|
1546
1546
|
// apply_patch, text+image web search, and parallel tool calls.
|
|
1547
1547
|
{
|
|
1548
1548
|
// Sol — "Latest frontier agentic coding model." (priority 1, default low).
|
|
1549
|
-
// Reasoning ladder: low → medium → high → xhigh → max → ultra.
|
|
1550
|
-
//
|
|
1551
|
-
//
|
|
1549
|
+
// Reasoning ladder: low → medium → high → xhigh → max → ultra. Ultra is a
|
|
1550
|
+
// Codex orchestration preset: the request uses max effort while the local
|
|
1551
|
+
// runtime proactively delegates suitable independent work to subagents.
|
|
1552
1552
|
id: "gpt-5.6-sol",
|
|
1553
1553
|
name: "GPT-5.6 Sol",
|
|
1554
1554
|
provider: "openai",
|
|
@@ -1558,7 +1558,7 @@ var MODELS = [
|
|
|
1558
1558
|
supportsImages: true,
|
|
1559
1559
|
supportsVideo: false,
|
|
1560
1560
|
costTier: "high",
|
|
1561
|
-
maxThinkingLevel: "
|
|
1561
|
+
maxThinkingLevel: "ultra"
|
|
1562
1562
|
},
|
|
1563
1563
|
{
|
|
1564
1564
|
// Terra — "Balanced agentic coding model for everyday work." (priority 2,
|
|
@@ -1572,7 +1572,7 @@ var MODELS = [
|
|
|
1572
1572
|
supportsImages: true,
|
|
1573
1573
|
supportsVideo: false,
|
|
1574
1574
|
costTier: "medium",
|
|
1575
|
-
maxThinkingLevel: "
|
|
1575
|
+
maxThinkingLevel: "ultra"
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
1578
1578
|
// Luna — "Fast and affordable agentic coding model." (priority 3, default
|
|
@@ -1913,7 +1913,8 @@ var OPENAI_GPT_56_THINKING_LEVELS = [
|
|
|
1913
1913
|
"medium",
|
|
1914
1914
|
"high",
|
|
1915
1915
|
"xhigh",
|
|
1916
|
-
"max"
|
|
1916
|
+
"max",
|
|
1917
|
+
"ultra"
|
|
1917
1918
|
];
|
|
1918
1919
|
var SAKANA_THINKING_LEVELS = ["high", "xhigh"];
|
|
1919
1920
|
var ANTHROPIC_OPUS_48_47_THINKING_LEVELS = [
|
|
@@ -2012,6 +2013,23 @@ function currentWindowLabel(seconds, fallbackHours) {
|
|
|
2012
2013
|
const hours = Math.max(1, Math.round((duration ?? fallbackHours * 3600) / 3600));
|
|
2013
2014
|
return `${hours}-hour`;
|
|
2014
2015
|
}
|
|
2016
|
+
function codexWindowKind(window, fallback) {
|
|
2017
|
+
const duration = finiteNumber(window.limit_window_seconds);
|
|
2018
|
+
if (duration === void 0) return fallback;
|
|
2019
|
+
return duration >= 6 * 24 * 60 * 60 ? "weekly" : "current";
|
|
2020
|
+
}
|
|
2021
|
+
function normalizedCodexWindow(window, fallbackKind, now) {
|
|
2022
|
+
if (!window) return null;
|
|
2023
|
+
const usedPercent = clampPercent(window.used_percent);
|
|
2024
|
+
if (usedPercent === void 0) return null;
|
|
2025
|
+
const kind = codexWindowKind(window, fallbackKind);
|
|
2026
|
+
return {
|
|
2027
|
+
kind,
|
|
2028
|
+
label: kind === "weekly" ? "Weekly" : currentWindowLabel(window.limit_window_seconds, 5),
|
|
2029
|
+
usedPercent,
|
|
2030
|
+
resetsAt: codexResetAt(window, now)
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2015
2033
|
async function readUsageResponse(response) {
|
|
2016
2034
|
const text = await response.text();
|
|
2017
2035
|
if (!response.ok) {
|
|
@@ -2075,27 +2093,14 @@ async function fetchCodexUsage(credentials, fetchFn, signal, now) {
|
|
|
2075
2093
|
if (credentials.accountId) headers["ChatGPT-Account-Id"] = credentials.accountId;
|
|
2076
2094
|
const response = await fetchFn(CODEX_USAGE_URL, { method: "GET", signal, headers });
|
|
2077
2095
|
const data = await readUsageResponse(response);
|
|
2078
|
-
const windows = [
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
resetsAt: codexResetAt(current, now())
|
|
2087
|
-
});
|
|
2088
|
-
}
|
|
2089
|
-
const weekly = data.rate_limit?.secondary_window;
|
|
2090
|
-
const weeklyPercent = clampPercent(weekly?.used_percent);
|
|
2091
|
-
if (weekly && weeklyPercent !== void 0) {
|
|
2092
|
-
windows.push({
|
|
2093
|
-
kind: "weekly",
|
|
2094
|
-
label: "Weekly",
|
|
2095
|
-
usedPercent: weeklyPercent,
|
|
2096
|
-
resetsAt: codexResetAt(weekly, now())
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2096
|
+
const windows = [
|
|
2097
|
+
normalizedCodexWindow(data.rate_limit?.primary_window, "current", now()),
|
|
2098
|
+
normalizedCodexWindow(data.rate_limit?.secondary_window, "weekly", now())
|
|
2099
|
+
].filter((window) => window !== null);
|
|
2100
|
+
windows.sort((left, right) => {
|
|
2101
|
+
if (left.kind === right.kind) return 0;
|
|
2102
|
+
return left.kind === "current" ? -1 : 1;
|
|
2103
|
+
});
|
|
2099
2104
|
return {
|
|
2100
2105
|
provider: "openai",
|
|
2101
2106
|
displayName: "Codex",
|