@prestyj/core 5.27.0 → 5.28.1

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.
@@ -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) return 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
- id: "claude-sonnet-5",
2068
- name: "Claude Sonnet 5",
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,
@@ -2090,7 +2099,7 @@ var MODELS = [
2090
2099
  // ── OpenAI (Codex) ─────────────────────────────────────
2091
2100
  {
2092
2101
  // GPT-6 Astra — "Our most capable model for complex, demanding work."
2093
- // (Codex catalog priority 1, listed for every ChatGPT plan, requires a
2102
+ // (Codex catalog priority 2, listed for every ChatGPT plan, requires a
2094
2103
  // Codex client >= 0.153.0 — see CODEX_CLIENT_VERSION). Same split as 5.6:
2095
2104
  // 1.05M on the public Responses API, 272K on the ChatGPT OAuth route
2096
2105
  // (openai/codex models.json, `gpt-6-astra`). Reasoning ladder low → medium
@@ -2114,32 +2123,36 @@ var MODELS = [
2114
2123
  },
2115
2124
  // GPT-6 Sol + Luna — released 2026-09-22 below Astra, replacing the whole
2116
2125
  // GPT-5.6 family (Sol/Terra/Luna; there is no GPT-6 Terra — OpenAI's Codex
2117
- // catalog upgrades 5.6 Terra to 6 Sol). Both need a Codex client >= 0.155.0
2118
- // on the ChatGPT OAuth route. Same window split as Astra: 1.05M on the public
2119
- // Responses API, 272K on the Codex route; 128K output, text+image input,
2120
- // freeform apply_patch, responses-lite transport. The 5.6 ids are retired —
2121
- // a saved session on one falls back to the provider default on next start.
2126
+ // catalog upgrades 5.6 Terra to 6 Sol). GPT-6.1 Sol (2026-09-29) then replaced
2127
+ // GPT-6 Sol. Same window split as Astra: 1.05M on the public Responses API,
2128
+ // 272K on the Codex route; 128K output, text+image input, freeform
2129
+ // apply_patch, responses-lite transport. The GPT-5.6 ids and `gpt-6-sol` are
2130
+ // retired — a saved session on one falls back to the provider default on
2131
+ // next start.
2122
2132
  {
2123
- // Sol — "Workhorse model for coding and everyday work." (Codex priority 2,
2124
- // default medium). $2/$10 MTok. Ladder low → medium → high → xhigh → max →
2125
- // ultra; ultra is the Codex orchestration preset (max effort on the wire +
2126
- // proactive local subagent delegation).
2127
- id: "gpt-6-sol",
2128
- name: "GPT-6 Sol",
2133
+ // GPT-6.1 Sol — "Latest workhorse model for coding and everyday work."
2134
+ // (Codex priority 1, default low). The catalog says Codex client >= 0.153.0,
2135
+ // but the ChatGPT backend only serves it from 0.159.0 (see
2136
+ // CODEX_CLIENT_VERSION). $2/$10 MTok, cached input $0.10. Ladder low →
2137
+ // medium → high → xhigh → max → ultra; ultra is the Codex orchestration
2138
+ // preset (max effort on the wire + proactive local subagent delegation).
2139
+ id: "gpt-6.1-sol",
2140
+ name: "GPT-6.1 Sol",
2129
2141
  provider: "openai",
2130
2142
  contextWindow: 105e4,
2131
2143
  codexContextWindow: 272e3,
2132
2144
  maxOutputTokens: 128e3,
2133
2145
  supportsThinking: true,
2134
- defaultThinkingLevel: "medium",
2146
+ defaultThinkingLevel: "low",
2135
2147
  supportsImages: true,
2136
2148
  supportsVideo: false,
2137
2149
  costTier: "medium",
2138
2150
  maxThinkingLevel: "ultra"
2139
2151
  },
2140
2152
  {
2141
- // Luna — "Fast and affordable model for easier tasks." (Codex priority 3,
2142
- // default medium). $0.10/$0.50 MTok. Reasoning tops out at `max`.
2153
+ // Luna — "Fast and affordable model for easier tasks." (Codex priority 4,
2154
+ // default medium, needs a Codex client >= 0.155.0). $0.10/$0.50 MTok.
2155
+ // Reasoning tops out at `max`.
2143
2156
  id: "gpt-6-luna",
2144
2157
  name: "GPT-6 Luna",
2145
2158
  provider: "openai",
@@ -2155,10 +2168,12 @@ var MODELS = [
2155
2168
  },
2156
2169
  // ── Sakana (Fugu) ──────────────────────────────────────
2157
2170
  // Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
2158
- // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). Both models take
2159
- // text + image input. Plain Fugu stops at xhigh; Ultra v1.1 also supports max.
2160
- // `fugu` routes across all providers; `fugu-ultra` is
2161
- // the heavier tier (may need larger client timeouts on complex tasks).
2171
+ // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). All three take
2172
+ // text + image input (verified against the live /models list, 2026-09-28).
2173
+ // `fugu` balances latency and quality; `fugu-max` (v1.0, 2026-09-11) is the
2174
+ // cost tier over the largest open-weight pool ($2/$6 per 1M); `fugu-ultra`
2175
+ // is the heavier quality tier (may need larger client timeouts). Plain Fugu
2176
+ // and Fugu Max stop at xhigh — Sakana documents max as the same effort there.
2162
2177
  {
2163
2178
  id: "fugu",
2164
2179
  name: "Fugu",
@@ -2171,6 +2186,18 @@ var MODELS = [
2171
2186
  costTier: "medium",
2172
2187
  maxThinkingLevel: "xhigh"
2173
2188
  },
2189
+ {
2190
+ id: "fugu-max",
2191
+ name: "Fugu Max",
2192
+ provider: "sakana",
2193
+ contextWindow: 1e6,
2194
+ maxOutputTokens: 128e3,
2195
+ supportsThinking: true,
2196
+ supportsImages: true,
2197
+ supportsVideo: false,
2198
+ costTier: "medium",
2199
+ maxThinkingLevel: "xhigh"
2200
+ },
2174
2201
  {
2175
2202
  id: "fugu-ultra",
2176
2203
  name: "Fugu Ultra",
@@ -2181,7 +2208,7 @@ var MODELS = [
2181
2208
  supportsImages: true,
2182
2209
  supportsVideo: false,
2183
2210
  costTier: "high",
2184
- // The rolling alias now serves v1.1, which adds a distinct max effort.
2211
+ // The rolling alias now serves v2.0 (2026-09-11), which keeps max effort.
2185
2212
  maxThinkingLevel: "max"
2186
2213
  },
2187
2214
  // ── xAI (Grok) ─────────────────────────────────────────
@@ -2325,7 +2352,27 @@ var MODELS = [
2325
2352
  costTier: "high",
2326
2353
  maxThinkingLevel: "max"
2327
2354
  },
2328
- // Retain the cheaper dedicated coding model as an explicit alternative.
2355
+ // K2.8 Preview (2026-09-11) is served only on the Kimi For Coding OAuth
2356
+ // endpoint, under its rolling `kimi-for-coding` id (live /models, 2026-09-28:
2357
+ // display_name "K2.8 Preview", 1M context, image + video input, efforts
2358
+ // low/high/max default max). The public API-key endpoint does not serve it,
2359
+ // so it resolves from the Kimi sign-in credential only.
2360
+ {
2361
+ id: "kimi-for-coding",
2362
+ name: "Kimi K2.8 Preview",
2363
+ provider: "moonshot",
2364
+ contextWindow: 1048576,
2365
+ maxOutputTokens: 131072,
2366
+ supportsThinking: true,
2367
+ supportsImages: true,
2368
+ supportsVideo: true,
2369
+ maxVideoBytes: 100 * 1024 * 1024,
2370
+ costTier: "medium",
2371
+ maxThinkingLevel: "max",
2372
+ authStorageKeys: [MOONSHOT_OAUTH_KEY]
2373
+ },
2374
+ // K2.7 Code is requested by its pinned id (not the `kimi-for-coding` alias
2375
+ // that moved to K2.8), so it stays the real K2.7 on both endpoints.
2329
2376
  {
2330
2377
  id: "kimi-k2.7-code",
2331
2378
  name: "Kimi K2.7 Code",
@@ -2472,10 +2519,14 @@ var MODELS = [
2472
2519
  authStorageKeys: [XIAOMI_CREDITS_KEY]
2473
2520
  },
2474
2521
  // ── DeepSeek ───────────────────────────────────────────
2522
+ // The live /models list (2026-09-28) serves exactly `deepseek-flash` and
2523
+ // `deepseek-v4-pro`. V4 Flash and V4 Flash Vision Exp are retired; their old
2524
+ // ids only temporarily route to V4.1 Flash, so they are retired here too.
2475
2525
  {
2476
2526
  // `deepseek-v4-pro` now serves DeepSeek-V4-Pro-0813 (released 2026-08-13,
2477
2527
  // first STABLE V4 Pro — supersedes the April preview; calling name
2478
2528
  // unchanged, same 1.6T/49B MoE). 1M context, text-only, low/high/max effort.
2529
+ // DeepSeek reversed its planned 2026-09-14 retirement, so it stays served.
2479
2530
  // Docs abbreviate output as 384K; use the same conservative 384,000-token
2480
2531
  // application cap across V4 models rather than mixing decimal/binary units.
2481
2532
  id: "deepseek-v4-pro",
@@ -2490,21 +2541,10 @@ var MODELS = [
2490
2541
  maxThinkingLevel: "max"
2491
2542
  },
2492
2543
  {
2493
- id: "deepseek-v4-flash",
2494
- name: "DeepSeek V4 Flash",
2495
- provider: "deepseek",
2496
- contextWindow: 1048576,
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)",
2544
+ // `deepseek-flash` is the rolling alias for the latest Flash — currently
2545
+ // V4.1 Flash (2026-09-10): native image input, 1M context, 384K output.
2546
+ id: "deepseek-flash",
2547
+ name: "DeepSeek V4.1 Flash",
2508
2548
  provider: "deepseek",
2509
2549
  contextWindow: 1048576,
2510
2550
  maxOutputTokens: 384e3,
@@ -2516,11 +2556,13 @@ var MODELS = [
2516
2556
  },
2517
2557
  // ── OpenRouter ─────────────────────────────────────────
2518
2558
  {
2519
- id: "qwen/qwen3.6-plus",
2520
- name: "Qwen3.6-Plus",
2559
+ // Qwen3.8 Max — Alibaba's flagship (live /endpoints, 2026-09-28): 1M
2560
+ // context, 131,072 output, text + image + video input, reasoning on.
2561
+ id: "qwen/qwen3.8-max",
2562
+ name: "Qwen3.8 Max",
2521
2563
  provider: "openrouter",
2522
2564
  contextWindow: 1e6,
2523
- maxOutputTokens: 65536,
2565
+ maxOutputTokens: 131072,
2524
2566
  supportsThinking: true,
2525
2567
  supportsImages: true,
2526
2568
  supportsVideo: true,
@@ -2606,7 +2648,7 @@ function getVideoByteLimit(modelId) {
2606
2648
  }
2607
2649
  function getDefaultModel(provider) {
2608
2650
  if (provider === "xiaomi") return MODELS.find((m) => m.id === "mimo-v2.6-pro");
2609
- if (provider === "openai") return MODELS.find((m) => m.id === "gpt-6-sol");
2651
+ if (provider === "openai") return MODELS.find((m) => m.id === "gpt-6.1-sol");
2610
2652
  if (provider === "gemini") return MODELS.find((m) => m.id === "gemini-3.1-flash-lite");
2611
2653
  if (provider === "glm") return MODELS.find((m) => m.id === "glm-5.3");
2612
2654
  if (provider === "moonshot") return MODELS.find((m) => m.id === "kimi-k3");
@@ -2614,13 +2656,13 @@ function getDefaultModel(provider) {
2614
2656
  if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
2615
2657
  if (provider === "huggingface")
2616
2658
  return MODELS.find((m) => m.id === "Qwen/Qwen3-Coder-480B-A35B-Instruct");
2617
- if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.6-plus");
2659
+ if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.8-max");
2618
2660
  if (provider === "sakana") return MODELS.find((m) => m.id === "fugu");
2619
2661
  if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.7");
2620
2662
  if (provider === "local") {
2621
2663
  return getModelsForProvider("local")[0] ?? PLACEHOLDER_LOCAL_MODEL;
2622
2664
  }
2623
- return MODELS.find((m) => m.id === "claude-sonnet-5");
2665
+ return MODELS.find((m) => m.id === "claude-sonnet-5-5");
2624
2666
  }
2625
2667
  var PLACEHOLDER_LOCAL_MODEL = {
2626
2668
  id: "local/none/none",
@@ -2658,7 +2700,7 @@ function getDefaultThinkingLevel(modelId, options) {
2658
2700
  }
2659
2701
  function getSummaryModel(provider, currentModelId) {
2660
2702
  if (provider === "anthropic") {
2661
- return MODELS.find((m) => m.id === "claude-sonnet-5");
2703
+ return MODELS.find((m) => m.id === "claude-sonnet-5-5");
2662
2704
  }
2663
2705
  if (provider === "openai" || provider === "glm" || provider === "deepseek" || provider === "huggingface") {
2664
2706
  const low = getModelsForProvider(provider).find((m) => m.costTier === "low");
@@ -2730,4 +2772,4 @@ export {
2730
2772
  getSummaryModel,
2731
2773
  getFastModel
2732
2774
  };
2733
- //# sourceMappingURL=chunk-CUQX2YIH.js.map
2775
+ //# sourceMappingURL=chunk-CK6UIITE.js.map