@prestyj/core 5.27.0 → 5.28.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-CUQX2YIH.js → chunk-ZCXAIMZF.js} +69 -31
- package/dist/chunk-ZCXAIMZF.js.map +1 -0
- package/dist/index.cjs +71 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +61 -29
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.d.cts +2 -2
- package/dist/model-registry.d.ts +2 -2
- package/dist/model-registry.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-CUQX2YIH.js.map +0 -1
|
@@ -1843,7 +1843,14 @@ var AuthStorage = class {
|
|
|
1843
1843
|
if (opts?.storageKeys && !(opts.storageKeys.length === 1 && opts.storageKeys[0] === provider)) {
|
|
1844
1844
|
for (const key of opts.storageKeys) {
|
|
1845
1845
|
const creds2 = this.data[key];
|
|
1846
|
-
if (creds2)
|
|
1846
|
+
if (!creds2) continue;
|
|
1847
|
+
if (key !== provider && dualAuthProviderByOAuthKey(key)) {
|
|
1848
|
+
return await this.resolveCredentials(key, {
|
|
1849
|
+
...opts.forceRefresh ? { forceRefresh: true } : {},
|
|
1850
|
+
...opts.rejectedToken !== void 0 ? { rejectedToken: opts.rejectedToken } : {}
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
return creds2;
|
|
1847
1854
|
}
|
|
1848
1855
|
throw new NotLoggedInError(provider);
|
|
1849
1856
|
}
|
|
@@ -2064,8 +2071,10 @@ var MODELS = [
|
|
|
2064
2071
|
maxThinkingLevel: "max"
|
|
2065
2072
|
},
|
|
2066
2073
|
{
|
|
2067
|
-
|
|
2068
|
-
|
|
2074
|
+
// Released 2026-09-28 — replaces Sonnet 5 at $2/$10 MTok, with the same
|
|
2075
|
+
// 1M context / 128K output and adaptive thinking, now including xhigh.
|
|
2076
|
+
id: "claude-sonnet-5-5",
|
|
2077
|
+
name: "Claude Sonnet 5.5",
|
|
2069
2078
|
provider: "anthropic",
|
|
2070
2079
|
contextWindow: 1e6,
|
|
2071
2080
|
maxOutputTokens: 128e3,
|
|
@@ -2155,10 +2164,12 @@ var MODELS = [
|
|
|
2155
2164
|
},
|
|
2156
2165
|
// ── Sakana (Fugu) ──────────────────────────────────────
|
|
2157
2166
|
// Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
|
|
2158
|
-
// OpenAI-compatible Sakana API (https://api.sakana.ai/v1).
|
|
2159
|
-
// text + image input
|
|
2160
|
-
// `fugu`
|
|
2161
|
-
//
|
|
2167
|
+
// OpenAI-compatible Sakana API (https://api.sakana.ai/v1). All three take
|
|
2168
|
+
// text + image input (verified against the live /models list, 2026-09-28).
|
|
2169
|
+
// `fugu` balances latency and quality; `fugu-max` (v1.0, 2026-09-11) is the
|
|
2170
|
+
// cost tier over the largest open-weight pool ($2/$6 per 1M); `fugu-ultra`
|
|
2171
|
+
// is the heavier quality tier (may need larger client timeouts). Plain Fugu
|
|
2172
|
+
// and Fugu Max stop at xhigh — Sakana documents max as the same effort there.
|
|
2162
2173
|
{
|
|
2163
2174
|
id: "fugu",
|
|
2164
2175
|
name: "Fugu",
|
|
@@ -2171,6 +2182,18 @@ var MODELS = [
|
|
|
2171
2182
|
costTier: "medium",
|
|
2172
2183
|
maxThinkingLevel: "xhigh"
|
|
2173
2184
|
},
|
|
2185
|
+
{
|
|
2186
|
+
id: "fugu-max",
|
|
2187
|
+
name: "Fugu Max",
|
|
2188
|
+
provider: "sakana",
|
|
2189
|
+
contextWindow: 1e6,
|
|
2190
|
+
maxOutputTokens: 128e3,
|
|
2191
|
+
supportsThinking: true,
|
|
2192
|
+
supportsImages: true,
|
|
2193
|
+
supportsVideo: false,
|
|
2194
|
+
costTier: "medium",
|
|
2195
|
+
maxThinkingLevel: "xhigh"
|
|
2196
|
+
},
|
|
2174
2197
|
{
|
|
2175
2198
|
id: "fugu-ultra",
|
|
2176
2199
|
name: "Fugu Ultra",
|
|
@@ -2181,7 +2204,7 @@ var MODELS = [
|
|
|
2181
2204
|
supportsImages: true,
|
|
2182
2205
|
supportsVideo: false,
|
|
2183
2206
|
costTier: "high",
|
|
2184
|
-
// The rolling alias now serves
|
|
2207
|
+
// The rolling alias now serves v2.0 (2026-09-11), which keeps max effort.
|
|
2185
2208
|
maxThinkingLevel: "max"
|
|
2186
2209
|
},
|
|
2187
2210
|
// ── xAI (Grok) ─────────────────────────────────────────
|
|
@@ -2325,7 +2348,27 @@ var MODELS = [
|
|
|
2325
2348
|
costTier: "high",
|
|
2326
2349
|
maxThinkingLevel: "max"
|
|
2327
2350
|
},
|
|
2328
|
-
//
|
|
2351
|
+
// K2.8 Preview (2026-09-11) is served only on the Kimi For Coding OAuth
|
|
2352
|
+
// endpoint, under its rolling `kimi-for-coding` id (live /models, 2026-09-28:
|
|
2353
|
+
// display_name "K2.8 Preview", 1M context, image + video input, efforts
|
|
2354
|
+
// low/high/max default max). The public API-key endpoint does not serve it,
|
|
2355
|
+
// so it resolves from the Kimi sign-in credential only.
|
|
2356
|
+
{
|
|
2357
|
+
id: "kimi-for-coding",
|
|
2358
|
+
name: "Kimi K2.8 Preview",
|
|
2359
|
+
provider: "moonshot",
|
|
2360
|
+
contextWindow: 1048576,
|
|
2361
|
+
maxOutputTokens: 131072,
|
|
2362
|
+
supportsThinking: true,
|
|
2363
|
+
supportsImages: true,
|
|
2364
|
+
supportsVideo: true,
|
|
2365
|
+
maxVideoBytes: 100 * 1024 * 1024,
|
|
2366
|
+
costTier: "medium",
|
|
2367
|
+
maxThinkingLevel: "max",
|
|
2368
|
+
authStorageKeys: [MOONSHOT_OAUTH_KEY]
|
|
2369
|
+
},
|
|
2370
|
+
// K2.7 Code is requested by its pinned id (not the `kimi-for-coding` alias
|
|
2371
|
+
// that moved to K2.8), so it stays the real K2.7 on both endpoints.
|
|
2329
2372
|
{
|
|
2330
2373
|
id: "kimi-k2.7-code",
|
|
2331
2374
|
name: "Kimi K2.7 Code",
|
|
@@ -2472,10 +2515,14 @@ var MODELS = [
|
|
|
2472
2515
|
authStorageKeys: [XIAOMI_CREDITS_KEY]
|
|
2473
2516
|
},
|
|
2474
2517
|
// ── DeepSeek ───────────────────────────────────────────
|
|
2518
|
+
// The live /models list (2026-09-28) serves exactly `deepseek-flash` and
|
|
2519
|
+
// `deepseek-v4-pro`. V4 Flash and V4 Flash Vision Exp are retired; their old
|
|
2520
|
+
// ids only temporarily route to V4.1 Flash, so they are retired here too.
|
|
2475
2521
|
{
|
|
2476
2522
|
// `deepseek-v4-pro` now serves DeepSeek-V4-Pro-0813 (released 2026-08-13,
|
|
2477
2523
|
// first STABLE V4 Pro — supersedes the April preview; calling name
|
|
2478
2524
|
// unchanged, same 1.6T/49B MoE). 1M context, text-only, low/high/max effort.
|
|
2525
|
+
// DeepSeek reversed its planned 2026-09-14 retirement, so it stays served.
|
|
2479
2526
|
// Docs abbreviate output as 384K; use the same conservative 384,000-token
|
|
2480
2527
|
// application cap across V4 models rather than mixing decimal/binary units.
|
|
2481
2528
|
id: "deepseek-v4-pro",
|
|
@@ -2490,21 +2537,10 @@ var MODELS = [
|
|
|
2490
2537
|
maxThinkingLevel: "max"
|
|
2491
2538
|
},
|
|
2492
2539
|
{
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
maxOutputTokens: 384e3,
|
|
2498
|
-
supportsThinking: true,
|
|
2499
|
-
supportsImages: false,
|
|
2500
|
-
supportsVideo: false,
|
|
2501
|
-
costTier: "low",
|
|
2502
|
-
maxThinkingLevel: "max"
|
|
2503
|
-
},
|
|
2504
|
-
// Opt-in experimental vision sibling; never replaces the stable summary model.
|
|
2505
|
-
{
|
|
2506
|
-
id: "deepseek-v4-flash-vision-exp",
|
|
2507
|
-
name: "DeepSeek V4 Flash Vision (Experimental)",
|
|
2540
|
+
// `deepseek-flash` is the rolling alias for the latest Flash — currently
|
|
2541
|
+
// V4.1 Flash (2026-09-10): native image input, 1M context, 384K output.
|
|
2542
|
+
id: "deepseek-flash",
|
|
2543
|
+
name: "DeepSeek V4.1 Flash",
|
|
2508
2544
|
provider: "deepseek",
|
|
2509
2545
|
contextWindow: 1048576,
|
|
2510
2546
|
maxOutputTokens: 384e3,
|
|
@@ -2516,11 +2552,13 @@ var MODELS = [
|
|
|
2516
2552
|
},
|
|
2517
2553
|
// ── OpenRouter ─────────────────────────────────────────
|
|
2518
2554
|
{
|
|
2519
|
-
|
|
2520
|
-
|
|
2555
|
+
// Qwen3.8 Max — Alibaba's flagship (live /endpoints, 2026-09-28): 1M
|
|
2556
|
+
// context, 131,072 output, text + image + video input, reasoning on.
|
|
2557
|
+
id: "qwen/qwen3.8-max",
|
|
2558
|
+
name: "Qwen3.8 Max",
|
|
2521
2559
|
provider: "openrouter",
|
|
2522
2560
|
contextWindow: 1e6,
|
|
2523
|
-
maxOutputTokens:
|
|
2561
|
+
maxOutputTokens: 131072,
|
|
2524
2562
|
supportsThinking: true,
|
|
2525
2563
|
supportsImages: true,
|
|
2526
2564
|
supportsVideo: true,
|
|
@@ -2614,13 +2652,13 @@ function getDefaultModel(provider) {
|
|
|
2614
2652
|
if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
|
|
2615
2653
|
if (provider === "huggingface")
|
|
2616
2654
|
return MODELS.find((m) => m.id === "Qwen/Qwen3-Coder-480B-A35B-Instruct");
|
|
2617
|
-
if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.
|
|
2655
|
+
if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.8-max");
|
|
2618
2656
|
if (provider === "sakana") return MODELS.find((m) => m.id === "fugu");
|
|
2619
2657
|
if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.7");
|
|
2620
2658
|
if (provider === "local") {
|
|
2621
2659
|
return getModelsForProvider("local")[0] ?? PLACEHOLDER_LOCAL_MODEL;
|
|
2622
2660
|
}
|
|
2623
|
-
return MODELS.find((m) => m.id === "claude-sonnet-5");
|
|
2661
|
+
return MODELS.find((m) => m.id === "claude-sonnet-5-5");
|
|
2624
2662
|
}
|
|
2625
2663
|
var PLACEHOLDER_LOCAL_MODEL = {
|
|
2626
2664
|
id: "local/none/none",
|
|
@@ -2658,7 +2696,7 @@ function getDefaultThinkingLevel(modelId, options) {
|
|
|
2658
2696
|
}
|
|
2659
2697
|
function getSummaryModel(provider, currentModelId) {
|
|
2660
2698
|
if (provider === "anthropic") {
|
|
2661
|
-
return MODELS.find((m) => m.id === "claude-sonnet-5");
|
|
2699
|
+
return MODELS.find((m) => m.id === "claude-sonnet-5-5");
|
|
2662
2700
|
}
|
|
2663
2701
|
if (provider === "openai" || provider === "glm" || provider === "deepseek" || provider === "huggingface") {
|
|
2664
2702
|
const low = getModelsForProvider(provider).find((m) => m.costTier === "low");
|
|
@@ -2730,4 +2768,4 @@ export {
|
|
|
2730
2768
|
getSummaryModel,
|
|
2731
2769
|
getFastModel
|
|
2732
2770
|
};
|
|
2733
|
-
//# sourceMappingURL=chunk-
|
|
2771
|
+
//# sourceMappingURL=chunk-ZCXAIMZF.js.map
|