@blockrun/clawrouter 0.12.257 → 0.12.259

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.js CHANGED
@@ -81,22 +81,29 @@ var init_top_models = __esm({
81
81
  "xai/grok-4.5",
82
82
  "xai/grok-4.3",
83
83
  "xai/grok-build-0.1",
84
+ "zai/glm-5.3",
85
+ "zai/glm-5.3-flash",
84
86
  "zai/glm-5.2",
85
87
  "zai/glm-5.1",
86
88
  "zai/glm-5-turbo",
87
89
  "zai/glm-5",
90
+ "xiaomi/mimo-v2.5",
88
91
  "minimax/minimax-m3",
89
92
  "minimax/minimax-m2.7",
90
93
  "moonshot/kimi-k3",
91
94
  "qwen/qwen3.7-max",
95
+ "qwen/qwen3.8-flash",
96
+ "deepseek/deepseek-v4-flash-vision-exp",
92
97
  "deepseek/deepseek-v4-pro",
93
98
  "deepseek/deepseek-chat",
94
99
  "deepseek/deepseek-reasoner",
100
+ "free/nemotron-3.5-lightning",
101
+ "free/nemotron-3-nano-30b",
102
+ "free/laguna-xs-2.1",
103
+ "free/north-mini-code",
95
104
  "free/nemotron-3-nano-omni-30b-a3b-reasoning",
96
- "free/mistral-nemotron",
97
- "free/step-3.7-flash",
98
- "free/nemotron-nano-9b-v2",
99
- "free/nemotron-nano-12b-v2-vl"
105
+ "free/nemotron-3-ultra-550b",
106
+ "free/llama-3.2-11b-vision"
100
107
  ];
101
108
  }
102
109
  });
