@prestyj/core 5.33.0 → 5.35.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.
@@ -317,18 +317,13 @@ var MODELS = [
317
317
  },
318
318
  // ── OpenAI (Codex) ─────────────────────────────────────
319
319
  {
320
- // GPT-6 Astra — "Our most capable model for complex, demanding work."
321
- // (Codex catalog priority 2, listed for every ChatGPT plan, requires a
322
- // Codex client >= 0.153.0 — see CODEX_CLIENT_VERSION). Same split as 5.6:
323
- // 1.05M on the public Responses API, 272K on the ChatGPT OAuth route
324
- // (openai/codex models.json, `gpt-6-astra`). Reasoning ladder low → medium
325
- // → high → xhigh → max → ultra; `ultra` is the Codex orchestration preset
326
- // (multi_agent v2) and is Codex-only — the public API tops out at `max`.
327
- // Note: through a plain API key OpenAI requires the Responses API for tool
328
- // calling on Astra, so the Chat Completions path is text-only; the OAuth
329
- // Codex route is the supported way to use it as an agent.
330
- id: "gpt-6-astra",
331
- name: "GPT-6 Astra",
320
+ // GPT-6.2 Astra — released 2026-11-17, "Our most capable model for your
321
+ // hardest projects." (Codex catalog priority 2, default low, client >=
322
+ // 0.166.0). $8/$40 MTok, cached input $0.40. 1.05M on the public Responses
323
+ // API, 272K on the Codex route; 128K output, text+image input. Same ladder
324
+ // and Ultra preset as GPT-6 Astra, which it retires; the API rejects reasoning effort `none`.
325
+ id: "gpt-6.2-astra",
326
+ name: "GPT-6.2 Astra",
332
327
  provider: "openai",
333
328
  contextWindow: 105e4,
334
329
  codexContextWindow: 272e3,
@@ -341,12 +336,12 @@ var MODELS = [
341
336
  maxThinkingLevel: "ultra"
342
337
  },
343
338
  {
344
- // Codex Fast mode for Astra (catalog `service_tiers: priority`, "2x speed,
345
- // increased usage"). @prestyj/ai's `stream()` sends it as `gpt-6-astra` +
346
- // `service_tier: "priority"`, exactly what the Codex CLI sends. On a
347
- // ChatGPT plan it draws included limits at 2.5x the standard rate.
348
- id: "gpt-6-astra-fast",
349
- name: "GPT-6 Astra Fast",
339
+ // Codex Fast mode for 6.2 Astra ("2x speed, increased usage"). @prestyj/ai's
340
+ // `stream()` sends it as `gpt-6.2-astra` + `service_tier: "priority"`,
341
+ // exactly what the Codex CLI sends. On a ChatGPT plan it draws included
342
+ // limits at 2.5x the standard rate.
343
+ id: "gpt-6.2-astra-fast",
344
+ name: "GPT-6.2 Astra Fast",
350
345
  provider: "openai",
351
346
  contextWindow: 105e4,
352
347
  codexContextWindow: 272e3,
@@ -361,24 +356,25 @@ var MODELS = [
361
356
  },
362
357
  // GPT-6 Sol + Luna — released 2026-09-22 below Astra, replacing the whole
363
358
  // GPT-5.6 family (Sol/Terra/Luna; there was no GPT-6 Terra — OpenAI's Codex
364
- // catalog upgrades 5.6 Terra to 6 Sol). GPT-6.1 Sol (2026-09-29) then replaced
365
- // GPT-6 Sol, and GPT-6.1 Terra (2026-10-26) sits between Sol and Luna. Same window split as Astra: 1.05M on the public Responses API,
366
- // 272K on the Codex route; 128K output, text+image input, freeform
367
- // apply_patch, responses-lite transport. The GPT-5.6 ids and `gpt-6-sol` are
368
- // retired — a saved session on one falls back to the provider default on
369
- // next start.
359
+ // catalog upgrades 5.6 Terra to 6 Sol). GPT-6.1 Sol (2026-09-29) replaced
360
+ // GPT-6 Sol, GPT-6.1 Terra (2026-10-26) sits between Sol and Luna, and
361
+ // GPT-6.2 Sol (2026-11-17) replaced GPT-6.1 Sol. 1.05M on the public
362
+ // Responses API; 128K output, text+image input, freeform apply_patch,
363
+ // responses-lite transport. The GPT-5.6 ids, `gpt-6-sol` and `gpt-6.1-sol`
364
+ // are retired — a saved session on one falls back to the provider default
365
+ // on next start.
370
366
  {
371
- // GPT-6.1 Sol — "Latest workhorse model for coding and everyday work."
372
- // (Codex priority 1, default low). The catalog says Codex client >= 0.153.0,
373
- // but the ChatGPT backend only serves it from 0.159.0 (see
374
- // CODEX_CLIENT_VERSION). $2/$10 MTok, cached input $0.10. Ladder low →
367
+ // GPT-6.2 Sol — "Our go-to model for everyday work, from coding to
368
+ // powering agents at scale." (Codex priority 1, default low, client >=
369
+ // 0.166.0). $2/$10 MTok, cached input $0.10. Like Terra, the Codex route
370
+ // gets a 500K window (catalog `context_window`). Ladder low →
375
371
  // medium → high → xhigh → max → ultra; ultra is the Codex orchestration
376
372
  // preset (xhigh effort on the wire + proactive local subagent delegation).
377
- id: "gpt-6.1-sol",
378
- name: "GPT-6.1 Sol",
373
+ id: "gpt-6.2-sol",
374
+ name: "GPT-6.2 Sol",
379
375
  provider: "openai",
380
376
  contextWindow: 105e4,
381
- codexContextWindow: 272e3,
377
+ codexContextWindow: 5e5,
382
378
  maxOutputTokens: 128e3,
383
379
  supportsThinking: true,
384
380
  defaultThinkingLevel: "low",
@@ -388,13 +384,13 @@ var MODELS = [
388
384
  maxThinkingLevel: "ultra"
389
385
  },
390
386
  {
391
- // Codex Fast mode for 6.1 Sol ("2x speed, increased usage") — see
392
- // `gpt-6-astra-fast` for the wire mapping and billing.
393
- id: "gpt-6.1-sol-fast",
394
- name: "GPT-6.1 Sol Fast",
387
+ // Codex Fast mode for 6.2 Sol ("2x speed, increased usage") — see
388
+ // `gpt-6.2-astra-fast` for the wire mapping and billing.
389
+ id: "gpt-6.2-sol-fast",
390
+ name: "GPT-6.2 Sol Fast",
395
391
  provider: "openai",
396
392
  contextWindow: 105e4,
397
- codexContextWindow: 272e3,
393
+ codexContextWindow: 5e5,
398
394
  maxOutputTokens: 128e3,
399
395
  supportsThinking: true,
400
396
  defaultThinkingLevel: "low",
@@ -422,7 +418,7 @@ var MODELS = [
422
418
  maxThinkingLevel: "ultra"
423
419
  },
424
420
  {
425
- // Codex Fast mode for 6.1 Terra ("1.5x speed") — see `gpt-6-astra-fast`
421
+ // Codex Fast mode for 6.1 Terra ("1.5x speed") — see `gpt-6.2-astra-fast`
426
422
  // for the wire mapping and billing.
427
423
  id: "gpt-6.1-terra-fast",
428
424
  name: "GPT-6.1 Terra Fast",
@@ -456,7 +452,7 @@ var MODELS = [
456
452
  maxThinkingLevel: "max"
457
453
  },
458
454
  {
459
- // Codex Fast mode for Luna ("1.5x speed") — see `gpt-6-astra-fast` for the
455
+ // Codex Fast mode for Luna ("1.5x speed") — see `gpt-6.2-astra-fast` for the
460
456
  // wire mapping and billing. Listed after Luna so compaction summaries
461
457
  // (first `low` OpenAI model) stay on standard-speed Luna.
462
458
  id: "gpt-6-luna-fast",
@@ -559,7 +555,56 @@ var MODELS = [
559
555
  authStorageKeys: GEMINI_AUTH_KEYS
560
556
  },
561
557
  // Keep 3.1 Flash Lite first for the working OAuth default and fast-model routing.
562
- // New GA models are opt-in; Code Assist access varies by account. Gemini 3.7
558
+ // New GA models are opt-in; Code Assist access varies by account.
559
+ // Gemini 4 (GA Nov 2026, ai.google.dev/gemini-api/docs/changelog): a unified 1M window and
560
+ // 64K synchronous output. Hydrogen also takes an `xhigh` thinking level; the ladder here
561
+ // stops at `high` like the other Gemini models.
562
+ {
563
+ // The fast everyday model, on the free tier too ($1.50 / $7.50 per 1M paid).
564
+ id: "gemini-4-hydrogen",
565
+ name: "Gemini 4 Hydrogen",
566
+ provider: "gemini",
567
+ contextWindow: 1048576,
568
+ maxOutputTokens: 65536,
569
+ supportsThinking: true,
570
+ supportsImages: true,
571
+ supportsVideo: true,
572
+ maxVideoBytes: 20 * 1024 * 1024,
573
+ costTier: "medium",
574
+ maxThinkingLevel: "high",
575
+ authStorageKeys: GEMINI_AUTH_KEYS
576
+ },
577
+ {
578
+ // Paid tier only ($4 / $20 per 1M from Dec 1, 2026).
579
+ id: "gemini-4-argon",
580
+ name: "Gemini 4 Argon",
581
+ provider: "gemini",
582
+ contextWindow: 1048576,
583
+ maxOutputTokens: 65536,
584
+ supportsThinking: true,
585
+ supportsImages: true,
586
+ supportsVideo: true,
587
+ maxVideoBytes: 20 * 1024 * 1024,
588
+ costTier: "high",
589
+ maxThinkingLevel: "high",
590
+ authStorageKeys: GEMINI_AUTH_KEYS
591
+ },
592
+ {
593
+ // The strongest Gemini 4 reasoning model; paid tier only.
594
+ id: "gemini-4-carbon",
595
+ name: "Gemini 4 Carbon",
596
+ provider: "gemini",
597
+ contextWindow: 1048576,
598
+ maxOutputTokens: 65536,
599
+ supportsThinking: true,
600
+ supportsImages: true,
601
+ supportsVideo: true,
602
+ maxVideoBytes: 20 * 1024 * 1024,
603
+ costTier: "high",
604
+ maxThinkingLevel: "high",
605
+ authStorageKeys: GEMINI_AUTH_KEYS
606
+ },
607
+ // Gemini 3.7
563
608
  // Flash is retired: Google deprecated it on 2026-10-08 and routes every
564
609
  // `gemini-3.7-flash` request to 3.8 Flash (ai.google.dev/gemini-api/docs/
565
610
  // changelog), so a saved session on it falls back to the provider default.
@@ -577,6 +622,21 @@ var MODELS = [
577
622
  maxThinkingLevel: "high",
578
623
  authStorageKeys: GEMINI_AUTH_KEYS
579
624
  },
625
+ {
626
+ // Replaced 3.5 Flash, which Google now routes here (changelog).
627
+ id: "gemini-3.6-flash",
628
+ name: "Gemini 3.6 Flash",
629
+ provider: "gemini",
630
+ contextWindow: 1048576,
631
+ maxOutputTokens: 65536,
632
+ supportsThinking: true,
633
+ supportsImages: true,
634
+ supportsVideo: true,
635
+ maxVideoBytes: 20 * 1024 * 1024,
636
+ costTier: "low",
637
+ maxThinkingLevel: "high",
638
+ authStorageKeys: GEMINI_AUTH_KEYS
639
+ },
580
640
  {
581
641
  id: "gemini-3.5-flash-lite",
582
642
  name: "Gemini 3.5 Flash Lite",
@@ -904,6 +964,93 @@ var MODELS = [
904
964
  costTier: "medium",
905
965
  maxThinkingLevel: "high"
906
966
  },
967
+ // ── OpenCode Console (Go subscription, then pay-as-you-go) ────────
968
+ // One Console API key reaches many labs' models through opencode.ai. Ids
969
+ // carry the plan prefix (`opencode-go/kimi-k3`) because the gateway reuses
970
+ // the vendors' own ids; @prestyj/ai strips it at the wire. These rows are only the
971
+ // offline fallback: the desktop app replaces them with each plan's live,
972
+ // public model list (core/opencode-catalog-store.ts). Limits, image input
973
+ // and effort ladders are from GET /inference[/go]/v1/models (2026-11-11);
974
+ // all three speak Chat Completions natively.
975
+ {
976
+ // Go declares `max` as K3's only effort; pay-as-you-go adds low and high.
977
+ id: "opencode-go/kimi-k3",
978
+ name: "Kimi K3",
979
+ provider: "opencode-go",
980
+ contextWindow: 1048576,
981
+ maxOutputTokens: 131072,
982
+ supportsThinking: true,
983
+ supportsImages: true,
984
+ supportsVideo: false,
985
+ costTier: "high",
986
+ maxThinkingLevel: "max",
987
+ thinkingLevels: ["max"]
988
+ },
989
+ {
990
+ id: "opencode-go/glm-5.3",
991
+ name: "GLM-5.3",
992
+ provider: "opencode-go",
993
+ contextWindow: 1e6,
994
+ maxOutputTokens: 131072,
995
+ supportsThinking: true,
996
+ supportsImages: false,
997
+ supportsVideo: false,
998
+ costTier: "medium",
999
+ maxThinkingLevel: "max",
1000
+ thinkingLevels: ["low", "high", "max"]
1001
+ },
1002
+ {
1003
+ id: "opencode-go/glm-5.3-flash",
1004
+ name: "GLM-5.3-Flash",
1005
+ provider: "opencode-go",
1006
+ contextWindow: 1e6,
1007
+ maxOutputTokens: 131072,
1008
+ supportsThinking: true,
1009
+ supportsImages: true,
1010
+ supportsVideo: false,
1011
+ costTier: "low",
1012
+ maxThinkingLevel: "max",
1013
+ thinkingLevels: ["low", "high", "max"]
1014
+ },
1015
+ {
1016
+ id: "opencode/kimi-k3",
1017
+ name: "Kimi K3",
1018
+ provider: "opencode",
1019
+ contextWindow: 1048576,
1020
+ maxOutputTokens: 131072,
1021
+ supportsThinking: true,
1022
+ supportsImages: true,
1023
+ supportsVideo: false,
1024
+ costTier: "high",
1025
+ maxThinkingLevel: "max",
1026
+ thinkingLevels: ["low", "high", "max"]
1027
+ },
1028
+ {
1029
+ id: "opencode/glm-5.3",
1030
+ name: "GLM-5.3",
1031
+ provider: "opencode",
1032
+ contextWindow: 1e6,
1033
+ maxOutputTokens: 131072,
1034
+ supportsThinking: true,
1035
+ supportsImages: false,
1036
+ supportsVideo: false,
1037
+ costTier: "medium",
1038
+ maxThinkingLevel: "max",
1039
+ thinkingLevels: ["low", "high", "max"]
1040
+ },
1041
+ {
1042
+ id: "opencode/glm-5.3-flash",
1043
+ name: "GLM-5.3-Flash",
1044
+ provider: "opencode",
1045
+ contextWindow: 1e6,
1046
+ maxOutputTokens: 131072,
1047
+ supportsThinking: true,
1048
+ supportsImages: true,
1049
+ supportsVideo: false,
1050
+ costTier: "low",
1051
+ maxThinkingLevel: "max",
1052
+ thinkingLevels: ["low", "high", "max"]
1053
+ },
907
1054
  // ── Hugging Face (Inference Providers router) ────────
908
1055
  // One HF token (hf.co/settings/tokens, "Make calls to Inference Providers"
909
1056
  // permission) routes to whichever hosted backend serves each open model;
@@ -1054,13 +1201,15 @@ function getVideoByteLimit(modelId) {
1054
1201
  }
1055
1202
  var DEFAULT_MODEL_IDS = {
1056
1203
  xiaomi: "mimo-v2.6-pro",
1057
- openai: "gpt-6.1-sol",
1204
+ openai: "gpt-6.2-sol",
1058
1205
  gemini: "gemini-3.1-flash-lite",
1059
1206
  glm: "glm-5.3",
1060
1207
  moonshot: "kimi-k3",
1061
1208
  minimax: "MiniMax-M3.1-Flash",
1062
1209
  deepseek: "deepseek-v4-pro",
1063
1210
  huggingface: "moonshotai/Kimi-K2.7-Code",
1211
+ opencode: "opencode/kimi-k3",
1212
+ "opencode-go": "opencode-go/kimi-k3",
1064
1213
  openrouter: "qwen/qwen3.8-max",
1065
1214
  sakana: "fugu",
1066
1215
  xai: "grok-4.7"