@prestyj/core 5.26.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.
@@ -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,
@@ -2112,11 +2121,18 @@ var MODELS = [
2112
2121
  costTier: "high",
2113
2122
  maxThinkingLevel: "ultra"
2114
2123
  },
2124
+ // GPT-6 Sol + Luna — released 2026-09-22 below Astra, replacing the whole
2125
+ // GPT-5.6 family (Sol/Terra/Luna; there is no GPT-6 Terra — OpenAI's Codex
2126
+ // catalog upgrades 5.6 Terra to 6 Sol). Both need a Codex client >= 0.155.0
2127
+ // on the ChatGPT OAuth route. Same window split as Astra: 1.05M on the public
2128
+ // Responses API, 272K on the Codex route; 128K output, text+image input,
2129
+ // freeform apply_patch, responses-lite transport. The 5.6 ids are retired —
2130
+ // a saved session on one falls back to the provider default on next start.
2115
2131
  {
2116
- // GPT-6 Sol — "Workhorse model for coding and everyday work." (Codex
2117
- // catalog priority 2, default medium, requires Codex client >= 0.155.0).
2118
- // Launched Sep 22 2026 at $2/$10 per 1M tokens — half of GPT-5.6 Sol.
2119
- // Same 1.05M public / 272K Codex split and low → ultra ladder as Astra.
2132
+ // Sol — "Workhorse model for coding and everyday work." (Codex priority 2,
2133
+ // default medium). $2/$10 MTok. Ladder low → medium → high → xhigh → max →
2134
+ // ultra; ultra is the Codex orchestration preset (max effort on the wire +
2135
+ // proactive local subagent delegation).
2120
2136
  id: "gpt-6-sol",
2121
2137
  name: "GPT-6 Sol",
2122
2138
  provider: "openai",
@@ -2131,10 +2147,8 @@ var MODELS = [
2131
2147
  maxThinkingLevel: "ultra"
2132
2148
  },
2133
2149
  {
2134
- // GPT-6 Luna — "Fast and affordable model for easier tasks." (Codex
2135
- // catalog priority 3, default medium, client >= 0.155.0). $0.10/$0.50 per
2136
- // 1M tokens. Reasoning tops out at `max` (no ultra preset). Listed ahead of
2137
- // GPT-5.6 Luna so getFastModel picks it as the OpenAI fast tier.
2150
+ // Luna — "Fast and affordable model for easier tasks." (Codex priority 3,
2151
+ // default medium). $0.10/$0.50 MTok. Reasoning tops out at `max`.
2138
2152
  id: "gpt-6-luna",
2139
2153
  name: "GPT-6 Luna",
2140
2154
  provider: "openai",
@@ -2148,71 +2162,29 @@ var MODELS = [
2148
2162
  costTier: "low",
2149
2163
  maxThinkingLevel: "max"
2150
2164
  },
2151
- // GPT-5.6 family — three agentic coding tiers launched July 2026. The public
2152
- // Responses API advertises a 1.05M context window; OpenAI's Codex product
2153
- // catalog advertises 272K on the ChatGPT OAuth route (corrected from the
2154
- // initially advertised 372K — openai/codex PR #33972, Jul 18 2026 hotfix). All three take
2155
- // text+image input, freeform apply_patch, text+image web search, and parallel
2156
- // tool calls.
2157
- {
2158
- // Sol — "Latest frontier agentic coding model." (priority 1, default low).
2159
- // Reasoning ladder: low → medium → high → xhigh → max → ultra. Ultra is a
2160
- // Codex orchestration preset: the request uses max effort while the local
2161
- // runtime proactively delegates suitable independent work to subagents.
2162
- id: "gpt-5.6-sol",
2163
- name: "GPT-5.6 Sol",
2164
- provider: "openai",
2165
- contextWindow: 105e4,
2166
- codexContextWindow: 272e3,
2167
- maxOutputTokens: 128e3,
2168
- supportsThinking: true,
2169
- defaultThinkingLevel: "low",
2170
- supportsImages: true,
2171
- supportsVideo: false,
2172
- costTier: "high",
2173
- maxThinkingLevel: "ultra"
2174
- },
2165
+ // ── Sakana (Fugu) ──────────────────────────────────────
2166
+ // Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
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.
2175
2173
  {
2176
- // Terra — "Balanced agentic coding model for everyday work." (priority 2,
2177
- // default medium).
2178
- id: "gpt-5.6-terra",
2179
- name: "GPT-5.6 Terra",
2180
- provider: "openai",
2181
- contextWindow: 105e4,
2182
- codexContextWindow: 272e3,
2174
+ id: "fugu",
2175
+ name: "Fugu",
2176
+ provider: "sakana",
2177
+ contextWindow: 1e6,
2183
2178
  maxOutputTokens: 128e3,
2184
2179
  supportsThinking: true,
2185
- defaultThinkingLevel: "medium",
2186
2180
  supportsImages: true,
2187
2181
  supportsVideo: false,
2188
2182
  costTier: "medium",
2189
- maxThinkingLevel: "ultra"
2190
- },
2191
- {
2192
- // Luna — "Fast and affordable agentic coding model." (priority 3, default
2193
- // medium). Reasoning tops out at `max`.
2194
- id: "gpt-5.6-luna",
2195
- name: "GPT-5.6 Luna",
2196
- provider: "openai",
2197
- contextWindow: 105e4,
2198
- codexContextWindow: 272e3,
2199
- maxOutputTokens: 128e3,
2200
- supportsThinking: true,
2201
- defaultThinkingLevel: "medium",
2202
- supportsImages: true,
2203
- supportsVideo: false,
2204
- costTier: "low",
2205
- maxThinkingLevel: "max"
2183
+ maxThinkingLevel: "xhigh"
2206
2184
  },
2207
- // ── Sakana (Fugu) ──────────────────────────────────────
2208
- // Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
2209
- // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). Both models take
2210
- // text + image input. Plain Fugu stops at xhigh; Ultra v1.1 also supports max.
2211
- // `fugu` routes across all providers; `fugu-ultra` is
2212
- // the heavier tier (may need larger client timeouts on complex tasks).
2213
2185
  {
2214
- id: "fugu",
2215
- name: "Fugu",
2186
+ id: "fugu-max",
2187
+ name: "Fugu Max",
2216
2188
  provider: "sakana",
2217
2189
  contextWindow: 1e6,
2218
2190
  maxOutputTokens: 128e3,
@@ -2232,7 +2204,7 @@ var MODELS = [
2232
2204
  supportsImages: true,
2233
2205
  supportsVideo: false,
2234
2206
  costTier: "high",
2235
- // The rolling alias now serves v1.1, which adds a distinct max effort.
2207
+ // The rolling alias now serves v2.0 (2026-09-11), which keeps max effort.
2236
2208
  maxThinkingLevel: "max"
2237
2209
  },
2238
2210
  // ── xAI (Grok) ─────────────────────────────────────────
@@ -2376,7 +2348,27 @@ var MODELS = [
2376
2348
  costTier: "high",
2377
2349
  maxThinkingLevel: "max"
2378
2350
  },
2379
- // Retain the cheaper dedicated coding model as an explicit alternative.
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.
2380
2372
  {
2381
2373
  id: "kimi-k2.7-code",
2382
2374
  name: "Kimi K2.7 Code",
@@ -2523,10 +2515,14 @@ var MODELS = [
2523
2515
  authStorageKeys: [XIAOMI_CREDITS_KEY]
2524
2516
  },
2525
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.
2526
2521
  {
2527
2522
  // `deepseek-v4-pro` now serves DeepSeek-V4-Pro-0813 (released 2026-08-13,
2528
2523
  // first STABLE V4 Pro — supersedes the April preview; calling name
2529
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.
2530
2526
  // Docs abbreviate output as 384K; use the same conservative 384,000-token
2531
2527
  // application cap across V4 models rather than mixing decimal/binary units.
2532
2528
  id: "deepseek-v4-pro",
@@ -2541,21 +2537,10 @@ var MODELS = [
2541
2537
  maxThinkingLevel: "max"
2542
2538
  },
2543
2539
  {
2544
- id: "deepseek-v4-flash",
2545
- name: "DeepSeek V4 Flash",
2546
- provider: "deepseek",
2547
- contextWindow: 1048576,
2548
- maxOutputTokens: 384e3,
2549
- supportsThinking: true,
2550
- supportsImages: false,
2551
- supportsVideo: false,
2552
- costTier: "low",
2553
- maxThinkingLevel: "max"
2554
- },
2555
- // Opt-in experimental vision sibling; never replaces the stable summary model.
2556
- {
2557
- id: "deepseek-v4-flash-vision-exp",
2558
- 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",
2559
2544
  provider: "deepseek",
2560
2545
  contextWindow: 1048576,
2561
2546
  maxOutputTokens: 384e3,
@@ -2567,11 +2552,13 @@ var MODELS = [
2567
2552
  },
2568
2553
  // ── OpenRouter ─────────────────────────────────────────
2569
2554
  {
2570
- id: "qwen/qwen3.6-plus",
2571
- name: "Qwen3.6-Plus",
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",
2572
2559
  provider: "openrouter",
2573
2560
  contextWindow: 1e6,
2574
- maxOutputTokens: 65536,
2561
+ maxOutputTokens: 131072,
2575
2562
  supportsThinking: true,
2576
2563
  supportsImages: true,
2577
2564
  supportsVideo: true,
@@ -2665,13 +2652,13 @@ function getDefaultModel(provider) {
2665
2652
  if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
2666
2653
  if (provider === "huggingface")
2667
2654
  return MODELS.find((m) => m.id === "Qwen/Qwen3-Coder-480B-A35B-Instruct");
2668
- if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.6-plus");
2655
+ if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.8-max");
2669
2656
  if (provider === "sakana") return MODELS.find((m) => m.id === "fugu");
2670
2657
  if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.7");
2671
2658
  if (provider === "local") {
2672
2659
  return getModelsForProvider("local")[0] ?? PLACEHOLDER_LOCAL_MODEL;
2673
2660
  }
2674
- return MODELS.find((m) => m.id === "claude-sonnet-5");
2661
+ return MODELS.find((m) => m.id === "claude-sonnet-5-5");
2675
2662
  }
2676
2663
  var PLACEHOLDER_LOCAL_MODEL = {
2677
2664
  id: "local/none/none",
@@ -2709,7 +2696,7 @@ function getDefaultThinkingLevel(modelId, options) {
2709
2696
  }
2710
2697
  function getSummaryModel(provider, currentModelId) {
2711
2698
  if (provider === "anthropic") {
2712
- return MODELS.find((m) => m.id === "claude-sonnet-5");
2699
+ return MODELS.find((m) => m.id === "claude-sonnet-5-5");
2713
2700
  }
2714
2701
  if (provider === "openai" || provider === "glm" || provider === "deepseek" || provider === "huggingface") {
2715
2702
  const low = getModelsForProvider(provider).find((m) => m.costTier === "low");
@@ -2781,4 +2768,4 @@ export {
2781
2768
  getSummaryModel,
2782
2769
  getFastModel
2783
2770
  };
2784
- //# sourceMappingURL=chunk-NKYU365Z.js.map
2771
+ //# sourceMappingURL=chunk-ZCXAIMZF.js.map