@@ -348,6 +355,19 @@ var init_models = __esm({
348
355
  // `kimi` on K2.7. (`grok` WAS promoted to 4.5, but only after the cost
349
356
  // tradeoff was argued explicitly; there's no such case for qwen yet.)
350
357
  "qwen3.7-max": "qwen/qwen3.7-max",
358
+ // Qwen3.8 Flash — newer generation than the whole 3.7 line, and cheaper than
359
+ // the 3.7-plus tier it beats. Bare `qwen` stays UNBOUND (every other qwen*
360
+ // shorthand resolves to a free model, so binding the short name to a paid
361
+ // flagship would bill callers expecting free).
362
+ "qwen3.8-flash": "qwen/qwen3.8-flash",
363
+ "qwen3-8-flash": "qwen/qwen3.8-flash",
364
+ "qwen-vision": "qwen/qwen3.8-flash",
365
+ // DeepSeek's first image-capable SKU. Bare `deepseek` stays on deepseek-chat.
366
+ "deepseek-vision": "deepseek/deepseek-v4-flash-vision-exp",
367
+ "v4-flash-vision": "deepseek/deepseek-v4-flash-vision-exp",
368
+ // Xiaomi MiMo V2.5 — the natively multimodal SKU, distinct from mimo-v2.5-pro
369
+ // (text-only upstream). `mimo` stays on the Pro entry it has always named.
370
+ "mimo-vision": "xiaomi/mimo-v2.5",
351
371
  "qwen-3.7-max": "qwen/qwen3.7-max",
352
372
  "qwen3-7-max": "qwen/qwen3.7-max",
353
373
  // Plus/Flash tiers (2026-08-03) — explicit pins, same rule as Max.
@@ -362,7 +382,15 @@ var init_models = __esm({
362
382
  hunyuan: "tencent/hy3",
363
383
  mimo: "xiaomi/mimo-v2.5-pro",
364
384
  "mimo-v2.5-pro": "xiaomi/mimo-v2.5-pro",
365
- "mimo-v2.5": "xiaomi/mimo-v2.5-pro",
385
+ // RETARGETED 2026-08-30, Pro -> the real thing. This key used to point at
386
+ // `xiaomi/mimo-v2.5-pro`, which was harmless while no model owned the name —
387
+ // but blockrun then listed an actual `xiaomi/mimo-v2.5`, a DIFFERENT and
388
+ // natively-multimodal SKU at $0.14/$0.28 against Pro's $0.435/$0.87. Leaving
389
+ // it would have billed 3x for the text-only model when the caller named the
390
+ // cheaper multimodal one. (The key itself is safe: it is not equal to the
391
+ // catalog id, so it shadows nothing — the rule that bans `opus-5`-style keys
392
+ // does not apply to a bare shorthand.)
393
+ "mimo-v2.5": "xiaomi/mimo-v2.5",
366
394
  xiaomi: "xiaomi/mimo-v2.5-pro",
367
395
  // Google
368
396
  // gemini-3-pro-preview delisted by Google 2026-06-06 — mirror the gateway
@@ -409,14 +437,20 @@ var init_models = __esm({
409
437
  "xai/grok-3-fast": "xai/grok-4-fast-reasoning",
410
438
  // delisted (too expensive)
411
439
  // NVIDIA — backward compat aliases (nvidia/xxx → free/xxx)
412
- // Default free model is step-3.7-flash — the same model @blockrun/router-core
413
- // opens the eco SIMPLE tier on. It replaced gpt-oss-120b on 2026-08-29:
414
- // gpt-oss-120b went dead upstream on 2026-08-16 (NVIDIA still LISTS it, but a
415
- // completion hangs until the client gives up — blockrun #391 retargeted its
416
- // whole free cascade off it, and the gateway now answers 400 Unknown model
417
- // for the `free/` id). Pins that NAME gpt-oss stay routable below — the
418
- // gateway server-redirects them — but nothing generic may land on it.
419
- nvidia: "free/step-3.7-flash",
440
+ // Default free model is nemotron-3.5-lightning — the same model
441
+ // @blockrun/router-core opens the eco SIMPLE tier on. It replaced
442
+ // step-3.7-flash on 2026-08-30, when NVIDIA retired FOUR of the five visible
443
+ // free models in a single sweep (blockrun #448): step-3.7-flash,
444
+ // nemotron-nano-9b-v2 and nemotron-nano-12b-v2-vl all published 410 Gone, and
445
+ // mistral-nemotron went the quiet way — still listed, >150s and zero bytes.
446
+ // We follow blockrun's own retarget of step-3.7-flash rather than picking a
447
+ // different survivor, so the proxy and the gateway name the same model.
448
+ //
449
+ // gpt-oss-120b/20b RECOVERED on the same probe run and are reachable again,
450
+ // but they stay withheld from blockrun's public catalog over NVIDIA's
451
+ // prompt-retention terms — so pins that NAME gpt-oss stay routable below and
452
+ // nothing generic may land on it.
453
+ nvidia: "free/nemotron-3.5-lightning",
420
454
  "gpt-120b": "free/gpt-oss-120b",
421
455
  // names the model itself — gateway redirects
422
456
  "gpt-20b": "free/gpt-oss-20b",
@@ -429,10 +463,10 @@ var init_models = __esm({
429
463
  // straight to gpt-oss-120b. Ids naming v4-flash itself keep the real id (the
430
464
  // gateway redirects them); the v3.2/v4-pro ids follow blockrun's retarget
431
465
  // rather than chaining through a second dead model.
432
- "nvidia/deepseek-v3.2": "free/gpt-oss-120b",
433
- "free/deepseek-v3.2": "free/gpt-oss-120b",
434
- "nvidia/deepseek-v4-pro": "free/gpt-oss-120b",
435
- "free/deepseek-v4-pro": "free/gpt-oss-120b",
466
+ "nvidia/deepseek-v3.2": "free/nemotron-3.5-lightning",
467
+ "free/deepseek-v3.2": "free/nemotron-3.5-lightning",
468
+ "nvidia/deepseek-v4-pro": "free/nemotron-3.5-lightning",
469
+ "free/deepseek-v4-pro": "free/nemotron-3.5-lightning",
436
470
  "nvidia/deepseek-v4-flash": "free/deepseek-v4-flash",
437
471
  "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
438
472
  // qwen3-coder-480b retired (NVIDIA EOL 2026-06-14). Its server-side redirect used
@@ -459,16 +493,16 @@ var init_models = __esm({
459
493
  // Retired free IDs → successors (mirror blockrun's 2026-07-17 redirect map:
460
494
  // ultra-253b redirects to gpt-oss-120b; the two supers have NO server redirect —
461
495
  // they stay hidden-but-routable, so their pins pass through to the real ids).
462
- "nvidia/nemotron-ultra-253b": "free/gpt-oss-120b",
496
+ "nvidia/nemotron-ultra-253b": "free/nemotron-3.5-lightning",
463
497
  // mistral-large-3-675b un-retired 2026-06-14, then EOL'd for good 2026-07-28:
464
498
  // blockrun's re-probe got HTTP 410 Gone from NVIDIA on both passes (baa967b).
465
499
  // Pin stays routable — the gateway redirects it to gpt-oss-120b.
466
500
  "nvidia/mistral-large-3-675b": "free/mistral-large-3-675b",
467
501
  "nvidia/qwen3.5-122b-a10b": "free/qwen3.5-122b-a10b",
468
502
  // devstral-2-123b died upstream; blockrun redirects it to gpt-oss-120b (2026-07-17 map)
469
- "nvidia/devstral-2-123b": "free/gpt-oss-120b",
470
- "free/nemotron-ultra-253b": "free/gpt-oss-120b",
471
- "free/devstral-2-123b": "free/gpt-oss-120b",
503
+ "nvidia/devstral-2-123b": "free/nemotron-3.5-lightning",
504
+ "free/nemotron-ultra-253b": "free/nemotron-3.5-lightning",
505
+ "free/devstral-2-123b": "free/nemotron-3.5-lightning",
472
506
  // Explicit-ish pins — dead upstream since 2026-07-28, gateway redirects to gpt-oss-120b
473
507
  "mistral-large": "free/mistral-large-3-675b",
474
508
  "mistral-large-3-675b": "free/mistral-large-3-675b",
@@ -479,74 +513,128 @@ var init_models = __esm({
479
513
  // gateway's retarget (blockrun's /free-deepseek page points at gpt-oss-120b
480
514
  // too). Shorthands naming v4-flash itself stay on the real id — the gateway
481
515
  // redirects them, same treatment as seed-oss/mistral-large pins.
482
- "deepseek-free": "free/gpt-oss-120b",
483
- "deepseek-v4-pro": "free/gpt-oss-120b",
516
+ "deepseek-free": "free/nemotron-3.5-lightning",
517
+ "deepseek-v4-pro": "free/nemotron-3.5-lightning",
484
518
  // free shorthand; pro dead upstream (410)
485
519
  "deepseek-v4-flash": "free/deepseek-v4-flash",
486
- "v4-pro": "free/gpt-oss-120b",
520
+ "v4-pro": "free/nemotron-3.5-lightning",
487
521
  "v4-flash": "free/deepseek-v4-flash",
488
- "mistral-free": "free/mistral-nemotron",
489
- // mistral-large-3-675b EOL'd 2026-07-28 → last live free Mistral (blockrun demoted its /free-mistral primary the same way)
490
- "glm-free": "free/gpt-oss-120b",
522
+ // mistral-nemotron died 2026-08-30 and it was the LAST free Mistral anywhere —
523
+ // blockrun's own /free-mistral page now says so plainly instead of naming one.
524
+ // Point the generic shorthand at the free default rather than advertise a
525
+ // Mistral we cannot serve.
526
+ "mistral-free": "free/nemotron-3.5-lightning",
527
+ "glm-free": "free/nemotron-3.5-lightning",
491
528
  // seed-oss-36b (the prior target) EOL'd 2026-08-03
492
- "llama-free": "free/gpt-oss-120b",
493
- // no live free Llama left (maverick died 2026-07)
529
+ // A free Llama exists again: nemotron-super-49b (Llama-3.3-based) hit 410 on
530
+ // 2026-08-30, and a 12-model sweep of what NVIDIA still serves found Llama 3.2
531
+ // 11B Vision as the only one that finishes a real completion.
532
+ "llama-free": "free/llama-3.2-11b-vision",
494
533
  // qwen3-coder-480b retired 2026-06-14 → seed-oss-36b, which then EOL'd 2026-08-03.
495
534
  // Follow the gateway's own retarget rather than chaining to a second dead model.
496
- "qwen-coder": "free/step-3.7-flash",
535
+ "qwen-coder": "free/nemotron-3.5-lightning",
497
536
  // no live free Qwen; follows the free default
498
- "qwen-coder-free": "free/step-3.7-flash",
499
- "qwen-thinking": "free/step-3.7-flash",
537
+ "qwen-coder-free": "free/nemotron-3.5-lightning",
538
+ "qwen-thinking": "free/nemotron-3.5-lightning",
500
539
  // qwen3-next died 2026-07-17; no live free Qwen left
501
540
  "qwen3-next": "free/qwen3-next-80b-a3b-instruct",
502
541
  // explicit-ish pin — gateway redirects
503
542
  "qwen3-next-80b": "free/qwen3-next-80b-a3b-instruct",
504
- "mistral-small": "free/mistral-nemotron",
505
- // closest live Mistral-family free model
543
+ "mistral-small": "free/nemotron-3.5-lightning",
544
+ // no free Mistral left upstream (2026-08-30)
506
545
  // New live free models (2026-06-14 BlockRun free-tier refresh)
507
546
  // seed-oss pins name the model itself — kept routable, the gateway redirects them.
508
547
  "seed-oss": "free/seed-oss-36b",
509
548
  "seed-oss-36b": "free/seed-oss-36b",
510
- "coder-free": "free/step-3.7-flash",
511
- // generic "a free coder" → follows the free default
549
+ // A free coder exists again — two of them, both sub-second. north-mini-code is
550
+ // the faster (607ms median) and 256K ctx against laguna's 131K.
551
+ "coder-free": "free/north-mini-code",
512
552
  "mistral-nemotron": "free/mistral-nemotron",
513
553
  "step-flash": "free/step-3.7-flash",
514
554
  "step-3.7-flash": "free/step-3.7-flash",
515
- "nemotron-nano-9b": "free/nemotron-nano-9b-v2",
516
- "nemotron-nano": "free/nemotron-nano-9b-v2",
517
- "nemotron-nano-vl": "free/nemotron-nano-12b-v2-vl",
518
- "nano-vl": "free/nemotron-nano-12b-v2-vl",
555
+ // nemotron-nano-9b-v2 hit 410 on 2026-08-30; the generic shorthands follow
556
+ // blockrun's redirect to its replacement, while the 9b-naming pins above stay
557
+ // on the real id (the gateway resolves them).
558
+ "nemotron-nano-9b": "free/nemotron-3-nano-30b",
559
+ "nemotron-nano": "free/nemotron-3-nano-30b",
560
+ // nemotron-nano-12b-v2-vl hit 410 the same day; vision in, vision out — the
561
+ // target is blockrun's own, and nano-omni is the only vision-capable free
562
+ // model left.
563
+ "nemotron-nano-vl": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
564
+ "nano-vl": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
519
565
  // Vision-capable free models
520
566
  "nemotron-omni": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
521
567
  "nano-omni": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
568
+ // `vision-free` kept for backward compatibility ONLY — it still resolves to
569
+ // nano-omni, which is the strongest free model, but the free tier no longer
570
+ // claims working image input on either chain (see the catalog note). Do not
571
+ // advertise this alias as a way to get free vision.
522
572
  "vision-free": "free/nemotron-3-nano-omni-30b-a3b-reasoning",
523
573
  // Retired shorthand aliases redirect to live successors. The catch-all target
524
574
  // moved llama-4-maverick → gpt-oss-120b (2026-07-17) → step-3.7-flash
525
- // (2026-08-29, gpt-oss-120b hung upstream; see the NVIDIA block above).
526
- nemotron: "free/nemotron-3-nano-omni-30b-a3b-reasoning",
575
+ // (2026-08-29) → nemotron-3.5-lightning (2026-08-30, blockrun #448).
576
+ nemotron: "free/nemotron-3.5-lightning",
527
577
  // strongest live Nemotron
528
- "nemotron-ultra": "free/step-3.7-flash",
529
- "nemotron-253b": "free/step-3.7-flash",
530
- "nemotron-super": "free/step-3.7-flash",
531
- "nemotron-49b": "free/step-3.7-flash",
532
- "nemotron-120b": "free/step-3.7-flash",
533
- devstral: "free/step-3.7-flash",
578
+ "nemotron-ultra": "free/nemotron-3.5-lightning",
579
+ "nemotron-253b": "free/nemotron-3.5-lightning",
580
+ "nemotron-super": "free/nemotron-3.5-lightning",
581
+ "nemotron-49b": "free/nemotron-3.5-lightning",
582
+ "nemotron-120b": "free/nemotron-3.5-lightning",
583
+ devstral: "free/nemotron-3.5-lightning",
534
584
  // seed-oss-36b EOL'd 2026-08-03
535
- "devstral-2": "free/step-3.7-flash",
585
+ "devstral-2": "free/nemotron-3.5-lightning",
536
586
  maverick: "free/llama-4-maverick",
537
587
  // explicit-ish pin — gateway redirects
588
+ // ── The 2026-08-30 free lineup (blockrun #448) ────────────────────────────
589
+ // nvidia/* bridges for the four NVIDIA-hosted additions.
590
+ "nvidia/nemotron-3.5-lightning": "free/nemotron-3.5-lightning",
591
+ "nvidia/nemotron-3-nano-30b": "free/nemotron-3-nano-30b",
592
+ "nvidia/nemotron-3-ultra-550b": "free/nemotron-3-ultra-550b",
593
+ "nvidia/llama-3.2-11b-vision": "free/llama-3.2-11b-vision",
594
+ // The two non-NVIDIA free models keep the `free/` picker convention; their
595
+ // real upstream ids are accepted as pins and rewritten in toUpstreamModelId
596
+ // (see FREE_UPSTREAM_OVERRIDES in proxy.ts).
597
+ "cohere/north-mini-code": "free/north-mini-code",
598
+ "poolside/laguna-xs-2.1": "free/laguna-xs-2.1",
599
+ // Shorthands.
600
+ lightning: "free/nemotron-3.5-lightning",
601
+ "nemotron-lightning": "free/nemotron-3.5-lightning",
602
+ "nemotron-3.5-lightning": "free/nemotron-3.5-lightning",
603
+ "nano-30b": "free/nemotron-3-nano-30b",
604
+ "nemotron-nano-30b": "free/nemotron-3-nano-30b",
605
+ "ultra-550b": "free/nemotron-3-ultra-550b",
606
+ "nemotron-ultra-550b": "free/nemotron-3-ultra-550b",
607
+ "llama-vision": "free/llama-3.2-11b-vision",
608
+ "llama-3.2-vision": "free/llama-3.2-11b-vision",
609
+ "north-mini": "free/north-mini-code",
610
+ "north-mini-code": "free/north-mini-code",
611
+ laguna: "free/laguna-xs-2.1",
612
+ "laguna-xs": "free/laguna-xs-2.1",
538
613
  // `free` = the free-tier default. Must equal router-core's ecoTiers.SIMPLE
539
614
  // primary and the head of proxy.ts FREE_MODELS so `/model free`, the eco
540
615
  // profile and the budget-cap free fallback all agree on one live model.
541
- free: "free/step-3.7-flash",
616
+ free: "free/nemotron-3.5-lightning",
542
617
  // MiniMax (minimax → current flagship: M3)
543
618
  minimax: "minimax/minimax-m3",
544
619
  "minimax-m3": "minimax/minimax-m3",
545
620
  "minimax-m2.7": "minimax/minimax-m2.7",
546
621
  "minimax-m2.5": "minimax/minimax-m2.5",
547
622
  // Z.AI GLM-5
548
- glm: "zai/glm-5.2",
549
- // bare alias tracks newest flagship (launched 2026-06-16)
623
+ // Bare `glm` PROMOTED 5.2 → 5.3 (2026-08-30). Same rule as `opus` 4.8 → 5: the
624
+ // cost tradeoff is zero — identical $1.40/$4.40 AND an identical 1M ctx /
625
+ // 131072 maxOutput envelope, so nothing can bill or truncate differently for a
626
+ // caller who never typed a version. blockrun's own copy already names glm-5.3
627
+ // the Z.AI flagship, so leaving `glm` on 5.2 would make the proxy disagree
628
+ // with the gateway it fronts. `glm-5.2` and every other version pin still
629
+ // resolve to their own model.
630
+ glm: "zai/glm-5.3",
631
+ "glm-5.3": "zai/glm-5.3",
632
+ "glm-5-3": "zai/glm-5.3",
633
+ // GLM-5.3 Flash — Z.AI's first natively multimodal GLM-5. Also router-core's
634
+ // eco MEDIUM and COMPLEX primary.
635
+ "glm-5.3-flash": "zai/glm-5.3-flash",
636
+ "glm-5-3-flash": "zai/glm-5.3-flash",
637
+ "glm-flash": "zai/glm-5.3-flash",
550
638
  "glm-5.2": "zai/glm-5.2",
551
639
  "glm-5": "zai/glm-5",
552
640
  "glm-5.1": "zai/glm-5.1",
@@ -608,10 +696,10 @@ var init_models = __esm({
608
696
  },
609
697
  {
610
698
  id: "free",
611
- name: "Free \u2192 Step 3.7 Flash",
699
+ name: "Free \u2192 Nemotron 3.5 Lightning",
612
700
  inputPrice: 0,
613
701
  outputPrice: 0,
614
- contextWindow: 131072,
702
+ contextWindow: 1e6,
615
703
  maxOutput: 16384,
616
704
  reasoning: true
617
705
  },
@@ -652,7 +740,7 @@ var init_models = __esm({
652
740
  inputPrice: 0.25,
653
741
  outputPrice: 2,
654
742
  contextWindow: 2e5,
655
- maxOutput: 65536,
743
+ maxOutput: 128e3,
656
744
  toolCalling: true
657
745
  },
658
746
  {
@@ -662,7 +750,7 @@ var init_models = __esm({
662
750
  inputPrice: 0.05,
663
751
  outputPrice: 0.4,
664
752
  contextWindow: 128e3,
665
- maxOutput: 32768,
753
+ maxOutput: 128e3,
666
754
  toolCalling: true,
667
755
  deprecated: true,
668
756
  fallbackModel: "openai/gpt-5.4-nano"
@@ -746,8 +834,8 @@ var init_models = __esm({
746
834
  id: "openai/gpt-5.6-terra-pro",
747
835
  name: "GPT-5.6 Terra Pro",
748
836
  version: "5.6",
749
- inputPrice: 1,
750
- outputPrice: 6,
837
+ inputPrice: 2,
838
+ outputPrice: 12,
751
839
  contextWindow: 105e4,
752
840
  maxOutput: 128e3,
753
841
  reasoning: true,
@@ -759,8 +847,8 @@ var init_models = __esm({
759
847
  id: "openai/gpt-5.6-luna-pro",
760
848
  name: "GPT-5.6 Luna Pro",
761
849
  version: "5.6",
762
- inputPrice: 0.1,
763
- outputPrice: 0.6,
850
+ inputPrice: 0.2,
851
+ outputPrice: 1.2,
764
852
  contextWindow: 105e4,
765
853
  maxOutput: 128e3,
766
854
  reasoning: true,
@@ -823,7 +911,7 @@ var init_models = __esm({
823
911
  version: "5.4",
824
912
  inputPrice: 2.5,
825
913
  outputPrice: 15,
826
- contextWindow: 4e5,
914
+ contextWindow: 105e4,
827
915
  maxOutput: 128e3,
828
916
  reasoning: true,
829
917
  vision: true,
@@ -848,7 +936,7 @@ var init_models = __esm({
848
936
  version: "5.4",
849
937
  inputPrice: 30,
850
938
  outputPrice: 180,
851
- contextWindow: 4e5,
939
+ contextWindow: 105e4,
852
940
  maxOutput: 128e3,
853
941
  reasoning: true,
854
942
  vision: true,
@@ -861,7 +949,7 @@ var init_models = __esm({
861
949
  inputPrice: 0.2,
862
950
  outputPrice: 1.25,
863
951
  contextWindow: 105e4,
864
- maxOutput: 32768,
952
+ maxOutput: 128e3,
865
953
  toolCalling: true
866
954
  },
867
955
  // OpenAI GPT-5.3 Family
@@ -872,7 +960,7 @@ var init_models = __esm({
872
960
  inputPrice: 1.75,
873
961
  outputPrice: 14,
874
962
  contextWindow: 128e3,
875
- maxOutput: 16e3,
963
+ maxOutput: 128e3,
876
964
  reasoning: true,
877
965
  vision: true,
878
966
  agentic: true,
@@ -898,7 +986,7 @@ var init_models = __esm({
898
986
  inputPrice: 2,
899
987
  outputPrice: 8,
900
988
  contextWindow: 128e3,
901
- maxOutput: 16384,
989
+ maxOutput: 32768,
902
990
  vision: true,
903
991
  toolCalling: true
904
992
  },
@@ -909,7 +997,7 @@ var init_models = __esm({
909
997
  inputPrice: 0.4,
910
998
  outputPrice: 1.6,
911
999
  contextWindow: 128e3,
912
- maxOutput: 16384,
1000
+ maxOutput: 32768,
913
1001
  toolCalling: true
914
1002
  },
915
1003
  {
@@ -919,7 +1007,7 @@ var init_models = __esm({
919
1007
  inputPrice: 0.1,
920
1008
  outputPrice: 0.4,
921
1009
  contextWindow: 128e3,
922
- maxOutput: 16384,
1010
+ maxOutput: 32768,
923
1011
  toolCalling: true
924
1012
  },
925
1013
  {
@@ -985,7 +1073,7 @@ var init_models = __esm({
985
1073
  inputPrice: 1.1,
986
1074
  outputPrice: 4.4,
987
1075
  contextWindow: 128e3,
988
- maxOutput: 65536,
1076
+ maxOutput: 1e5,
989
1077
  reasoning: true,
990
1078
  toolCalling: true
991
1079
  },
@@ -996,7 +1084,7 @@ var init_models = __esm({
996
1084
  inputPrice: 1.1,
997
1085
  outputPrice: 4.4,
998
1086
  contextWindow: 128e3,
999
- maxOutput: 65536,
1087
+ maxOutput: 1e5,
1000
1088
  reasoning: true,
1001
1089
  toolCalling: true
1002
1090
  },
@@ -1009,7 +1097,7 @@ var init_models = __esm({
1009
1097
  inputPrice: 1,
1010
1098
  outputPrice: 5,
1011
1099
  contextWindow: 2e5,
1012
- maxOutput: 8192,
1100
+ maxOutput: 64e3,
1013
1101
  vision: true,
1014
1102
  agentic: true,
1015
1103
  toolCalling: true
@@ -1033,8 +1121,8 @@ var init_models = __esm({
1033
1121
  version: "4.6",
1034
1122
  inputPrice: 3,
1035
1123
  outputPrice: 15,
1036
- contextWindow: 2e5,
1037
- maxOutput: 64e3,
1124
+ contextWindow: 1e6,
1125
+ maxOutput: 128e3,
1038
1126
  reasoning: true,
1039
1127
  vision: true,
1040
1128
  agentic: true,
@@ -1064,7 +1152,7 @@ var init_models = __esm({
1064
1152
  inputPrice: 5,
1065
1153
  outputPrice: 25,
1066
1154
  contextWindow: 2e5,
1067
- maxOutput: 32e3,
1155
+ maxOutput: 64e3,
1068
1156
  reasoning: true,
1069
1157
  vision: true,
1070
1158
  agentic: true,
@@ -1148,7 +1236,7 @@ var init_models = __esm({
1148
1236
  version: "3.1",
1149
1237
  inputPrice: 2,
1150
1238
  outputPrice: 12,
1151
- contextWindow: 105e4,
1239
+ contextWindow: 1048576,
1152
1240
  maxOutput: 65536,
1153
1241
  reasoning: true,
1154
1242
  vision: true,
@@ -1160,7 +1248,7 @@ var init_models = __esm({
1160
1248
  version: "3.0",
1161
1249
  inputPrice: 2,
1162
1250
  outputPrice: 12,
1163
- contextWindow: 105e4,
1251
+ contextWindow: 1048576,
1164
1252
  maxOutput: 65536,
1165
1253
  reasoning: true,
1166
1254
  vision: true,
@@ -1212,7 +1300,7 @@ var init_models = __esm({
1212
1300
  version: "3.0",
1213
1301
  inputPrice: 0.5,
1214
1302
  outputPrice: 3,
1215
- contextWindow: 1e6,
1303
+ contextWindow: 1048576,
1216
1304
  maxOutput: 65536,
1217
1305
  reasoning: true,
1218
1306
  vision: true
@@ -1223,7 +1311,7 @@ var init_models = __esm({
1223
1311
  version: "2.5",
1224
1312
  inputPrice: 1.25,
1225
1313
  outputPrice: 10,
1226
- contextWindow: 105e4,
1314
+ contextWindow: 1048576,
1227
1315
  maxOutput: 65536,
1228
1316
  reasoning: true,
1229
1317
  vision: true,
@@ -1235,7 +1323,7 @@ var init_models = __esm({
1235
1323
  version: "2.5",
1236
1324
  inputPrice: 0.3,
1237
1325
  outputPrice: 2.5,
1238
- contextWindow: 1e6,
1326
+ contextWindow: 1048576,
1239
1327
  maxOutput: 65536,
1240
1328
  vision: true,
1241
1329
  toolCalling: true
@@ -1246,7 +1334,7 @@ var init_models = __esm({
1246
1334
  version: "2.5",
1247
1335
  inputPrice: 0.1,
1248
1336
  outputPrice: 0.4,
1249
- contextWindow: 1e6,
1337
+ contextWindow: 1048576,
1250
1338
  maxOutput: 65536,
1251
1339
  toolCalling: true
1252
1340
  },
@@ -1256,8 +1344,8 @@ var init_models = __esm({
1256
1344
  version: "3.1",
1257
1345
  inputPrice: 0.25,
1258
1346
  outputPrice: 1.5,
1259
- contextWindow: 1e6,
1260
- maxOutput: 8192,
1347
+ contextWindow: 1048576,
1348
+ maxOutput: 65536,
1261
1349
  toolCalling: true
1262
1350
  },
1263
1351
  // DeepSeek — V4 family (2026-04-24). The legacy deepseek-chat/reasoner
@@ -1270,8 +1358,8 @@ var init_models = __esm({
1270
1358
  version: "4-flash",
1271
1359
  inputPrice: 0.14,
1272
1360
  outputPrice: 0.28,
1273
- contextWindow: 1e6,
1274
- maxOutput: 8192,
1361
+ contextWindow: 1048576,
1362
+ maxOutput: 65536,
1275
1363
  toolCalling: true
1276
1364
  },
1277
1365
  {
@@ -1280,8 +1368,8 @@ var init_models = __esm({
1280
1368
  version: "4-flash",
1281
1369
  inputPrice: 0.14,
1282
1370
  outputPrice: 0.28,
1283
- contextWindow: 1e6,
1284
- maxOutput: 8192,
1371
+ contextWindow: 1048576,
1372
+ maxOutput: 65536,
1285
1373
  reasoning: true,
1286
1374
  toolCalling: true
1287
1375
  },
@@ -1293,8 +1381,8 @@ var init_models = __esm({
1293
1381
  id: "deepseek/deepseek-v4-pro",
1294
1382
  name: "DeepSeek V4 Pro",
1295
1383
  version: "4-pro",
1296
- inputPrice: 0.435,
1297
- outputPrice: 0.87,
1384
+ inputPrice: 1.32,
1385
+ outputPrice: 3.96,
1298
1386
  contextWindow: 1048576,
1299
1387
  maxOutput: 65536,
1300
1388
  reasoning: true,
@@ -1407,7 +1495,7 @@ var init_models = __esm({
1407
1495
  inputPrice: 0.6,
1408
1496
  outputPrice: 3,
1409
1497
  contextWindow: 262144,
1410
- maxOutput: 16384,
1498
+ maxOutput: 65536,
1411
1499
  reasoning: true,
1412
1500
  vision: true,
1413
1501
  agentic: true,
@@ -1420,7 +1508,7 @@ var init_models = __esm({
1420
1508
  inputPrice: 0.6,
1421
1509
  outputPrice: 3,
1422
1510
  contextWindow: 262144,
1423
- maxOutput: 8192,
1511
+ maxOutput: 16384,
1424
1512
  reasoning: true,
1425
1513
  vision: true,
1426
1514
  agentic: true,
@@ -1458,7 +1546,7 @@ var init_models = __esm({
1458
1546
  version: "4",
1459
1547
  inputPrice: 0.2,
1460
1548
  outputPrice: 0.5,
1461
- contextWindow: 131072,
1549
+ contextWindow: 2e6,
1462
1550
  maxOutput: 16384,
1463
1551
  reasoning: true,
1464
1552
  toolCalling: true
@@ -1469,7 +1557,7 @@ var init_models = __esm({
1469
1557
  version: "4",
1470
1558
  inputPrice: 0.2,
1471
1559
  outputPrice: 0.5,
1472
- contextWindow: 131072,
1560
+ contextWindow: 2e6,
1473
1561
  maxOutput: 16384,
1474
1562
  toolCalling: true
1475
1563
  },
@@ -1479,7 +1567,7 @@ var init_models = __esm({
1479
1567
  version: "4.1",
1480
1568
  inputPrice: 0.2,
1481
1569
  outputPrice: 0.5,
1482
- contextWindow: 131072,
1570
+ contextWindow: 2e6,
1483
1571
  maxOutput: 16384,
1484
1572
  reasoning: true,
1485
1573
  toolCalling: true
@@ -1490,7 +1578,7 @@ var init_models = __esm({
1490
1578
  version: "4.1",
1491
1579
  inputPrice: 0.2,
1492
1580
  outputPrice: 0.5,
1493
- contextWindow: 131072,
1581
+ contextWindow: 2e6,
1494
1582
  maxOutput: 16384,
1495
1583
  toolCalling: true
1496
1584
  },
@@ -1502,7 +1590,7 @@ var init_models = __esm({
1502
1590
  version: "4-0709",
1503
1591
  inputPrice: 3,
1504
1592
  outputPrice: 15,
1505
- contextWindow: 131072,
1593
+ contextWindow: 256e3,
1506
1594
  maxOutput: 16384,
1507
1595
  reasoning: true,
1508
1596
  toolCalling: true
@@ -1513,7 +1601,7 @@ var init_models = __esm({
1513
1601
  version: "2",
1514
1602
  inputPrice: 2,
1515
1603
  outputPrice: 10,
1516
- contextWindow: 131072,
1604
+ contextWindow: 32768,
1517
1605
  maxOutput: 16384,
1518
1606
  vision: true,
1519
1607
  toolCalling: true
@@ -1752,8 +1840,21 @@ var init_models = __esm({
1752
1840
  outputPrice: 0,
1753
1841
  contextWindow: 256e3,
1754
1842
  maxOutput: 16384,
1755
- reasoning: true,
1756
- vision: true
1843
+ reasoning: true
1844
+ // NO `vision: true` — 2026-08-31. Both catalogs advertise vision on this
1845
+ // model and blockrun #448 cites an 8x8 PNG answering "Red", but a 64x64
1846
+ // solid-red probe does not hold up: 1 of 4 correct on Base (the others
1847
+ // "I'm not able to view the image" or leaked reasoning), and on sol it
1848
+ // answered "white" twice, once with the response's own `model` field
1849
+ // reading `nemotron-3-super-120b (fallback: ...nano-omni)` — the image is
1850
+ // silently dropped and a text model answers.
1851
+ //
1852
+ // `vision: true` is what makes filterByVision() route real image turns
1853
+ // here, so the flag does not merely describe the model, it aims traffic at
1854
+ // it. HTTP 200 with a confident wrong colour is worse than no free vision:
1855
+ // there is no error for a caller to branch on. Image turns go to paid
1856
+ // vision models until a correctly-sized probe comes back right on both
1857
+ // chains. Independently confirmed on Solana by the blockrun-sol owner.
1757
1858
  },
1758
1859
  // 2026-06-14: BlockRun re-featured these two as free flagships (catalog sweep).
1759
1860
  // Added to the auto-pick set behind gpt-oss to strengthen the mid/back of the
@@ -1818,7 +1919,13 @@ var init_models = __esm({
1818
1919
  maxOutput: 16384
1819
1920
  },
1820
1921
  {
1821
- // Mistral × NVIDIA hybrid: strong instruction following, 131K context.
1922
+ // Mistral × NVIDIA hybrid, 131K context. DEAD 2026-08-30 — the QUIET kind:
1923
+ // NVIDIA still LISTS it but a completion returns zero bytes after >150s on
1924
+ // both of blockrun's probe passes (blockrun #448, the #391 shape). Upstream
1925
+ // hid it and redirects callers to a live workhorse. Entry kept so explicit
1926
+ // pins stay routable; off the picker and the FREE_MODELS cascade.
1927
+ // There is no free Mistral left on NVIDIA — do not point a generic
1928
+ // "a free mistral" shorthand at one.
1822
1929
  id: "free/mistral-nemotron",
1823
1930
  name: "[Free] Mistral Nemotron",
1824
1931
  version: "nemotron",
@@ -1828,7 +1935,13 @@ var init_models = __esm({
1828
1935
  maxOutput: 16384
1829
1936
  },
1830
1937
  {
1831
- // StepFun Step 3.7 Flash: reasoning-focused, 131K context.
1938
+ // StepFun Step 3.7 Flash: reasoning-focused, 131K context. EOL'd 2026-08-30
1939
+ // — NVIDIA published 410 Gone on both of blockrun's probe passes (#448), in
1940
+ // the same sweep that took nemotron-nano-9b-v2, nemotron-nano-12b-v2-vl and
1941
+ // (hidden) nemotron-super-49b. It had been ClawRouter's free default since
1942
+ // 2026-08-29; the gateway redirects it to nemotron-3.5-lightning, which is
1943
+ // exactly why nothing looked broken. Entry kept so explicit pins stay
1944
+ // routable; off the picker and the FREE_MODELS cascade.
1832
1945
  id: "free/step-3.7-flash",
1833
1946
  name: "[Free] StepFun Step 3.7 Flash",
1834
1947
  version: "3.7-flash",
@@ -1840,6 +1953,8 @@ var init_models = __esm({
1840
1953
  },
1841
1954
  {
1842
1955
  // NVIDIA Nemotron Nano 9B v2: fast lightweight generalist, 131K context.
1956
+ // EOL'd 2026-08-30 (410 Gone, same sweep). Gateway redirects it to
1957
+ // nemotron-3-nano-30b. Entry kept for pins; off the picker and the cascade.
1843
1958
  id: "free/nemotron-nano-9b-v2",
1844
1959
  name: "[Free] Nemotron Nano 9B v2",
1845
1960
  version: "nano-9b-v2",
@@ -1851,6 +1966,9 @@ var init_models = __esm({
1851
1966
  },
1852
1967
  {
1853
1968
  // NVIDIA Nemotron Nano 12B v2 VL: vision-language (text + image), 131K context.
1969
+ // EOL'd 2026-08-30 (410 Gone, same sweep). Gateway redirects it to
1970
+ // nemotron-3-nano-omni, the only vision-capable free model left. Entry kept
1971
+ // for pins; off the picker and the cascade.
1854
1972
  id: "free/nemotron-nano-12b-v2-vl",
1855
1973
  name: "[Free] Nemotron Nano 12B v2 VL",
1856
1974
  version: "nano-12b-v2-vl",
@@ -1858,12 +1976,217 @@ var init_models = __esm({
1858
1976
  outputPrice: 0,
1859
1977
  contextWindow: 131072,
1860
1978
  maxOutput: 16384,
1979
+ reasoning: true
1980
+ // Vision flag dropped 2026-08-31 with the rest of the free tier: this id is
1981
+ // 410 Gone and the gateway redirects it to nano-omni, whose image path does
1982
+ // not work either (see above). A pinned caller sending an image would have
1983
+ // been told, by the flag, that it would be seen.
1984
+ },
1985
+ // ── 2026-08-30 free-tier rebuild (blockrun #448) ─────────────────────────
1986
+ // NVIDIA retired FOUR of the five VISIBLE free models in one sweep. blockrun
1987
+ // replaced them and moved two survivors onto OpenRouter's $0 ":free" pool,
1988
+ // taking the visible free set from 5 to 7 and spanning three hosts for the
1989
+ // first time (NVIDIA, OpenRouter, and two non-NVIDIA makers).
1990
+ //
1991
+ // All seven live free models were tool-probed through the gateway on
1992
+ // 2026-08-30 and every one returned a structured `tool_calls` array with
1993
+ // valid JSON args and finish_reason: "tool_calls" (nemotron-3-nano-30b looked
1994
+ // like a textual leak at max_tokens:120 — that was truncation; at 300 it is
1995
+ // structured). The evidence is recorded here on purpose, but `toolCalling` is
1996
+ // deliberately NOT set: no free entry has ever carried it, filterByToolCalling
1997
+ // keeps the free tier out of tool-bearing requests, and the budget pre-check
1998
+ // at proxy.ts:5217 is written on the same assumption. Flipping the tier into
1999
+ // agentic eligibility is its own change with its own evidence bar.
2000
+ {
2001
+ // Nemotron 3.5 Lightning 30B-A3B — the new free default. blockrun's own
2002
+ // redirect target for the retired step-3.7-flash, so following it keeps the
2003
+ // proxy and the gateway naming the same model. Served from OpenRouter's $0
2004
+ // pool (4.9s median vs 16.3s direct) which also publishes a 1M window
2005
+ // against the 131K the NVIDIA NIM path gives; blockrun carries a hidden
2006
+ // "-nim" twin as its fallback. Probed 1.3s with tools.
2007
+ id: "free/nemotron-3.5-lightning",
2008
+ name: "[Free] Nemotron 3.5 Lightning",
2009
+ version: "3.5-lightning",
2010
+ inputPrice: 0,
2011
+ outputPrice: 0,
2012
+ contextWindow: 1e6,
2013
+ maxOutput: 16384,
2014
+ reasoning: true
2015
+ },
2016
+ {
2017
+ // Nemotron 3 Nano 30B-A3B — the fastest free model in the catalog
2018
+ // (~121 tok/s on a realistic workload, not a 16-token ping). Returns
2019
+ // reasoning_content. Also the tertiary rung of blockrun's own free cascade.
2020
+ id: "free/nemotron-3-nano-30b",
2021
+ name: "[Free] Nemotron 3 Nano 30B",
2022
+ version: "3-nano-30b",
2023
+ inputPrice: 0,
2024
+ outputPrice: 0,
2025
+ contextWindow: 131072,
2026
+ maxOutput: 16384,
2027
+ reasoning: true
2028
+ },
2029
+ {
2030
+ // Nemotron 3 Ultra 550B-A55B — the largest free model ever listed, 1M ctx,
2031
+ // reachable ONLY through OpenRouter's $0 pool (build.nvidia.com answers 503).
2032
+ // Deliberately LOW in the cascade: 16.8s on the tools probe, and blockrun
2033
+ // measured 3 of 15 calls coming back as an HTTP 200 carrying an upstream
2034
+ // 502/503 error object instead of choices.
2035
+ id: "free/nemotron-3-ultra-550b",
2036
+ name: "[Free] Nemotron 3 Ultra 550B",
2037
+ version: "3-ultra-550b",
2038
+ inputPrice: 0,
2039
+ outputPrice: 0,
2040
+ contextWindow: 1e6,
2041
+ maxOutput: 16384,
2042
+ reasoning: true
2043
+ },
2044
+ {
2045
+ // Meta Llama 3.2 11B Vision — restores a free Llama after nemotron-super-49b
2046
+ // (Llama-3.3-based) hit NVIDIA's 410 EOL. A 12-model sweep found exactly two
2047
+ // survivors and only the 11B finishes a real completion. Older than the rest
2048
+ // of the tier and deliberately so: it is a real Llama that actually answers.
2049
+ // Slowest in the tier (~18 tok/s) — last rung of the cascade.
2050
+ id: "free/llama-3.2-11b-vision",
2051
+ name: "[Free] Llama 3.2 11B Vision",
2052
+ version: "3.2-11b-vision",
2053
+ inputPrice: 0,
2054
+ outputPrice: 0,
2055
+ contextWindow: 128e3,
2056
+ maxOutput: 16384
2057
+ // NO `vision: true` despite the name and blockrun's `categories:
2058
+ // ["chat","vision"]` — 2026-08-31, three consecutive 64x64 PNG probes came
2059
+ // back "I'm unable to see the image" / "you haven't provided an image",
2060
+ // while a plain-text control on the same id answered fine. The model is
2061
+ // alive; the image path is not. Mirroring the catalog's claim here would
2062
+ // have routed image turns to it. See the nano-omni note above.
2063
+ },
2064
+ {
2065
+ // Cohere North Mini Code, on OpenRouter's $0 pool — 607ms median, the
2066
+ // fastest thing in the tier. Emits reasoning_content (content is clean once
2067
+ // the budget is large enough to finish, verified live).
2068
+ // NOTE: NOT an nvidia/* id upstream — see FREE_UPSTREAM_OVERRIDES in proxy.ts.
2069
+ id: "free/north-mini-code",
2070
+ name: "[Free] Cohere North Mini Code",
2071
+ version: "north-mini-code",
2072
+ inputPrice: 0,
2073
+ outputPrice: 0,
2074
+ contextWindow: 256e3,
2075
+ maxOutput: 16384,
2076
+ reasoning: true
2077
+ },
2078
+ {
2079
+ // Poolside Laguna XS 2.1 on OUR NVIDIA key (~161 tok/s). Deliberately not
2080
+ // the OpenRouter twin, which 429s on every attempt — so this rung and
2081
+ // north-mini-code sit on DIFFERENT capacity pools, which is why they are
2082
+ // adjacent in the cascade.
2083
+ // NOTE: NOT an nvidia/* id upstream — see FREE_UPSTREAM_OVERRIDES in proxy.ts.
2084
+ id: "free/laguna-xs-2.1",
2085
+ name: "[Free] Poolside Laguna XS 2.1",
2086
+ version: "xs-2.1",
2087
+ inputPrice: 0,
2088
+ outputPrice: 0,
2089
+ contextWindow: 131072,
2090
+ maxOutput: 16384
2091
+ },
2092
+ // ── 2026-08-30 paid catalog refresh (blockrun #449) ─────────────────────
2093
+ // Three additions, each probe-verified upstream with a real completion AND a
2094
+ // real image before listing. All three carry `vision: true` on that evidence
2095
+ // — unlike the free tier, where the same claim did not survive a probe.
2096
+ {
2097
+ // Alibaba's 3.8 generation: 125B MoE, one tier above the whole 3.7 line and
2098
+ // cheaper than the qwen3.7-plus ($0.32/$1.28) it outperforms.
2099
+ // Vision took two probes to establish upstream: the first 400'd with
2100
+ // `invalid_parameter_error` on an 8x8 PNG because the model requires >10px
2101
+ // per side; 64x64 answered correctly. A single 400 is not a capability gap.
2102
+ id: "qwen/qwen3.8-flash",
2103
+ name: "Qwen3.8 Flash",
2104
+ version: "3.8-flash",
2105
+ inputPrice: 0.15,
2106
+ outputPrice: 0.47,
2107
+ contextWindow: 1e6,
2108
+ maxOutput: 131072,
1861
2109
  reasoning: true,
1862
- vision: true
2110
+ vision: true,
2111
+ toolCalling: true
2112
+ },
2113
+ {
2114
+ // The first DeepSeek SKU that takes images. Priced at DeepSeek's PEAK rate
2115
+ // on purpose: they now split peak/off-peak and off-peak is half, so listing
2116
+ // the lower number would sell under cost for seven hours every weekday.
2117
+ id: "deepseek/deepseek-v4-flash-vision-exp",
2118
+ name: "DeepSeek V4 Flash Vision",
2119
+ version: "v4-flash-vision-exp",
2120
+ inputPrice: 0.44,
2121
+ outputPrice: 1.32,
2122
+ contextWindow: 1048576,
2123
+ maxOutput: 65536,
2124
+ reasoning: true,
2125
+ vision: true,
2126
+ toolCalling: true
2127
+ },
2128
+ {
2129
+ // NOT a cheaper mimo-v2.5-pro — a different, natively multimodal SKU. The
2130
+ // Pro entry is text-only upstream while this one takes images, at a third
2131
+ // of the price. Keep both.
2132
+ id: "xiaomi/mimo-v2.5",
2133
+ name: "Xiaomi MiMo V2.5",
2134
+ version: "2.5",
2135
+ inputPrice: 0.14,
2136
+ outputPrice: 0.28,
2137
+ contextWindow: 1048576,
2138
+ maxOutput: 131072,
2139
+ reasoning: true,
2140
+ vision: true,
2141
+ toolCalling: true
1863
2142
  },
1864
2143
  // Z.AI GLM-5 Models
1865
2144
  {
1866
- // Launched 2026-06-16 — Z.AI's newest flagship. 1M-token context,
2145
+ // Z.AI's flagship, live-probed by blockrun 2026-08-19 against api.z.ai
2146
+ // (real completion in 2s, content alongside reasoning tokens). $1.40/$4.40,
2147
+ // cached input $0.26, off the international USD price list.
2148
+ // maxOutput is 131072, NOT the 1M context: that is the hard ceiling the API
2149
+ // enforces (error 1210 above it), the same on every GLM-5 SKU.
2150
+ // Thinking is ALWAYS ON here and cannot be disabled.
2151
+ id: "zai/glm-5.3",
2152
+ name: "GLM-5.3",
2153
+ version: "5.3",
2154
+ inputPrice: 1.4,
2155
+ outputPrice: 4.4,
2156
+ contextWindow: 1e6,
2157
+ maxOutput: 131072,
2158
+ reasoning: true,
2159
+ toolCalling: true
2160
+ },
2161
+ {
2162
+ // Z.AI's first natively multimodal GLM-5 — 320B/18B MoE. blockrun probed
2163
+ // text, vision (base64 data URL → correct answer), tools
2164
+ // (finish_reason=tool_calls with well-formed arguments) and streaming live
2165
+ // on 2026-08-27 before listing it.
2166
+ //
2167
+ // MUST be in this catalog, not just router-core's: it is router-core's eco
2168
+ // MEDIUM and COMPLEX primary, and estimateAmount() returns undefined for an
2169
+ // id we do not carry — which makes the request skip the maxCostPerRun filter
2170
+ // AND never accumulate into session cost. An uncatalogued routing target is
2171
+ // a cost-cap hole, not a logging gap.
2172
+ //
2173
+ // Price is the LIST rate. Z.AI is running a 50% launch promo ($0.075/$0.25)
2174
+ // that ENDS 2026-09-09; listing the promo rate would put us under COGS the
2175
+ // morning it lapses. Thinking is always on, as on glm-5.3.
2176
+ id: "zai/glm-5.3-flash",
2177
+ name: "GLM-5.3 Flash",
2178
+ version: "5.3-flash",
2179
+ inputPrice: 0.15,
2180
+ outputPrice: 0.5,
2181
+ contextWindow: 1e6,
2182
+ maxOutput: 131072,
2183
+ reasoning: true,
2184
+ vision: true,
2185
+ toolCalling: true
2186
+ },
2187
+ {
2188
+ // Launched 2026-06-16. Was Z.AI's flagship until glm-5.3 (above) took the
2189
+ // slot on 2026-08-19. 1M-token context,
1867
2190
  // beats GPT-5.5 on long-horizon coding at a fraction of the cost.
1868
2191
  // Paid per-token at $1.40/$4.40 (same as glm-5.1, cached $0.26).
1869
2192
  id: "zai/glm-5.2",
@@ -1872,7 +2195,7 @@ var init_models = __esm({
1872
2195
  inputPrice: 1.4,
1873
2196
  outputPrice: 4.4,
1874
2197
  contextWindow: 1e6,
1875
- maxOutput: 262144,
2198
+ maxOutput: 131072,
1876
2199
  reasoning: true,
1877
2200
  toolCalling: true
1878
2201
  },
@@ -36833,6 +37156,13 @@ ${value.slice(-(scanLimit - prefixLength))}`;
36833
37156
  supportsTools: true,
36834
37157
  supportsVision: true
36835
37158
  },
37159
+ "cohere/north-mini-code": {
37160
+ // supportsTools: not probed — fails closed
37161
+ contextWindow: 256e3,
37162
+ maxOutputTokens: 16384,
37163
+ supportsTools: false,
37164
+ supportsVision: false
37165
+ },
36836
37166
  "deepseek/deepseek-chat": {
36837
37167
  contextWindow: 1048576,
36838
37168
  maxOutputTokens: 65536,
@@ -36923,8 +37253,15 @@ ${value.slice(-(scanLimit - prefixLength))}`;
36923
37253
  supportsTools: true,
36924
37254
  supportsVision: true
36925
37255
  },
36926
- "nvidia/mistral-nemotron": {
36927
- // supportsTools: gateway unavailable at probe time — fails closed
37256
+ "nvidia/llama-3.2-11b-vision": {
37257
+ // supportsTools: not probed — fails closed
37258
+ contextWindow: 128e3,
37259
+ maxOutputTokens: 16384,
37260
+ supportsTools: false,
37261
+ supportsVision: true
37262
+ },
37263
+ "nvidia/nemotron-3-nano-30b": {
37264
+ // supportsTools: not probed — fails closed
36928
37265
  contextWindow: 131072,
36929
37266
  maxOutputTokens: 16384,
36930
37267
  supportsTools: false,
@@ -36936,21 +37273,16 @@ ${value.slice(-(scanLimit - prefixLength))}`;
36936
37273
  supportsTools: false,
36937
37274
  supportsVision: true
36938
37275
  },
36939
- "nvidia/nemotron-nano-12b-v2-vl": {
36940
- // supportsTools: gateway unavailable at probe time — fails closed
36941
- contextWindow: 131072,
36942
- maxOutputTokens: 16384,
36943
- supportsTools: false,
36944
- supportsVision: true
36945
- },
36946
- "nvidia/nemotron-nano-9b-v2": {
36947
- contextWindow: 131072,
37276
+ "nvidia/nemotron-3-ultra-550b": {
37277
+ // supportsTools: not probed — fails closed
37278
+ contextWindow: 1e6,
36948
37279
  maxOutputTokens: 16384,
36949
37280
  supportsTools: false,
36950
37281
  supportsVision: false
36951
37282
  },
36952
- "nvidia/step-3.7-flash": {
36953
- contextWindow: 131072,
37283
+ "nvidia/nemotron-3.5-lightning": {
37284
+ // supportsTools: not probed — fails closed
37285
+ contextWindow: 1e6,
36954
37286
  maxOutputTokens: 16384,
36955
37287
  supportsTools: false,
36956
37288
  supportsVision: false
@@ -37010,13 +37342,6 @@ ${value.slice(-(scanLimit - prefixLength))}`;
37010
37342
  supportsTools: false,
37011
37343
  supportsVision: true
37012
37344
  },
37013
- "openai/gpt-5.3": {
37014
- // supportsTools: gateway unavailable at probe time — fails closed
37015
- contextWindow: 128e3,
37016
- maxOutputTokens: 128e3,
37017
- supportsTools: false,
37018
- supportsVision: true
37019
- },
37020
37345
  "openai/gpt-5.3-codex": {
37021
37346
  // supportsTools: gateway unavailable at probe time — fails closed; override: 2026-08-29 probe: every request (6 plain + 3 tool attempts) returned a gateway 500, so the probe measured an incident, not the model. Codex's function calling is established by the 2026-07 Terminal-Bench / tau2 calibration trajectories in portfolio.ts. Hosts observing the 500s should drop it with RouterOptions.unavailableModels rather than this snapshot claiming the model cannot call tools.
37022
37347
  contextWindow: 4e5,
@@ -37122,6 +37447,13 @@ ${value.slice(-(scanLimit - prefixLength))}`;
37122
37447
  supportsTools: true,
37123
37448
  supportsVision: false
37124
37449
  },
37450
+ "poolside/laguna-xs-2.1": {
37451
+ // supportsTools: not probed — fails closed
37452
+ contextWindow: 131072,
37453
+ maxOutputTokens: 16384,
37454
+ supportsTools: false,
37455
+ supportsVision: false
37456
+ },
37125
37457
  "qwen/qwen3.7-flash": {
37126
37458
  contextWindow: 1e6,
37127
37459
  maxOutputTokens: 65536,
@@ -39037,8 +39369,8 @@ ${value.slice(-(scanLimit - prefixLength))}`;
39037
39369
  // $0.20/$1.25, 1M ctx
39038
39370
  "google/gemini-2.5-flash-lite",
39039
39371
  // $0.10/$0.40
39040
- "nvidia/step-3.7-flash"
39041
- // FREE backstop — NVIDIA free tier (probed 2026-08-21)
39372
+ "nvidia/nemotron-3.5-lightning"
39373
+ // FREE backstop — NVIDIA free tier (probed 2026-08-30)
39042
39374
  ]
39043
39375
  },
39044
39376
  MEDIUM: {
@@ -39127,15 +39459,19 @@ ${value.slice(-(scanLimit - prefixLength))}`;
39127
39459
  // Eco tier configs - absolute cheapest (blockrun/eco)
39128
39460
  ecoTiers: {
39129
39461
  SIMPLE: {
39130
- primary: "nvidia/step-3.7-flash",
39131
- // FREE — NVIDIA free tier flagship
39462
+ primary: "nvidia/nemotron-3.5-lightning",
39463
+ // FREE — NVIDIA free tier flagship, 1M ctx
39132
39464
  fallback: [
39133
- "nvidia/nemotron-nano-9b-v2",
39134
- // FREE — compact + fast, high-volume light tasks
39465
+ "nvidia/nemotron-3-nano-30b",
39466
+ // FREE — fastest free model (~121 tok/s)
39135
39467
  // The free head keeps rotting with NVIDIA's hosting (deepseek-v4-flash
39136
39468
  // 410 2026-08-12, seed-oss-36b 410 2026-08-03, gpt-oss-120b/20b 400
39137
- // 2026-08-21). Each retirement retargets the two free rungs to the
39138
- // current free tier; the paid rungs below never move.
39469
+ // 2026-08-21, and on 2026-08-30 FOUR of the five visible free models at
39470
+ // once — step-3.7-flash, nemotron-nano-9b-v2 and nemotron-nano-12b-v2-vl
39471
+ // all 410, mistral-nemotron hung). Each retirement retargets the two
39472
+ // free rungs to the current free tier; the paid rungs below never move.
39473
+ // The head follows blockrun's own redirect of the model it replaces, so
39474
+ // the router and the gateway never name different models.
39139
39475
  "google/gemini-2.5-flash-lite",
39140
39476
  // $0.10/$0.40 — cheapest paid rung
39141
39477
  "zai/glm-5.3-flash",
@@ -39279,7 +39615,7 @@ ${value.slice(-(scanLimit - prefixLength))}`;
39279
39615
  // strongest open-weight reasoner
39280
39616
  "deepseek/deepseek-chat",
39281
39617
  // Cheap, reliable
39282
- "nvidia/step-3.7-flash"
39618
+ "nvidia/nemotron-3.5-lightning"
39283
39619
  // NVIDIA free ultimate backstop
39284
39620
  ]
39285
39621
  },
@@ -39383,7 +39719,7 @@ ${value.slice(-(scanLimit - prefixLength))}`;
39383
39719
  // retail high-risk 3/3
39384
39720
  "deepseek/deepseek-chat",
39385
39721
  // cheap, reliable
39386
- "nvidia/step-3.7-flash"
39722
+ "nvidia/nemotron-3.5-lightning"
39387
39723
  // NVIDIA free ultimate backstop
39388
39724
  ]
39389
39725
  },
@@ -89507,13 +89843,44 @@ import { homedir as homedir7 } from "os";
89507
89843
  import { join as join10 } from "path";
89508
89844
  import { mkdir as mkdir4, writeFile as writeFile2, readFile as readFile2, stat as fsStat } from "fs/promises";
89509
89845
  import { readFileSync as readFileSync2, existsSync as existsSync2 } from "fs";
89846
+ async function loadGatewayCatalog(apiBase) {
89847
+ try {
89848
+ const controller = new AbortController();
89849
+ const timer2 = setTimeout(() => controller.abort(), GATEWAY_CATALOG_TIMEOUT_MS);
89850
+ const res = await fetch(`${apiBase}/v1/models`, { signal: controller.signal });
89851
+ clearTimeout(timer2);
89852
+ if (!res.ok) return;
89853
+ const body = await res.json();
89854
+ const ids = (body.data ?? []).map((m) => m.id).filter((id2) => !!id2);
89855
+ if (ids.length === 0) return;
89856
+ gatewayModelIds = new Set(ids);
89857
+ const unserved = [...FREE_MODELS].filter((m) => !gatewayModelIds.has(toUpstreamModelId(m)));
89858
+ if (unserved.length > 0) {
89859
+ console.log(
89860
+ `[ClawRouter] Free models not served by this gateway (skipped in the cascade): ${unserved.join(", ")}`
89861
+ );
89862
+ }
89863
+ } catch {
89864
+ }
89865
+ }
89866
+ function isServedByGateway(modelId) {
89867
+ if (!gatewayModelIds) return true;
89868
+ return gatewayModelIds.has(toUpstreamModelId(modelId));
89869
+ }
89510
89870
  function pickFreeModel(excludeList) {
89871
+ for (const m of FREE_MODELS) {
89872
+ if (excludeList?.has(m)) continue;
89873
+ if (!isServedByGateway(m)) continue;
89874
+ return m;
89875
+ }
89511
89876
  for (const m of FREE_MODELS) {
89512
89877
  if (!excludeList?.has(m)) return m;
89513
89878
  }
89514
89879
  return void 0;
89515
89880
  }
89516
89881
  function toUpstreamModelId(modelId) {
89882
+ const override = FREE_UPSTREAM_OVERRIDES[modelId];
89883
+ if (override) return override;
89517
89884
  if (modelId.startsWith("free/")) {
89518
89885
  return "nvidia/" + modelId.slice("free/".length);
89519
89886
  }
@@ -89845,6 +90212,9 @@ function detectDegradedSuccessResponse(body) {
89845
90212
  return `degraded response: ${errorText.slice(0, 120)}`;
89846
90213
  }
89847
90214
  const choices = parsed.choices;
90215
+ if (Array.isArray(choices) && choices.length === 0) {
90216
+ return "degraded response: no choices returned";
90217
+ }
89848
90218
  if (Array.isArray(choices) && choices.length > 0) {
89849
90219
  const choice = choices[0];
89850
90220
  const msg = choice.message ?? choice.delta;
@@ -90335,6 +90705,7 @@ async function startProxy(options) {
90335
90705
  } else if (paymentChain === "solana") {
90336
90706
  console.log(`[ClawRouter] Payment chain: Solana (${BLOCKRUN_SOLANA_API})`);
90337
90707
  }
90708
+ void loadGatewayCatalog(apiBase);
90338
90709
  const listenPort = options.port ?? getProxyPort();
90339
90710
  const existingProxy = await checkExistingProxy(listenPort);
90340
90711
  if (existingProxy) {
@@ -92868,6 +93239,22 @@ data: [DONE]
92868
93239
  } else {
92869
93240
  modelsToTry = modelId ? [modelId] : [];
92870
93241
  }
93242
+ if (modelsToTry.length > 0) {
93243
+ const unservedFree = modelsToTry.filter((m) => FREE_MODELS.has(m) && !isServedByGateway(m));
93244
+ if (unservedFree.length > 0) {
93245
+ const servedFree = [...FREE_MODELS].filter(
93246
+ (m) => isServedByGateway(m) && !excludeList?.has(m)
93247
+ );
93248
+ const replacement = servedFree[0];
93249
+ if (replacement) {
93250
+ modelsToTry = modelsToTry.map((m) => unservedFree.includes(m) ? replacement : m);
93251
+ modelsToTry = modelsToTry.filter((m, i) => modelsToTry.indexOf(m) === i);
93252
+ console.log(
93253
+ `[ClawRouter] ${unservedFree.join(", ")} not served on this chain \u2014 using ${replacement}`
93254
+ );
93255
+ }
93256
+ }
93257
+ }
92871
93258
  if (!hasTools && routingDecision) {
92872
93259
  const freeFallback = pickFreeModel(excludeList);
92873
93260
  if (freeFallback && !modelsToTry.includes(freeFallback)) {
@@ -93748,7 +94135,7 @@ data: [DONE]
93748
94135
  });
93749
94136
  }
93750
94137
  }
93751
- var paymentStore, BLOCKRUN_API, BLOCKRUN_SOLANA_API, IMAGE_DIR, AUDIO_DIR, VIDEO_DIR, AUTO_MODEL, ROUTING_PROFILES, FREE_MODELS, FREE_MODEL, MAX_MESSAGES, CONTEXT_LIMIT_KB, HEARTBEAT_INTERVAL_MS, BALANCE_CHECK_TIMEOUT_MS, DEFAULT_REQUEST_TIMEOUT_MS, PER_MODEL_TIMEOUT_MS, REASONING_MODEL_TIMEOUT_MS, REASONING_MODEL_IDS, MAX_FALLBACK_ATTEMPTS, HEALTH_CHECK_TIMEOUT_MS, RATE_LIMIT_COOLDOWN_MS, OVERLOAD_COOLDOWN_MS, PORT_RETRY_ATTEMPTS, PORT_RETRY_DELAY_MS, MODEL_BODY_READ_TIMEOUT_MS, ERROR_BODY_READ_TIMEOUT_MS, ClientDisconnectedError, rateLimitedModels, overloadedModels, perProviderErrors, BALANCE_CHECK_BUFFER, BALANCE_PREFLIGHT_OUTPUT_TOKEN_CAP, PROVIDER_ERROR_PATTERNS, DEGRADED_RESPONSE_PATTERNS, DEGRADED_LOOP_PATTERNS, VALID_ROLES, ROLE_MAPPINGS, VALID_TOOL_ID_PATTERN, KIMI_BLOCK_RE, KIMI_TOKEN_RE, THINKING_TAG_RE, THINKING_BLOCK_RE, BLOCKRUN_MODEL_BY_ID, IMAGE_PRICING, IMAGE_MODEL_IDS, IMAGE_MODEL_SIZES, IMAGE_MODEL_ALIASES, VIDEO_PRICING, PHONE_PRICING;
94138
+ var paymentStore, BLOCKRUN_API, BLOCKRUN_SOLANA_API, IMAGE_DIR, AUDIO_DIR, VIDEO_DIR, AUTO_MODEL, ROUTING_PROFILES, FREE_MODELS, gatewayModelIds, FREE_MODEL, FREE_UPSTREAM_OVERRIDES, MAX_MESSAGES, CONTEXT_LIMIT_KB, HEARTBEAT_INTERVAL_MS, BALANCE_CHECK_TIMEOUT_MS, GATEWAY_CATALOG_TIMEOUT_MS, DEFAULT_REQUEST_TIMEOUT_MS, PER_MODEL_TIMEOUT_MS, REASONING_MODEL_TIMEOUT_MS, REASONING_MODEL_IDS, MAX_FALLBACK_ATTEMPTS, HEALTH_CHECK_TIMEOUT_MS, RATE_LIMIT_COOLDOWN_MS, OVERLOAD_COOLDOWN_MS, PORT_RETRY_ATTEMPTS, PORT_RETRY_DELAY_MS, MODEL_BODY_READ_TIMEOUT_MS, ERROR_BODY_READ_TIMEOUT_MS, ClientDisconnectedError, rateLimitedModels, overloadedModels, perProviderErrors, BALANCE_CHECK_BUFFER, BALANCE_PREFLIGHT_OUTPUT_TOKEN_CAP, PROVIDER_ERROR_PATTERNS, DEGRADED_RESPONSE_PATTERNS, DEGRADED_LOOP_PATTERNS, VALID_ROLES, ROLE_MAPPINGS, VALID_TOOL_ID_PATTERN, KIMI_BLOCK_RE, KIMI_TOKEN_RE, THINKING_TAG_RE, THINKING_BLOCK_RE, BLOCKRUN_MODEL_BY_ID, IMAGE_PRICING, IMAGE_MODEL_IDS, IMAGE_MODEL_SIZES, IMAGE_MODEL_ALIASES, VIDEO_PRICING, PHONE_PRICING;
93752
94139
  var init_proxy = __esm({
93753
94140
  "src/proxy.ts"() {
93754
94141
  "use strict";
@@ -93799,22 +94186,31 @@ var init_proxy = __esm({
93799
94186
  "premium"
93800
94187
  ]);
93801
94188
  FREE_MODELS = /* @__PURE__ */ new Set([
93802
- "free/step-3.7-flash",
93803
- // reasoning-focused — free-tier flagship
93804
- "free/nemotron-nano-9b-v2",
93805
- // fast lightweight generalist (~0.7s)
93806
- "free/mistral-nemotron",
93807
- // strong instruction following
94189
+ "free/nemotron-3.5-lightning",
94190
+ // free-tier default — 1M ctx, thinking mode
94191
+ "free/nemotron-3-nano-30b",
94192
+ // fastest free model (~121 tok/s)
94193
+ "free/laguna-xs-2.1",
94194
+ // coding, ~161 tok/s — on our NVIDIA key
94195
+ "free/north-mini-code",
94196
+ // coding, 607ms median — OpenRouter $0 pool
93808
94197
  "free/nemotron-3-nano-omni-30b-a3b-reasoning",
93809
94198
  // vision (text/image/video/audio)
93810
- "free/nemotron-nano-12b-v2-vl"
93811
- // vision-language (text + image)
94199
+ "free/nemotron-3-ultra-550b",
94200
+ // largest free model, 1M ctx — but slow + flaky
94201
+ "free/llama-3.2-11b-vision"
94202
+ // only free Llama left; slowest, so last
93812
94203
  ]);
93813
- FREE_MODEL = "free/step-3.7-flash";
94204
+ FREE_MODEL = "free/nemotron-3.5-lightning";
94205
+ FREE_UPSTREAM_OVERRIDES = {
94206
+ "free/north-mini-code": "cohere/north-mini-code",
94207
+ "free/laguna-xs-2.1": "poolside/laguna-xs-2.1"
94208
+ };
93814
94209
  MAX_MESSAGES = 200;
93815
94210
  CONTEXT_LIMIT_KB = 5120;
93816
94211
  HEARTBEAT_INTERVAL_MS = 2e3;
93817
94212
  BALANCE_CHECK_TIMEOUT_MS = 2500;
94213
+ GATEWAY_CATALOG_TIMEOUT_MS = 5e3;
93818
94214
  DEFAULT_REQUEST_TIMEOUT_MS = 3e5;
93819
94215
  PER_MODEL_TIMEOUT_MS = 6e4;
93820
94216
  REASONING_MODEL_TIMEOUT_MS = 18e4;