@prestyj/core 5.23.0 → 5.25.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/index.cjs CHANGED
@@ -2078,11 +2078,37 @@ var MODELS = [
2078
2078
  // costTier: "high",
2079
2079
  // maxThinkingLevel: "max",
2080
2080
  // },
2081
+ {
2082
+ // Released 2026-09-22 — "For long-running agentic coding and knowledge
2083
+ // work". Fable-class capability at $4/$20 MTok (cheaper than the Opus 5 it
2084
+ // replaces, $5/$25). Adaptive thinking with the full effort ladder
2085
+ // (low→max, xhigh included), but thinking can no longer be disabled: a
2086
+ // `thinking: {type: "disabled"}` or budget_tokens request 400s. @prestyj/ai
2087
+ // omits the field entirely when thinking is off, so that path is safe.
2088
+ // Forced tool use (`tool_choice` any/tool) also 400s — see
2089
+ // `toAnthropicToolChoice`, which downgrades it to `auto` for this model.
2090
+ // Anthropic declares the server-side default effort as `medium` (Opus 5
2091
+ // ran `high`), and 5.5 thinks more per turn at a given level, so a fresh
2092
+ // session starts at `medium` rather than the ladder ceiling.
2093
+ id: "claude-opus-5-5",
2094
+ name: "Claude Opus 5.5",
2095
+ provider: "anthropic",
2096
+ contextWindow: 1e6,
2097
+ maxOutputTokens: 128e3,
2098
+ supportsThinking: true,
2099
+ defaultThinkingLevel: "medium",
2100
+ supportsImages: true,
2101
+ supportsVideo: false,
2102
+ costTier: "high",
2103
+ maxThinkingLevel: "max"
2104
+ },
2081
2105
  {
2082
2106
  // Released 2026-07-24 — "For complex agentic coding and enterprise work".
2083
2107
  // Near-Fable capability at half the price ($5/$25 vs $10/$50). Adaptive
2084
2108
  // thinking with the full effort ladder (low→max, xhigh included); dateless
2085
- // ID is the canonical pinned snapshot (post-4.6 naming scheme).
2109
+ // ID is the canonical pinned snapshot (post-4.6 naming scheme). Kept as a
2110
+ // legacy option now that Opus 5.5 leads the line: it's the last Opus that
2111
+ // accepts disabled thinking and forced tool use.
2086
2112
  id: "claude-opus-5",
2087
2113
  name: "Claude Opus 5",
2088
2114
  provider: "anthropic",
@@ -2231,16 +2257,21 @@ var MODELS = [
2231
2257
  maxThinkingLevel: "max"
2232
2258
  },
2233
2259
  // ── xAI (Grok) ─────────────────────────────────────────
2234
- // Grok 4.6 (released 2026-08-12) is xAI's flagship for coding, agentic tasks,
2235
- // and knowledge work, with a focus on long-running agents — 500K context,
2236
- // text+image input, and a `reasoning_effort` ladder that adds a new `xhigh`
2237
- // top rung (low/medium/high default/xhigh; reasoning still can't be fully
2260
+ // Grok 4.7 (released 2026-09-21) — xAI's flagship for coding, agentic tasks,
2261
+ // and knowledge work: a new, larger base model with a longer RL run weighted
2262
+ // toward hours-long tasks, plus stronger self-verification and long-context
2263
+ // management. 500K context, text+image input, and a `reasoning_effort`
2264
+ // ladder of low/medium/high default/xhigh (reasoning still can't be fully
2238
2265
  // disabled). $2/$6 per MTok under 200K prompt tokens ($4/$12 at or above),
2239
- // and it's the default model of the Grok Build coding agent. xAI advertises "no text output limit"; we keep the same
2240
- // 131K practical cap as 4.5 for budget predictability and input headroom.
2266
+ // and it's the default model of the Grok Build coding agent. xAI advertises
2267
+ // "no fixed text output limit"; we keep the 131K practical cap for budget
2268
+ // predictability and input headroom. (A faster "Grok 4.7 Fast" variant
2269
+ // exists but is Cursor/Grok Build-only — not on the public API — so it isn't
2270
+ // registered.) Only the newest Grok ships — 4.6/4.5 are superseded and
2271
+ // retired; saved sessions on them fall back to this default.
2241
2272
  {
2242
- id: "grok-4.6",
2243
- name: "Grok 4.6",
2273
+ id: "grok-4.7",
2274
+ name: "Grok 4.7",
2244
2275
  provider: "xai",
2245
2276
  contextWindow: 5e5,
2246
2277
  maxOutputTokens: 131072,
@@ -2250,24 +2281,6 @@ var MODELS = [
2250
2281
  costTier: "medium",
2251
2282
  maxThinkingLevel: "xhigh"
2252
2283
  },
2253
- // Grok 4.5 (released 2026-07-08) — superseded by 4.6 but retained as an explicit option. 500K context, text+image input,
2254
- // configurable `reasoning_effort` (low/medium/high, server default high;
2255
- // reasoning can't be fully disabled). Served over the OpenAI-compatible API
2256
- // at https://api.x.ai/v1 (API key from console.x.ai). xAI hasn't published an
2257
- // official max-output cap for 4.5; 131K matches the Grok Responses ceiling
2258
- // third-party integrations use.
2259
- {
2260
- id: "grok-4.5",
2261
- name: "Grok 4.5",
2262
- provider: "xai",
2263
- contextWindow: 5e5,
2264
- maxOutputTokens: 131072,
2265
- supportsThinking: true,
2266
- supportsImages: true,
2267
- supportsVideo: false,
2268
- costTier: "medium",
2269
- maxThinkingLevel: "high"
2270
- },
2271
2284
  // ── Gemini ─────────────────────────────────────────
2272
2285
  {
2273
2286
  id: "gemini-3.1-flash-lite",
@@ -2456,11 +2469,15 @@ var MODELS = [
2456
2469
  maxThinkingLevel: "high"
2457
2470
  },
2458
2471
  // ── Xiaomi (MiMo) ──────────────────────────────────────
2459
- // V2.6 series (2026-09) supersedes V2.5 one-for-one: pro → pro, the omni
2460
- // `mimo-v2.5` → flash, ultraspeed → ultraspeed. The whole series is now
2461
- // full-modality, so unlike V2.5-Pro the flagship no longer needs a separate
2462
- // omni sibling for attachments. V2.5 entries are retired here — a session
2463
- // that still has one saved falls back to the provider default on next start.
2472
+ // V2.6 series (released 2026-09-22, open-weight: Pro 1.02T/42B-A, Flash
2473
+ // 309B/15B-A, plus a 9B Qwen distill not served over the API) supersedes V2.5
2474
+ // one-for-one: pro → pro, the omni `mimo-v2.5` → flash, ultraspeed →
2475
+ // ultraspeed. Every V2.6 text model is natively full-modality, so unlike
2476
+ // V2.5-Pro the flagship no longer needs a separate omni sibling for
2477
+ // attachments — image/video ride the same OpenAI-compatible base64 transport
2478
+ // the old omni model used. API prices are unchanged from V2.5. The V2.5 ids
2479
+ // deprecate on the platform 2026-10-21 and are retired here — a session that
2480
+ // still has one saved falls back to the provider default on next start.
2464
2481
  //
2465
2482
  // Capabilities below are measured against the Token Plan host, not taken
2466
2483
  // from marketing copy: image and video both come back with `image_tokens` /
@@ -2470,6 +2487,8 @@ var MODELS = [
2470
2487
  // binary 1M below (2^20) and not the decimal 1e6 V2.5 was listed with — the
2471
2488
  // few-token gap is the chat envelope the server adds on top of the content.
2472
2489
  {
2490
+ // Coding/agentic flagship — highest open-weight score on Artificial
2491
+ // Analysis at launch (46, tied with Grok 4.7).
2473
2492
  id: "mimo-v2.6-pro",
2474
2493
  name: "MiMo-V2.6-Pro",
2475
2494
  provider: "xiaomi",
@@ -2483,9 +2502,10 @@ var MODELS = [
2483
2502
  maxThinkingLevel: "high",
2484
2503
  authStorageKeys: ["xiaomi", XIAOMI_CREDITS_KEY]
2485
2504
  },
2486
- // Flash: the cheap, high-frequency sibling at the same modality surface and
2487
- // window as Pro. It is the provider's `low` tier, so scout sub-agents and
2488
- // compaction summaries route here instead of paying Pro rates.
2505
+ // Flash: the cheap, high-frequency sibling (~10% of Pro's price class) at the
2506
+ // same modality surface and window as Pro. It is the provider's `low` tier,
2507
+ // so scout sub-agents and compaction summaries route here instead of paying
2508
+ // Pro rates.
2489
2509
  {
2490
2510
  id: "mimo-v2.6-flash",
2491
2511
  name: "MiMo-V2.6-Flash",
@@ -2506,9 +2526,9 @@ var MODELS = [
2506
2526
  // authStorageKeys doc). The Token Plan host rejects it with "Not supported
2507
2527
  // model" — the known-model/wrong-host reply — where an invented id gets
2508
2528
  // "Unsupported model", which is how this id was confirmed without a
2509
- // Credits key. Attachment support is inferred from the series announcement
2510
- // ("full modality across the series") rather than measured: images are
2511
- // enabled, video stays off until it can be verified on the platform host.
2529
+ // Credits key. Attachments can't be probed directly for the same reason, so
2530
+ // this entry tracks the rest of the V2.6 series ("full modality across the
2531
+ // series") and mirrors Pro's verified image+video surface.
2512
2532
  {
2513
2533
  id: "mimo-v2.6-pro-ultraspeed",
2514
2534
  name: "MiMo-V2.6-Pro-UltraSpeed",
@@ -2517,7 +2537,8 @@ var MODELS = [
2517
2537
  maxOutputTokens: 131072,
2518
2538
  supportsThinking: true,
2519
2539
  supportsImages: true,
2520
- supportsVideo: false,
2540
+ supportsVideo: true,
2541
+ maxVideoBytes: 36 * 1024 * 1024,
2521
2542
  costTier: "high",
2522
2543
  maxThinkingLevel: "high",
2523
2544
  authStorageKeys: [XIAOMI_CREDITS_KEY]
@@ -2667,7 +2688,7 @@ function getDefaultModel(provider) {
2667
2688
  return MODELS.find((m) => m.id === "Qwen/Qwen3-Coder-480B-A35B-Instruct");
2668
2689
  if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.6-plus");
2669
2690
  if (provider === "sakana") return MODELS.find((m) => m.id === "fugu");
2670
- if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.6");
2691
+ if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.7");
2671
2692
  if (provider === "local") {
2672
2693
  return getModelsForProvider("local")[0] ?? PLACEHOLDER_LOCAL_MODEL;
2673
2694
  }