@blockrun/clawrouter 0.12.317 → 0.12.319

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/README.md CHANGED
@@ -557,7 +557,7 @@ Live per-model prices: [blockrun.ai/pricing](https://blockrun.ai/pricing) (agent
557
557
  | openai/gpt-5.5 | 1M | reasoning, vision, agentic, tools |
558
558
  | openai/gpt-6-astra | 1M | reasoning, vision, agentic, tools (GPT-6 flagship) |
559
559
  | anthropic/claude-fable-5.1 | 1M | reasoning, vision, agentic, tools (always-on thinking) |
560
- | moonshot/kimi-k3 | 1M | reasoning, vision, agentic, tools |
560
+ | moonshot/kimi-k3.1-pro | 1M | reasoning, vision, agentic, tools |
561
561
  | openai/chat-latest | 128K | vision, tools |
562
562
  | openai/o1 | 200K | reasoning, tools |
563
563
  | openai/gpt-5.2-pro | 400K | reasoning, tools |
@@ -571,6 +571,41 @@ Live per-model prices: [blockrun.ai/pricing](https://blockrun.ai/pricing) (agent
571
571
 
572
572
  ---
573
573
 
574
+ ### Shared model catalog
575
+
576
+ ClawRouter refreshes model metadata through `@blockrun/model-catalog`, pinned to
577
+ an immutable commit and bundled into the plugin. The active Base, Solana or
578
+ API-key gateway supplies live chat model IDs, prices and limits. A background
579
+ refresh at startup and every five minutes updates `/v1/models`, price estimates,
580
+ and the plugin's OpenClaw provider/allowlist and per-agent model caches. Newly discovered chat models become
581
+ explicit picker choices without rebuilding ClawRouter. OpenClaw must reload its
582
+ provider configuration to display a changed list; the proxy serves the updated
583
+ list immediately.
584
+
585
+ Restart an already-running proxy once after installing this integration. Reusing
586
+ an older external proxy cannot give that process the new refresh behavior.
587
+
588
+ The public picker policy defaults to
589
+ `https://raw.githubusercontent.com/BlockRunAI/model-catalog/main/dist/snapshot.v1.json`.
590
+ Set `BLOCKRUN_MODEL_CATALOG_URL` to another policy URL, or an empty string to use
591
+ the bundled policy with live gateway rows. Policy requests never receive the API
592
+ key; catalog redirects are refused. Each proxy owns its cache. Network failures
593
+ retain the last complete view, and offline startup retains the existing bundled
594
+ ClawRouter catalog. Invalid policy keeps the last good policy while valid gateway
595
+ rows can still refresh.
596
+
597
+ Existing aliases, curated legacy entries, virtual routes, free fallback order,
598
+ and Auto routing candidates remain product policy. Live rows update prices for
599
+ known models and add new chat choices; they do not promote a new model into Auto
600
+ or assume that a `coding` category proves structured tool support. Known
601
+ capability overrides remain in place. A gateway update cannot reclassify a pinned
602
+ `free/` choice as paid. Models absent from a later refresh lose newly discovered
603
+ picker entries; legacy pinned IDs remain available for gateway redirects.
604
+
605
+ This integrates metadata, not payment signing or upstream protocol support.
606
+ New protocols still require gateway compatibility. Gateway payment quotes and
607
+ account settlement remain authoritative; catalog prices are estimates.
608
+
574
609
  ## Payment
575
610
 
576
611
  Two rails. This section covers the wallet one; the card/API-key one is
@@ -967,6 +1002,14 @@ wallet, no key, no signup. See [Paying with a credit card](#paying-with-a-credit
967
1002
 
968
1003
  ClawRouter itself is free and MIT licensed. You pay only for the LLM API calls routed through it — and several open-weight models (`nemotron-3.5-lightning`, `laguna-xs-2.1`, `north-mini-code`, `nemotron-3.5-bolt`, `nemotron-3-nano-omni-30b-a3b-reasoning`, `nemotron-3-super-120b`, `nemotron-3-ultra-550b`, `muse-glimmer-30b`) are completely free, and Bolt also reads images. Use `/model free` for the free default, or pick any by name.
969
1004
 
1005
+ ## Thanks
1006
+
1007
+ Thanks to [@Tyagiquamar](https://github.com/Tyagiquamar) for a run of careful fixes:
1008
+ SSRF guard hardening for IPv6 link-local and IPv4-embedded addresses (#534, #547),
1009
+ a `/stats` window fallback for invalid day counts (#535), prerelease-aware semver
1010
+ comparison in the updater (#617), and full-content deduplication in the
1011
+ observation compression layer (#621).
1012
+
970
1013
  ---
971
1014
 
972
1015
  <div align="center">
@@ -976,38 +1019,3 @@ ClawRouter itself is free and MIT licensed. You pay only for the LLM API calls r
976
1019
  ⭐ If ClawRouter powers your agents, consider starring the repo!
977
1020
 
978
1021
  </div>
979
-
980
- ### Shared model catalog
981
-
982
- ClawRouter refreshes model metadata through `@blockrun/model-catalog`, pinned to
983
- an immutable commit and bundled into the plugin. The active Base, Solana or
984
- API-key gateway supplies live chat model IDs, prices and limits. A background
985
- refresh at startup and every five minutes updates `/v1/models`, price estimates,
986
- and the plugin's OpenClaw provider/allowlist and per-agent model caches. Newly discovered chat models become
987
- explicit picker choices without rebuilding ClawRouter. OpenClaw must reload its
988
- provider configuration to display a changed list; the proxy serves the updated
989
- list immediately.
990
-
991
- Restart an already-running proxy once after installing this integration. Reusing
992
- an older external proxy cannot give that process the new refresh behavior.
993
-
994
- The public picker policy defaults to
995
- `https://raw.githubusercontent.com/BlockRunAI/model-catalog/main/dist/snapshot.v1.json`.
996
- Set `BLOCKRUN_MODEL_CATALOG_URL` to another policy URL, or an empty string to use
997
- the bundled policy with live gateway rows. Policy requests never receive the API
998
- key; catalog redirects are refused. Each proxy owns its cache. Network failures
999
- retain the last complete view, and offline startup retains the existing bundled
1000
- ClawRouter catalog. Invalid policy keeps the last good policy while valid gateway
1001
- rows can still refresh.
1002
-
1003
- Existing aliases, curated legacy entries, virtual routes, free fallback order,
1004
- and Auto routing candidates remain product policy. Live rows update prices for
1005
- known models and add new chat choices; they do not promote a new model into Auto
1006
- or assume that a `coding` category proves structured tool support. Known
1007
- capability overrides remain in place. A gateway update cannot reclassify a pinned
1008
- `free/` choice as paid. Models absent from a later refresh lose newly discovered
1009
- picker entries; legacy pinned IDs remain available for gateway redirects.
1010
-
1011
- This integrates metadata, not payment signing or upstream protocol support.
1012
- New protocols still require gateway compatibility. Gateway payment quotes and
1013
- account settlement remain authoritative; catalog prices are estimates.
package/dist/cli.js CHANGED
@@ -7612,13 +7612,15 @@ var init_models = __esm({
7612
7612
  "deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash",
7613
7613
  "deepseek-v4-1-flash": "deepseek/deepseek-v4.1-flash",
7614
7614
  "v4.1-flash": "deepseek/deepseek-v4.1-flash",
7615
- // Kimi / Moonshot — K3 is the featured flagship on BlockRun (added 2026-07-17; K2.7
7616
- // hidden/superseded, K2.6 hidden, K2.5 hidden). K3 is ~5x K2.7's price ($3/$15 vs
7617
- // $0.95/$4.00), so the BARE aliases deliberately STAY on K2.7 — repointing them to K3
7618
- // would silently ~5x every generic-`kimi` quote and break per-call-cap wallets (mirrors
7619
- // blockrun's own alias decision). Address the flagship explicitly via "kimi-k3". Explicit
7620
- // pins for "kimi-k2.6" / "kimi-k2.5" still resolve to those exact models (K2.5 is a
7621
- // cost-stability opt-in at $0.60/$3.00). NVIDIA-hosted K2.5 was retired 2026-04-21.
7615
+ // Kimi / Moonshot — K3.1 Pro is the featured flagship on BlockRun (2026-10-25; K3
7616
+ // hidden/superseded, K2.7 hidden, K2.6 hidden, K2.5 hidden). The flagships are ~2-3x
7617
+ // K2.7's price ($2/$10 K3.1 Pro, $3/$15 K3, vs $0.95/$4.00), so the BARE aliases
7618
+ // deliberately STAY on K2.7 — repointing them would silently multiply every
7619
+ // generic-`kimi` quote and break per-call-cap wallets (mirrors blockrun's own alias
7620
+ // decision). Address the flagship explicitly via "kimi-k3.1-pro". Explicit version
7621
+ // pins — "kimi-k3", "kimi-k2.6", "kimi-k2.5" — still resolve to those exact models
7622
+ // (K3 is still served; K2.5 is a cost-stability opt-in at $0.60/$3.00).
7623
+ // NVIDIA-hosted K2.5 was retired 2026-04-21.
7622
7624
  kimi: "moonshot/kimi-k2.7",
7623
7625
  moonshot: "moonshot/kimi-k2.7",
7624
7626
  "kimi-k3": "moonshot/kimi-k3",
@@ -8993,7 +8995,9 @@ var init_models = __esm({
8993
8995
  agentic: true,
8994
8996
  toolCalling: true
8995
8997
  },
8996
- // Kimi K3 — Moonshot's flagship (blockrun added 2026-07-17, live-probed same day).
8998
+ // Kimi K3 — Moonshot's previous flagship (blockrun added 2026-07-17, live-probed same
8999
+ // day); superseded by K3.1 Pro + hidden on BlockRun 2026-10-25 but kept routable — it is
9000
+ // still served, the `kimi-k3` pin resolves here, and router-core's chains still name it.
8997
9001
  // 2.8T-param open MoE, 1M context, image + text input, returns reasoning_content.
8998
9002
  // Priced at COGS + BlockRun's 5% margin: users pay ~$3.15/$15.75 per 1M; the fields
8999
9003
  // here store the raw $3.00/$15.00 COST (server applies margin at billing). ~5x K2.7,
@@ -10048,6 +10052,25 @@ var init_models = __esm({
10048
10052
  }
10049
10053
  });
10050
10054
 
10055
+ // src/platform-fee.ts
10056
+ function validPercent(value) {
10057
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
10058
+ }
10059
+ function platformFeePercentOf(row) {
10060
+ if (row.billing_mode !== "paid") return 0;
10061
+ const pricing = row.pricing && typeof row.pricing === "object" ? row.pricing : void 0;
10062
+ return validPercent(pricing?.platform_fee_percent) ?? validPercent(row.platform_fee_percent) ?? 0;
10063
+ }
10064
+ function withPlatformFee(tokenCostUsd, platformFeePercent) {
10065
+ const percent = validPercent(platformFeePercent) ?? 0;
10066
+ return tokenCostUsd * (1 + percent / 100);
10067
+ }
10068
+ var init_platform_fee = __esm({
10069
+ "src/platform-fee.ts"() {
10070
+ "use strict";
10071
+ }
10072
+ });
10073
+
10051
10074
  // src/model-catalog.ts
10052
10075
  function fallbackCatalog() {
10053
10076
  return {
@@ -10098,7 +10121,10 @@ function projectClawCatalog(state) {
10098
10121
  model.outputPrice = row.billing_mode === "paid" ? row.pricing.output : 0;
10099
10122
  delete model.promo;
10100
10123
  delete model.flatPrice;
10124
+ delete model.platformFeePercent;
10101
10125
  if (row.billing_mode === "flat") model.flatPrice = row.pricing.flat;
10126
+ const feePercent = platformFeePercentOf(row);
10127
+ if (feePercent > 0) model.platformFeePercent = feePercent;
10102
10128
  if (row.context_window) model.contextWindow = row.context_window;
10103
10129
  if (row.max_output) model.maxOutput = row.max_output;
10104
10130
  if (!old) {
@@ -10180,6 +10206,7 @@ function fingerprint(view) {
10180
10206
  m.inputPrice,
10181
10207
  m.outputPrice,
10182
10208
  m.flatPrice ?? null,
10209
+ m.platformFeePercent ?? 0,
10183
10210
  m.contextWindow,
10184
10211
  m.maxOutput
10185
10212
  ]),
@@ -10193,6 +10220,7 @@ var init_model_catalog = __esm({
10193
10220
  init_runtime();
10194
10221
  init_api_key();
10195
10222
  init_models();
10223
+ init_platform_fee();
10196
10224
  }
10197
10225
  });
10198
10226
 
@@ -63501,7 +63529,7 @@ function evidenceCandidates(task) {
63501
63529
  "anthropic/claude-sonnet-5",
63502
63530
  "openai/gpt-5-mini",
63503
63531
  "google/gemini-3.5-flash",
63504
- "moonshot/kimi-k3",
63532
+ "moonshot/kimi-k3.1-pro",
63505
63533
  "deepseek/deepseek-v4-pro"
63506
63534
  ];
63507
63535
  }
@@ -63514,7 +63542,7 @@ function evidenceCandidates(task) {
63514
63542
  "openai/gpt-4o-mini",
63515
63543
  "google/gemini-3.5-flash",
63516
63544
  "openai/gpt-5.3-codex",
63517
- "moonshot/kimi-k3",
63545
+ "moonshot/kimi-k3.1-pro",
63518
63546
  "deepseek/deepseek-v4-pro"
63519
63547
  ];
63520
63548
  }
@@ -63550,7 +63578,7 @@ function evidenceCandidates(task) {
63550
63578
  ];
63551
63579
  }
63552
63580
  if (task === "extraction") {
63553
- return ["moonshot/kimi-k3", "google/gemini-3.5-flash", "anthropic/claude-sonnet-5"];
63581
+ return ["moonshot/kimi-k3.1-pro", "google/gemini-3.5-flash", "anthropic/claude-sonnet-5"];
63554
63582
  }
63555
63583
  if (task === "reasoning_math") {
63556
63584
  return [
@@ -63558,7 +63586,7 @@ function evidenceCandidates(task) {
63558
63586
  "xai/grok-4.5",
63559
63587
  "anthropic/claude-sonnet-5",
63560
63588
  "deepseek/deepseek-v4-pro",
63561
- "moonshot/kimi-k3"
63589
+ "moonshot/kimi-k3.1-pro"
63562
63590
  ];
63563
63591
  }
63564
63592
  return [];
@@ -64878,8 +64906,8 @@ var init_dist = __esm({
64878
64906
  // $2.50/$15 — previous flagship, benchmarked
64879
64907
  "zai/glm-5.3",
64880
64908
  // $1.40/$4.40, 1M ctx, always-on thinking — verified live 2026-08-19
64881
- "moonshot/kimi-k3",
64882
- // $3/$15, 1M ctx — Moonshot flagship (K2.7 successor)
64909
+ "moonshot/kimi-k3.1-pro",
64910
+ // $2/$10, 1M ctx — Moonshot flagship (K3 successor)
64883
64911
  "deepseek/deepseek-v4-pro",
64884
64912
  // $0.435/$0.87 — strongest open-weight reasoner
64885
64913
  "deepseek/deepseek-chat",
@@ -65019,8 +65047,8 @@ var init_dist = __esm({
65019
65047
  fallback: [
65020
65048
  "anthropic/claude-sonnet-5",
65021
65049
  // $3/$15 — code_agent band 0.98
65022
- "moonshot/kimi-k3",
65023
- // $3/$15, 1M ctx — Moonshot flagship
65050
+ "moonshot/kimi-k3.1-pro",
65051
+ // $2/$10, 1M ctx — Moonshot flagship
65024
65052
  "zai/glm-5.3",
65025
65053
  // $1.40/$4.40 — long-horizon coding
65026
65054
  "google/gemini-3.6-flash",
@@ -65058,7 +65086,7 @@ var init_dist = __esm({
65058
65086
  "anthropic/claude-sonnet-4.6",
65059
65087
  "xai/grok-4.5",
65060
65088
  // xAI flagship — 503-resistant, direct-xAI SKU
65061
- "moonshot/kimi-k3",
65089
+ "moonshot/kimi-k3.1-pro",
65062
65090
  // Moonshot flagship, independent infra
65063
65091
  "openai/gpt-5.6-terra",
65064
65092
  // GPT-5.6 balanced tier — stable (Sol excluded: #202)
@@ -65138,8 +65166,8 @@ var init_dist = __esm({
65138
65166
  // $1/$5
65139
65167
  "deepseek/deepseek-chat",
65140
65168
  // $0.14/$0.28
65141
- "moonshot/kimi-k3"
65142
- // $3/$15 — tool_agent band 0.85
65169
+ "moonshot/kimi-k3.1-pro"
65170
+ // $2/$10 — tool_agent band 0.85
65143
65171
  ]
65144
65172
  },
65145
65173
  COMPLEX: {
@@ -65161,7 +65189,7 @@ var init_dist = __esm({
65161
65189
  // Flagship Opus — in-family hot swap
65162
65190
  "xai/grok-4.5",
65163
65191
  // xAI flagship — strong tool use, independent infra
65164
- "moonshot/kimi-k3",
65192
+ "moonshot/kimi-k3.1-pro",
65165
65193
  // Moonshot flagship — independent infra
65166
65194
  "openai/gpt-5.6-terra",
65167
65195
  // GPT-5.6 balanced tier — stable (Sol excluded: #202)
@@ -65227,6 +65255,13 @@ var init_dist = __esm({
65227
65255
  supportsTools: true,
65228
65256
  supportsVision: true
65229
65257
  },
65258
+ "anthropic/claude-fable-5.2": {
65259
+ // supportsTools: not probed — fails closed
65260
+ contextWindow: 1e6,
65261
+ maxOutputTokens: 128e3,
65262
+ supportsTools: false,
65263
+ supportsVision: true
65264
+ },
65230
65265
  "anthropic/claude-haiku-4.5": {
65231
65266
  // override: The public catalog's `categories` omit "vision" for this Anthropic model even though the gateway accepts image input for it (the prior hand-maintained snapshot had it, and Anthropic's model card lists it). Without this the vision filter would silently drop it — reported against the catalog; remove once the categories carry vision.
65232
65267
  contextWindow: 2e5,
@@ -65396,6 +65431,26 @@ var init_dist = __esm({
65396
65431
  supportsTools: false,
65397
65432
  supportsVision: true
65398
65433
  },
65434
+ "google/gemini-4-carbon": {
65435
+ contextWindow: 1048576,
65436
+ maxOutputTokens: 65536,
65437
+ supportsTools: true,
65438
+ supportsVision: true
65439
+ },
65440
+ "google/gemini-4-hydrogen": {
65441
+ // supportsTools: not probed — fails closed
65442
+ contextWindow: 1048576,
65443
+ maxOutputTokens: 65536,
65444
+ supportsTools: false,
65445
+ supportsVision: true
65446
+ },
65447
+ "google/gemini-4-neon": {
65448
+ // supportsTools: not probed — fails closed
65449
+ contextWindow: 1048576,
65450
+ maxOutputTokens: 65536,
65451
+ supportsTools: false,
65452
+ supportsVision: true
65453
+ },
65399
65454
  "minimax/minimax-m2.7": {
65400
65455
  contextWindow: 204800,
65401
65456
  maxOutputTokens: 16384,
@@ -65415,18 +65470,10 @@ var init_dist = __esm({
65415
65470
  supportsTools: false,
65416
65471
  supportsVision: true
65417
65472
  },
65418
- "moonshot/kimi-k3": {
65419
- // absent from the 2026-11-08 listing but still routed — previous entry retained; probe before removing
65420
- contextWindow: 1048576,
65421
- maxOutputTokens: 65536,
65422
- supportsTools: true,
65423
- supportsVision: true
65424
- },
65425
65473
  "moonshot/kimi-k3.1-pro": {
65426
- // supportsTools: not probed — fails closed
65427
65474
  contextWindow: 1048576,
65428
65475
  maxOutputTokens: 65536,
65429
- supportsTools: false,
65476
+ supportsTools: true,
65430
65477
  supportsVision: true
65431
65478
  },
65432
65479
  "nvidia/minimax-m3.1-flash": {
@@ -65638,6 +65685,20 @@ var init_dist = __esm({
65638
65685
  supportsTools: true,
65639
65686
  supportsVision: true
65640
65687
  },
65688
+ "openai/gpt-6.2-astra": {
65689
+ // supportsTools: not probed — fails closed
65690
+ contextWindow: 105e4,
65691
+ maxOutputTokens: 128e3,
65692
+ supportsTools: false,
65693
+ supportsVision: true
65694
+ },
65695
+ "openai/gpt-6.2-sol": {
65696
+ // supportsTools: not probed — fails closed
65697
+ contextWindow: 105e4,
65698
+ maxOutputTokens: 128e3,
65699
+ supportsTools: false,
65700
+ supportsVision: true
65701
+ },
65641
65702
  "openai/o1": {
65642
65703
  contextWindow: 2e5,
65643
65704
  maxOutputTokens: 1e5,
@@ -65994,6 +66055,14 @@ var init_dist = __esm({
65994
66055
  errorRate: 0,
65995
66056
  samples: 3
65996
66057
  },
66058
+ "moonshot/kimi-k3.1-pro": {
66059
+ measuredAt: "2026-11-23T20:18:18Z",
66060
+ latencyMs: 9243.1,
66061
+ p95LatencyMs: 10504.1,
66062
+ outputTokensPerSecond: 55.89,
66063
+ errorRate: 0,
66064
+ samples: 3
66065
+ },
65997
66066
  "nvidia/mistral-nemotron": {
65998
66067
  measuredAt: "2026-08-29T16:51:33Z",
65999
66068
  latencyMs: 7349.6,
@@ -66441,7 +66510,7 @@ var init_dist = __esm({
66441
66510
  "claude-sonnet-5": 0.98,
66442
66511
  "gpt-5-mini": 0.96,
66443
66512
  "gemini-3.5-flash": 0.92,
66444
- "kimi-k3": 0.9,
66513
+ "kimi-k3.1-pro": 0.9,
66445
66514
  "deepseek-v4-pro": 0.88,
66446
66515
  "glm-5.2": 0.88
66447
66516
  },
@@ -66475,7 +66544,7 @@ var init_dist = __esm({
66475
66544
  "claude-sonnet-5": 0.88,
66476
66545
  "gemini-3.5-flash": 0.82,
66477
66546
  "gpt-5.3-codex": 0.81,
66478
- "kimi-k3": 0.78,
66547
+ "kimi-k3.1-pro": 0.78,
66479
66548
  "deepseek-v4-pro": 0.76
66480
66549
  },
66481
66550
  retailHigh: {
@@ -66483,7 +66552,7 @@ var init_dist = __esm({
66483
66552
  "claude-sonnet-5": 0.88,
66484
66553
  "gemini-3.5-flash": 0.82,
66485
66554
  "gpt-5.3-codex": 0.81,
66486
- "kimi-k3": 0.78,
66555
+ "kimi-k3.1-pro": 0.78,
66487
66556
  "gpt-5-mini": 0.76
66488
66557
  },
66489
66558
  // Standard airline workflows stay on GPT-5 Mini: six full-session
@@ -66517,7 +66586,7 @@ var init_dist = __esm({
66517
66586
  "claude-sonnet-5": 1,
66518
66587
  "gemini-3.5-flash": 0.88,
66519
66588
  "gpt-5.3-codex": 0.87,
66520
- "kimi-k3": 0.85,
66589
+ "kimi-k3.1-pro": 0.85,
66521
66590
  "gpt-5-mini": 0.84,
66522
66591
  "deepseek-v4-pro": 0.82
66523
66592
  },
@@ -66599,13 +66668,13 @@ var init_dist = __esm({
66599
66668
  "grok-4.5": 0.93,
66600
66669
  "claude-sonnet-5": 0.9,
66601
66670
  "deepseek-v4-pro": 0.9,
66602
- "kimi-k3": 0.9
66671
+ "kimi-k3.1-pro": 0.9
66603
66672
  },
66604
66673
  vision: {
66605
66674
  "gemini-3.1-pro": 0.96,
66606
66675
  "qwen3.7-max": 0.9,
66607
66676
  "claude-sonnet-4.6": 0.9,
66608
- "kimi-k3": 0.9,
66677
+ "kimi-k3.1-pro": 0.9,
66609
66678
  "grok-4.3": 0.9
66610
66679
  },
66611
66680
  // Long-context eligibility is necessary but not sufficient: a provider can
@@ -66622,13 +66691,18 @@ var init_dist = __esm({
66622
66691
  // A structured extraction must preserve both the output contract and the
66623
66692
  // source-language fields. For Mandarin input the language-native Kimi
66624
66693
  // candidate gets a distinct band — a candidate-pool decision, not a post-hoc
66625
- // override, so it still falls back normally when Kimi is unavailable. Kimi
66626
- // K3 costs ~5x its retired sibling K2.7, so the band must be wider than the
66627
- // auto affinityFloorGap (0.10) or price alone re-selects a non-native model
66628
- // for Mandarin input; 0.12 keeps K3 alone in the primary band for zh and
66629
- // leaves every other language untouched.
66694
+ // override, so it still falls back normally when Kimi is unavailable. The
66695
+ // Kimi flagship costs several times the cheap extraction models, so the band
66696
+ // must be wider than the auto affinityFloorGap (0.10) or price alone
66697
+ // re-selects a non-native model for Mandarin input; 0.12 keeps Kimi alone in
66698
+ // the primary band for zh and leaves every other language untouched.
66699
+ //
66700
+ // Every "kimi-k3.1-pro" value in AFFINITY is carried over from the Kimi
66701
+ // flagship it replaced (K3, whose values were in turn carried from K2.7);
66702
+ // none is a K3.1 Pro trajectory measurement. K3.1 Pro's own evidence is the
66703
+ // 2026-11-23 live probe: 3/3 completions, 0 errors, a well-formed tool call.
66630
66704
  extractionZh: {
66631
- "kimi-k3": 1,
66705
+ "kimi-k3.1-pro": 1,
66632
66706
  "gemini-3.5-flash": 0.88,
66633
66707
  "gemini-2.5-flash": 0.88,
66634
66708
  "gpt-4o-mini": 0.88,
@@ -66636,7 +66710,7 @@ var init_dist = __esm({
66636
66710
  "claude-sonnet-4.6": 0.88
66637
66711
  },
66638
66712
  extraction: {
66639
- "kimi-k3": 0.9,
66713
+ "kimi-k3.1-pro": 0.9,
66640
66714
  "gemini-3.5-flash": 0.9,
66641
66715
  "gemini-2.5-flash": 0.9,
66642
66716
  "gpt-4o-mini": 0.9,
@@ -66646,7 +66720,7 @@ var init_dist = __esm({
66646
66720
  chat: {
66647
66721
  "gemini-3.5-flash": 0.86,
66648
66722
  "gemini-2.5-flash": 0.86,
66649
- "kimi-k3": 0.86
66723
+ "kimi-k3.1-pro": 0.86
66650
66724
  }
66651
66725
  };
66652
66726
  VERIFIED_TOOL_FALLBACKS = [
@@ -66655,6 +66729,7 @@ var init_dist = __esm({
66655
66729
  "anthropic/claude-sonnet-5.5",
66656
66730
  "deepseek/deepseek-v4.1-flash",
66657
66731
  "google/gemini-3.8-flash",
66732
+ "google/gemini-4-carbon",
66658
66733
  "openai/gpt-5.1",
66659
66734
  "openai/gpt-6-astra",
66660
66735
  "openai/gpt-6-luna",
@@ -91200,7 +91275,7 @@ function deduplicateLargeBlocks(messages) {
91200
91275
  if (!msg.content || typeof msg.content !== "string" || msg.content.length < 500) {
91201
91276
  return msg;
91202
91277
  }
91203
- const blockKey = msg.content.slice(0, 200);
91278
+ const blockKey = msg.content;
91204
91279
  if (blockHashes.has(blockKey)) {
91205
91280
  const firstIdx = blockHashes.get(blockKey);
91206
91281
  const original = msg.content;
@@ -157356,7 +157431,10 @@ function estimateAmount(modelId, bodyLength, maxTokens, models = BLOCKRUN_MODEL_
157356
157431
  } else {
157357
157432
  const estimatedInputTokens = Math.ceil(bodyLength / 4);
157358
157433
  const estimatedOutputTokens = maxTokens || model.maxOutput || 4096;
157359
- costUsd = estimatedInputTokens / 1e6 * model.inputPrice + estimatedOutputTokens / 1e6 * model.outputPrice;
157434
+ costUsd = withPlatformFee(
157435
+ estimatedInputTokens / 1e6 * model.inputPrice + estimatedOutputTokens / 1e6 * model.outputPrice,
157436
+ model.platformFeePercent
157437
+ );
157360
157438
  }
157361
157439
  if (costUsd > 0) costUsd += 1e-3;
157362
157440
  const amountMicros = Math.max(1e3, Math.ceil(costUsd * 1.2 * 1e6));
@@ -161764,7 +161842,10 @@ data: [DONE]
161764
161842
  } else if (apiKeyPricing) {
161765
161843
  const inTokens = responseInputTokens ?? chargedInputTokens;
161766
161844
  const outTokens = responseOutputTokens ?? 0;
161767
- logCost2 = (inTokens * (apiKeyPricing.inputPrice ?? 0) + outTokens * (apiKeyPricing.outputPrice ?? 0)) / 1e6;
161845
+ logCost2 = withPlatformFee(
161846
+ (inTokens * (apiKeyPricing.inputPrice ?? 0) + outTokens * (apiKeyPricing.outputPrice ?? 0)) / 1e6,
161847
+ modelsById.get(logModel)?.platformFeePercent
161848
+ );
161768
161849
  logSavings = costs.baselineCost > 0 ? Math.max(0, (costs.baselineCost - logCost2) / costs.baselineCost) : 0;
161769
161850
  } else {
161770
161851
  logCost2 = costs.costEstimate;
@@ -161806,6 +161887,7 @@ var init_proxy = __esm({
161806
161887
  init_router();
161807
161888
  init_models();
161808
161889
  init_max_tokens();
161890
+ init_platform_fee();
161809
161891
  init_logger();
161810
161892
  init_stats();
161811
161893
  init_dedup();
@@ -312753,6 +312835,16 @@ var init_redeem = __esm({
312753
312835
  }
312754
312836
  });
312755
312837
 
312838
+ // src/polymarket/units.ts
312839
+ function usdToBaseUnits(usd2, decimals) {
312840
+ return BigInt(Math.round(usd2 * 10 ** decimals));
312841
+ }
312842
+ var init_units = __esm({
312843
+ "src/polymarket/units.ts"() {
312844
+ "use strict";
312845
+ }
312846
+ });
312847
+
312756
312848
  // src/polymarket/withdraw.ts
312757
312849
  async function rawPusdBalance(owner) {
312758
312850
  return getPublicClient().readContract({
@@ -312785,7 +312877,7 @@ async function withdrawFunds(input2, deps) {
312785
312877
  isError: true
312786
312878
  };
312787
312879
  }
312788
- const amountRaw = input2.amount_usd !== void 0 ? BigInt(Math.floor(input2.amount_usd * 10 ** PUSD_DECIMALS)) : balanceRaw;
312880
+ const amountRaw = input2.amount_usd !== void 0 ? usdToBaseUnits(input2.amount_usd, PUSD_DECIMALS) : balanceRaw;
312789
312881
  if (amountRaw > balanceRaw) {
312790
312882
  return {
312791
312883
  text: `Requested $${input2.amount_usd} exceeds the pUSD balance of $${balanceUsd.toFixed(2)}.`,
@@ -312908,6 +313000,7 @@ var init_withdraw = __esm({
312908
313000
  init_relayer();
312909
313001
  init_setup();
312910
313002
  init_spend_policy();
313003
+ init_units();
312911
313004
  }
312912
313005
  });
312913
313006
 
@@ -312979,7 +313072,7 @@ async function fundVault(input2, deps) {
312979
313072
  };
312980
313073
  }
312981
313074
  const privateKey = getOrCreateWalletKey();
312982
- const amountMicro = String(Math.floor(amountUsd * 10 ** USDC_DECIMALS));
313075
+ const amountMicro = String(usdToBaseUnits(amountUsd, USDC_DECIMALS));
312983
313076
  const network = `eip155:${BASE_CHAIN_ID3}`;
312984
313077
  const depositAuthorization = await signUnderSpendPolicy(
312985
313078
  deps,
@@ -313036,6 +313129,7 @@ var init_fund = __esm({
313036
313129
  init_positions();
313037
313130
  init_setup();
313038
313131
  init_spend_policy();
313132
+ init_units();
313039
313133
  FUND_FEE_USD = 0.01;
313040
313134
  USDC_DECIMALS = 6;
313041
313135
  FUND_MIN_USD = Number(process.env.POLYMARKET_FUND_MIN_USD || "2");
package/dist/index.d.ts CHANGED
@@ -422,6 +422,13 @@ type BlockRunModel = {
422
422
  * Unlike promo, this never expires. Takes precedence over promo.
423
423
  */
424
424
  flatPrice?: number;
425
+ /**
426
+ * Platform fee percent the gateway adds to this model's per-token cost
427
+ * (`platform_fee_percent` on its `/v1/models` row; see platform-fee.ts).
428
+ * Set only from a live catalog; absent means 0. The bundled list below never
429
+ * carries it, so the fee is never a number typed here.
430
+ */
431
+ platformFeePercent?: number;
425
432
  };
426
433
  declare const BLOCKRUN_MODELS: BlockRunModel[];
427
434
  /**
package/dist/index.js CHANGED
@@ -268567,13 +268567,15 @@ var MODEL_ALIASES = {
268567
268567
  "deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash",
268568
268568
  "deepseek-v4-1-flash": "deepseek/deepseek-v4.1-flash",
268569
268569
  "v4.1-flash": "deepseek/deepseek-v4.1-flash",
268570
- // Kimi / Moonshot — K3 is the featured flagship on BlockRun (added 2026-07-17; K2.7
268571
- // hidden/superseded, K2.6 hidden, K2.5 hidden). K3 is ~5x K2.7's price ($3/$15 vs
268572
- // $0.95/$4.00), so the BARE aliases deliberately STAY on K2.7 — repointing them to K3
268573
- // would silently ~5x every generic-`kimi` quote and break per-call-cap wallets (mirrors
268574
- // blockrun's own alias decision). Address the flagship explicitly via "kimi-k3". Explicit
268575
- // pins for "kimi-k2.6" / "kimi-k2.5" still resolve to those exact models (K2.5 is a
268576
- // cost-stability opt-in at $0.60/$3.00). NVIDIA-hosted K2.5 was retired 2026-04-21.
268570
+ // Kimi / Moonshot — K3.1 Pro is the featured flagship on BlockRun (2026-10-25; K3
268571
+ // hidden/superseded, K2.7 hidden, K2.6 hidden, K2.5 hidden). The flagships are ~2-3x
268572
+ // K2.7's price ($2/$10 K3.1 Pro, $3/$15 K3, vs $0.95/$4.00), so the BARE aliases
268573
+ // deliberately STAY on K2.7 — repointing them would silently multiply every
268574
+ // generic-`kimi` quote and break per-call-cap wallets (mirrors blockrun's own alias
268575
+ // decision). Address the flagship explicitly via "kimi-k3.1-pro". Explicit version
268576
+ // pins — "kimi-k3", "kimi-k2.6", "kimi-k2.5" — still resolve to those exact models
268577
+ // (K3 is still served; K2.5 is a cost-stability opt-in at $0.60/$3.00).
268578
+ // NVIDIA-hosted K2.5 was retired 2026-04-21.
268577
268579
  kimi: "moonshot/kimi-k2.7",
268578
268580
  moonshot: "moonshot/kimi-k2.7",
268579
268581
  "kimi-k3": "moonshot/kimi-k3",
@@ -269974,7 +269976,9 @@ var BLOCKRUN_MODELS = [
269974
269976
  agentic: true,
269975
269977
  toolCalling: true
269976
269978
  },
269977
- // Kimi K3 — Moonshot's flagship (blockrun added 2026-07-17, live-probed same day).
269979
+ // Kimi K3 — Moonshot's previous flagship (blockrun added 2026-07-17, live-probed same
269980
+ // day); superseded by K3.1 Pro + hidden on BlockRun 2026-10-25 but kept routable — it is
269981
+ // still served, the `kimi-k3` pin resolves here, and router-core's chains still name it.
269978
269982
  // 2.8T-param open MoE, 1M context, image + text input, returns reasoning_content.
269979
269983
  // Priced at COGS + BlockRun's 5% margin: users pay ~$3.15/$15.75 per 1M; the fields
269980
269984
  // here store the raw $3.00/$15.00 COST (server applies margin at billing). ~5x K2.7,
@@ -278216,6 +278220,20 @@ var HINTS = {
278216
278220
  404: `api.blockrun.ai does not serve this endpoint. Chat, Anthropic-shaped messages, images, speech, video and the partner APIs (Exa, prediction markets, phone lookup) all work on an API key. The wallet-only exceptions are the routes that bind a lease or a position to a payer address \u2014 buying/renewing/releasing phone numbers, and Polymarket trading \u2014 which need a wallet to own the thing being bought. For those, unset BLOCKRUN_API_KEY and run "clawrouter logout".`
278217
278221
  };
278218
278222
 
278223
+ // src/platform-fee.ts
278224
+ function validPercent(value) {
278225
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
278226
+ }
278227
+ function platformFeePercentOf(row) {
278228
+ if (row.billing_mode !== "paid") return 0;
278229
+ const pricing = row.pricing && typeof row.pricing === "object" ? row.pricing : void 0;
278230
+ return validPercent(pricing?.platform_fee_percent) ?? validPercent(row.platform_fee_percent) ?? 0;
278231
+ }
278232
+ function withPlatformFee(tokenCostUsd, platformFeePercent) {
278233
+ const percent = validPercent(platformFeePercent) ?? 0;
278234
+ return tokenCostUsd * (1 + percent / 100);
278235
+ }
278236
+
278219
278237
  // src/model-catalog.ts
278220
278238
  function fallbackCatalog() {
278221
278239
  return {
@@ -278266,7 +278284,10 @@ function projectClawCatalog(state) {
278266
278284
  model.outputPrice = row.billing_mode === "paid" ? row.pricing.output : 0;
278267
278285
  delete model.promo;
278268
278286
  delete model.flatPrice;
278287
+ delete model.platformFeePercent;
278269
278288
  if (row.billing_mode === "flat") model.flatPrice = row.pricing.flat;
278289
+ const feePercent = platformFeePercentOf(row);
278290
+ if (feePercent > 0) model.platformFeePercent = feePercent;
278270
278291
  if (row.context_window) model.contextWindow = row.context_window;
278271
278292
  if (row.max_output) model.maxOutput = row.max_output;
278272
278293
  if (!old) {
@@ -278348,6 +278369,7 @@ function fingerprint(view) {
278348
278369
  m.inputPrice,
278349
278370
  m.outputPrice,
278350
278371
  m.flatPrice ?? null,
278372
+ m.platformFeePercent ?? 0,
278351
278373
  m.contextWindow,
278352
278374
  m.maxOutput
278353
278375
  ]),
@@ -286454,8 +286476,8 @@ var DEFAULT_ROUTING_CONFIG = {
286454
286476
  // $2.50/$15 — previous flagship, benchmarked
286455
286477
  "zai/glm-5.3",
286456
286478
  // $1.40/$4.40, 1M ctx, always-on thinking — verified live 2026-08-19
286457
- "moonshot/kimi-k3",
286458
- // $3/$15, 1M ctx — Moonshot flagship (K2.7 successor)
286479
+ "moonshot/kimi-k3.1-pro",
286480
+ // $2/$10, 1M ctx — Moonshot flagship (K3 successor)
286459
286481
  "deepseek/deepseek-v4-pro",
286460
286482
  // $0.435/$0.87 — strongest open-weight reasoner
286461
286483
  "deepseek/deepseek-chat",
@@ -286595,8 +286617,8 @@ var DEFAULT_ROUTING_CONFIG = {
286595
286617
  fallback: [
286596
286618
  "anthropic/claude-sonnet-5",
286597
286619
  // $3/$15 — code_agent band 0.98
286598
- "moonshot/kimi-k3",
286599
- // $3/$15, 1M ctx — Moonshot flagship
286620
+ "moonshot/kimi-k3.1-pro",
286621
+ // $2/$10, 1M ctx — Moonshot flagship
286600
286622
  "zai/glm-5.3",
286601
286623
  // $1.40/$4.40 — long-horizon coding
286602
286624
  "google/gemini-3.6-flash",
@@ -286634,7 +286656,7 @@ var DEFAULT_ROUTING_CONFIG = {
286634
286656
  "anthropic/claude-sonnet-4.6",
286635
286657
  "xai/grok-4.5",
286636
286658
  // xAI flagship — 503-resistant, direct-xAI SKU
286637
- "moonshot/kimi-k3",
286659
+ "moonshot/kimi-k3.1-pro",
286638
286660
  // Moonshot flagship, independent infra
286639
286661
  "openai/gpt-5.6-terra",
286640
286662
  // GPT-5.6 balanced tier — stable (Sol excluded: #202)
@@ -286714,8 +286736,8 @@ var DEFAULT_ROUTING_CONFIG = {
286714
286736
  // $1/$5
286715
286737
  "deepseek/deepseek-chat",
286716
286738
  // $0.14/$0.28
286717
- "moonshot/kimi-k3"
286718
- // $3/$15 — tool_agent band 0.85
286739
+ "moonshot/kimi-k3.1-pro"
286740
+ // $2/$10 — tool_agent band 0.85
286719
286741
  ]
286720
286742
  },
286721
286743
  COMPLEX: {
@@ -286737,7 +286759,7 @@ var DEFAULT_ROUTING_CONFIG = {
286737
286759
  // Flagship Opus — in-family hot swap
286738
286760
  "xai/grok-4.5",
286739
286761
  // xAI flagship — strong tool use, independent infra
286740
- "moonshot/kimi-k3",
286762
+ "moonshot/kimi-k3.1-pro",
286741
286763
  // Moonshot flagship — independent infra
286742
286764
  "openai/gpt-5.6-terra",
286743
286765
  // GPT-5.6 balanced tier — stable (Sol excluded: #202)
@@ -286803,6 +286825,13 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
286803
286825
  supportsTools: true,
286804
286826
  supportsVision: true
286805
286827
  },
286828
+ "anthropic/claude-fable-5.2": {
286829
+ // supportsTools: not probed — fails closed
286830
+ contextWindow: 1e6,
286831
+ maxOutputTokens: 128e3,
286832
+ supportsTools: false,
286833
+ supportsVision: true
286834
+ },
286806
286835
  "anthropic/claude-haiku-4.5": {
286807
286836
  // override: The public catalog's `categories` omit "vision" for this Anthropic model even though the gateway accepts image input for it (the prior hand-maintained snapshot had it, and Anthropic's model card lists it). Without this the vision filter would silently drop it — reported against the catalog; remove once the categories carry vision.
286808
286837
  contextWindow: 2e5,
@@ -286972,6 +287001,26 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
286972
287001
  supportsTools: false,
286973
287002
  supportsVision: true
286974
287003
  },
287004
+ "google/gemini-4-carbon": {
287005
+ contextWindow: 1048576,
287006
+ maxOutputTokens: 65536,
287007
+ supportsTools: true,
287008
+ supportsVision: true
287009
+ },
287010
+ "google/gemini-4-hydrogen": {
287011
+ // supportsTools: not probed — fails closed
287012
+ contextWindow: 1048576,
287013
+ maxOutputTokens: 65536,
287014
+ supportsTools: false,
287015
+ supportsVision: true
287016
+ },
287017
+ "google/gemini-4-neon": {
287018
+ // supportsTools: not probed — fails closed
287019
+ contextWindow: 1048576,
287020
+ maxOutputTokens: 65536,
287021
+ supportsTools: false,
287022
+ supportsVision: true
287023
+ },
286975
287024
  "minimax/minimax-m2.7": {
286976
287025
  contextWindow: 204800,
286977
287026
  maxOutputTokens: 16384,
@@ -286991,18 +287040,10 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
286991
287040
  supportsTools: false,
286992
287041
  supportsVision: true
286993
287042
  },
286994
- "moonshot/kimi-k3": {
286995
- // absent from the 2026-11-08 listing but still routed — previous entry retained; probe before removing
286996
- contextWindow: 1048576,
286997
- maxOutputTokens: 65536,
286998
- supportsTools: true,
286999
- supportsVision: true
287000
- },
287001
287043
  "moonshot/kimi-k3.1-pro": {
287002
- // supportsTools: not probed — fails closed
287003
287044
  contextWindow: 1048576,
287004
287045
  maxOutputTokens: 65536,
287005
- supportsTools: false,
287046
+ supportsTools: true,
287006
287047
  supportsVision: true
287007
287048
  },
287008
287049
  "nvidia/minimax-m3.1-flash": {
@@ -287214,6 +287255,20 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
287214
287255
  supportsTools: true,
287215
287256
  supportsVision: true
287216
287257
  },
287258
+ "openai/gpt-6.2-astra": {
287259
+ // supportsTools: not probed — fails closed
287260
+ contextWindow: 105e4,
287261
+ maxOutputTokens: 128e3,
287262
+ supportsTools: false,
287263
+ supportsVision: true
287264
+ },
287265
+ "openai/gpt-6.2-sol": {
287266
+ // supportsTools: not probed — fails closed
287267
+ contextWindow: 105e4,
287268
+ maxOutputTokens: 128e3,
287269
+ supportsTools: false,
287270
+ supportsVision: true
287271
+ },
287217
287272
  "openai/o1": {
287218
287273
  contextWindow: 2e5,
287219
287274
  maxOutputTokens: 1e5,
@@ -287570,6 +287625,14 @@ var model_profiles_generated_default = {
287570
287625
  errorRate: 0,
287571
287626
  samples: 3
287572
287627
  },
287628
+ "moonshot/kimi-k3.1-pro": {
287629
+ measuredAt: "2026-11-23T20:18:18Z",
287630
+ latencyMs: 9243.1,
287631
+ p95LatencyMs: 10504.1,
287632
+ outputTokensPerSecond: 55.89,
287633
+ errorRate: 0,
287634
+ samples: 3
287635
+ },
287573
287636
  "nvidia/mistral-nemotron": {
287574
287637
  measuredAt: "2026-08-29T16:51:33Z",
287575
287638
  latencyMs: 7349.6,
@@ -288261,7 +288324,7 @@ var AFFINITY = {
288261
288324
  "claude-sonnet-5": 0.98,
288262
288325
  "gpt-5-mini": 0.96,
288263
288326
  "gemini-3.5-flash": 0.92,
288264
- "kimi-k3": 0.9,
288327
+ "kimi-k3.1-pro": 0.9,
288265
288328
  "deepseek-v4-pro": 0.88,
288266
288329
  "glm-5.2": 0.88
288267
288330
  },
@@ -288295,7 +288358,7 @@ var AFFINITY = {
288295
288358
  "claude-sonnet-5": 0.88,
288296
288359
  "gemini-3.5-flash": 0.82,
288297
288360
  "gpt-5.3-codex": 0.81,
288298
- "kimi-k3": 0.78,
288361
+ "kimi-k3.1-pro": 0.78,
288299
288362
  "deepseek-v4-pro": 0.76
288300
288363
  },
288301
288364
  retailHigh: {
@@ -288303,7 +288366,7 @@ var AFFINITY = {
288303
288366
  "claude-sonnet-5": 0.88,
288304
288367
  "gemini-3.5-flash": 0.82,
288305
288368
  "gpt-5.3-codex": 0.81,
288306
- "kimi-k3": 0.78,
288369
+ "kimi-k3.1-pro": 0.78,
288307
288370
  "gpt-5-mini": 0.76
288308
288371
  },
288309
288372
  // Standard airline workflows stay on GPT-5 Mini: six full-session
@@ -288337,7 +288400,7 @@ var AFFINITY = {
288337
288400
  "claude-sonnet-5": 1,
288338
288401
  "gemini-3.5-flash": 0.88,
288339
288402
  "gpt-5.3-codex": 0.87,
288340
- "kimi-k3": 0.85,
288403
+ "kimi-k3.1-pro": 0.85,
288341
288404
  "gpt-5-mini": 0.84,
288342
288405
  "deepseek-v4-pro": 0.82
288343
288406
  },
@@ -288419,13 +288482,13 @@ var AFFINITY = {
288419
288482
  "grok-4.5": 0.93,
288420
288483
  "claude-sonnet-5": 0.9,
288421
288484
  "deepseek-v4-pro": 0.9,
288422
- "kimi-k3": 0.9
288485
+ "kimi-k3.1-pro": 0.9
288423
288486
  },
288424
288487
  vision: {
288425
288488
  "gemini-3.1-pro": 0.96,
288426
288489
  "qwen3.7-max": 0.9,
288427
288490
  "claude-sonnet-4.6": 0.9,
288428
- "kimi-k3": 0.9,
288491
+ "kimi-k3.1-pro": 0.9,
288429
288492
  "grok-4.3": 0.9
288430
288493
  },
288431
288494
  // Long-context eligibility is necessary but not sufficient: a provider can
@@ -288442,13 +288505,18 @@ var AFFINITY = {
288442
288505
  // A structured extraction must preserve both the output contract and the
288443
288506
  // source-language fields. For Mandarin input the language-native Kimi
288444
288507
  // candidate gets a distinct band — a candidate-pool decision, not a post-hoc
288445
- // override, so it still falls back normally when Kimi is unavailable. Kimi
288446
- // K3 costs ~5x its retired sibling K2.7, so the band must be wider than the
288447
- // auto affinityFloorGap (0.10) or price alone re-selects a non-native model
288448
- // for Mandarin input; 0.12 keeps K3 alone in the primary band for zh and
288449
- // leaves every other language untouched.
288508
+ // override, so it still falls back normally when Kimi is unavailable. The
288509
+ // Kimi flagship costs several times the cheap extraction models, so the band
288510
+ // must be wider than the auto affinityFloorGap (0.10) or price alone
288511
+ // re-selects a non-native model for Mandarin input; 0.12 keeps Kimi alone in
288512
+ // the primary band for zh and leaves every other language untouched.
288513
+ //
288514
+ // Every "kimi-k3.1-pro" value in AFFINITY is carried over from the Kimi
288515
+ // flagship it replaced (K3, whose values were in turn carried from K2.7);
288516
+ // none is a K3.1 Pro trajectory measurement. K3.1 Pro's own evidence is the
288517
+ // 2026-11-23 live probe: 3/3 completions, 0 errors, a well-formed tool call.
288450
288518
  extractionZh: {
288451
- "kimi-k3": 1,
288519
+ "kimi-k3.1-pro": 1,
288452
288520
  "gemini-3.5-flash": 0.88,
288453
288521
  "gemini-2.5-flash": 0.88,
288454
288522
  "gpt-4o-mini": 0.88,
@@ -288456,7 +288524,7 @@ var AFFINITY = {
288456
288524
  "claude-sonnet-4.6": 0.88
288457
288525
  },
288458
288526
  extraction: {
288459
- "kimi-k3": 0.9,
288527
+ "kimi-k3.1-pro": 0.9,
288460
288528
  "gemini-3.5-flash": 0.9,
288461
288529
  "gemini-2.5-flash": 0.9,
288462
288530
  "gpt-4o-mini": 0.9,
@@ -288466,7 +288534,7 @@ var AFFINITY = {
288466
288534
  chat: {
288467
288535
  "gemini-3.5-flash": 0.86,
288468
288536
  "gemini-2.5-flash": 0.86,
288469
- "kimi-k3": 0.86
288537
+ "kimi-k3.1-pro": 0.86
288470
288538
  }
288471
288539
  };
288472
288540
  function affinityBand(features) {
@@ -288533,7 +288601,7 @@ function evidenceCandidates(task) {
288533
288601
  "anthropic/claude-sonnet-5",
288534
288602
  "openai/gpt-5-mini",
288535
288603
  "google/gemini-3.5-flash",
288536
- "moonshot/kimi-k3",
288604
+ "moonshot/kimi-k3.1-pro",
288537
288605
  "deepseek/deepseek-v4-pro"
288538
288606
  ];
288539
288607
  }
@@ -288546,7 +288614,7 @@ function evidenceCandidates(task) {
288546
288614
  "openai/gpt-4o-mini",
288547
288615
  "google/gemini-3.5-flash",
288548
288616
  "openai/gpt-5.3-codex",
288549
- "moonshot/kimi-k3",
288617
+ "moonshot/kimi-k3.1-pro",
288550
288618
  "deepseek/deepseek-v4-pro"
288551
288619
  ];
288552
288620
  }
@@ -288582,7 +288650,7 @@ function evidenceCandidates(task) {
288582
288650
  ];
288583
288651
  }
288584
288652
  if (task === "extraction") {
288585
- return ["moonshot/kimi-k3", "google/gemini-3.5-flash", "anthropic/claude-sonnet-5"];
288653
+ return ["moonshot/kimi-k3.1-pro", "google/gemini-3.5-flash", "anthropic/claude-sonnet-5"];
288586
288654
  }
288587
288655
  if (task === "reasoning_math") {
288588
288656
  return [
@@ -288590,7 +288658,7 @@ function evidenceCandidates(task) {
288590
288658
  "xai/grok-4.5",
288591
288659
  "anthropic/claude-sonnet-5",
288592
288660
  "deepseek/deepseek-v4-pro",
288593
- "moonshot/kimi-k3"
288661
+ "moonshot/kimi-k3.1-pro"
288594
288662
  ];
288595
288663
  }
288596
288664
  return [];
@@ -288601,6 +288669,7 @@ var VERIFIED_TOOL_FALLBACKS = [
288601
288669
  "anthropic/claude-sonnet-5.5",
288602
288670
  "deepseek/deepseek-v4.1-flash",
288603
288671
  "google/gemini-3.8-flash",
288672
+ "google/gemini-4-carbon",
288604
288673
  "openai/gpt-5.1",
288605
288674
  "openai/gpt-6-astra",
288606
288675
  "openai/gpt-6-luna",
@@ -290672,7 +290741,7 @@ function deduplicateLargeBlocks(messages) {
290672
290741
  if (!msg.content || typeof msg.content !== "string" || msg.content.length < 500) {
290673
290742
  return msg;
290674
290743
  }
290675
- const blockKey = msg.content.slice(0, 200);
290744
+ const blockKey = msg.content;
290676
290745
  if (blockHashes.has(blockKey)) {
290677
290746
  const firstIdx = blockHashes.get(blockKey);
290678
290747
  const original = msg.content;
@@ -293565,7 +293634,10 @@ function estimateAmount(modelId, bodyLength, maxTokens, models = BLOCKRUN_MODEL_
293565
293634
  } else {
293566
293635
  const estimatedInputTokens = Math.ceil(bodyLength / 4);
293567
293636
  const estimatedOutputTokens = maxTokens || model.maxOutput || 4096;
293568
- costUsd = estimatedInputTokens / 1e6 * model.inputPrice + estimatedOutputTokens / 1e6 * model.outputPrice;
293637
+ costUsd = withPlatformFee(
293638
+ estimatedInputTokens / 1e6 * model.inputPrice + estimatedOutputTokens / 1e6 * model.outputPrice,
293639
+ model.platformFeePercent
293640
+ );
293569
293641
  }
293570
293642
  if (costUsd > 0) costUsd += 1e-3;
293571
293643
  const amountMicros = Math.max(1e3, Math.ceil(costUsd * 1.2 * 1e6));
@@ -298113,7 +298185,10 @@ data: [DONE]
298113
298185
  } else if (apiKeyPricing) {
298114
298186
  const inTokens = responseInputTokens ?? chargedInputTokens;
298115
298187
  const outTokens = responseOutputTokens ?? 0;
298116
- logCost2 = (inTokens * (apiKeyPricing.inputPrice ?? 0) + outTokens * (apiKeyPricing.outputPrice ?? 0)) / 1e6;
298188
+ logCost2 = withPlatformFee(
298189
+ (inTokens * (apiKeyPricing.inputPrice ?? 0) + outTokens * (apiKeyPricing.outputPrice ?? 0)) / 1e6,
298190
+ modelsById.get(logModel)?.platformFeePercent
298191
+ );
298117
298192
  logSavings = costs.baselineCost > 0 ? Math.max(0, (costs.baselineCost - logCost2) / costs.baselineCost) : 0;
298118
298193
  } else {
298119
298194
  logCost2 = costs.costEstimate;
@@ -309807,6 +309882,11 @@ async function redeemPosition(input2, deps) {
309807
309882
  }
309808
309883
  }
309809
309884
 
309885
+ // src/polymarket/units.ts
309886
+ function usdToBaseUnits(usd, decimals) {
309887
+ return BigInt(Math.round(usd * 10 ** decimals));
309888
+ }
309889
+
309810
309890
  // src/polymarket/withdraw.ts
309811
309891
  async function rawPusdBalance(owner) {
309812
309892
  return getPublicClient().readContract({
@@ -309839,7 +309919,7 @@ async function withdrawFunds(input2, deps) {
309839
309919
  isError: true
309840
309920
  };
309841
309921
  }
309842
- const amountRaw = input2.amount_usd !== void 0 ? BigInt(Math.floor(input2.amount_usd * 10 ** PUSD_DECIMALS)) : balanceRaw;
309922
+ const amountRaw = input2.amount_usd !== void 0 ? usdToBaseUnits(input2.amount_usd, PUSD_DECIMALS) : balanceRaw;
309843
309923
  if (amountRaw > balanceRaw) {
309844
309924
  return {
309845
309925
  text: `Requested $${input2.amount_usd} exceeds the pUSD balance of $${balanceUsd.toFixed(2)}.`,
@@ -310022,7 +310102,7 @@ async function fundVault(input2, deps) {
310022
310102
  };
310023
310103
  }
310024
310104
  const privateKey = getOrCreateWalletKey();
310025
- const amountMicro = String(Math.floor(amountUsd * 10 ** USDC_DECIMALS));
310105
+ const amountMicro = String(usdToBaseUnits(amountUsd, USDC_DECIMALS));
310026
310106
  const network = `eip155:${BASE_CHAIN_ID3}`;
310027
310107
  const depositAuthorization = await signUnderSpendPolicy(
310028
310108
  deps,
@@ -1714,8 +1714,8 @@ var DEFAULT_ROUTING_CONFIG = {
1714
1714
  // $2.50/$15 — previous flagship, benchmarked
1715
1715
  "zai/glm-5.3",
1716
1716
  // $1.40/$4.40, 1M ctx, always-on thinking — verified live 2026-08-19
1717
- "moonshot/kimi-k3",
1718
- // $3/$15, 1M ctx — Moonshot flagship (K2.7 successor)
1717
+ "moonshot/kimi-k3.1-pro",
1718
+ // $2/$10, 1M ctx — Moonshot flagship (K3 successor)
1719
1719
  "deepseek/deepseek-v4-pro",
1720
1720
  // $0.435/$0.87 — strongest open-weight reasoner
1721
1721
  "deepseek/deepseek-chat",
@@ -1855,8 +1855,8 @@ var DEFAULT_ROUTING_CONFIG = {
1855
1855
  fallback: [
1856
1856
  "anthropic/claude-sonnet-5",
1857
1857
  // $3/$15 — code_agent band 0.98
1858
- "moonshot/kimi-k3",
1859
- // $3/$15, 1M ctx — Moonshot flagship
1858
+ "moonshot/kimi-k3.1-pro",
1859
+ // $2/$10, 1M ctx — Moonshot flagship
1860
1860
  "zai/glm-5.3",
1861
1861
  // $1.40/$4.40 — long-horizon coding
1862
1862
  "google/gemini-3.6-flash",
@@ -1894,7 +1894,7 @@ var DEFAULT_ROUTING_CONFIG = {
1894
1894
  "anthropic/claude-sonnet-4.6",
1895
1895
  "xai/grok-4.5",
1896
1896
  // xAI flagship — 503-resistant, direct-xAI SKU
1897
- "moonshot/kimi-k3",
1897
+ "moonshot/kimi-k3.1-pro",
1898
1898
  // Moonshot flagship, independent infra
1899
1899
  "openai/gpt-5.6-terra",
1900
1900
  // GPT-5.6 balanced tier — stable (Sol excluded: #202)
@@ -1974,8 +1974,8 @@ var DEFAULT_ROUTING_CONFIG = {
1974
1974
  // $1/$5
1975
1975
  "deepseek/deepseek-chat",
1976
1976
  // $0.14/$0.28
1977
- "moonshot/kimi-k3"
1978
- // $3/$15 — tool_agent band 0.85
1977
+ "moonshot/kimi-k3.1-pro"
1978
+ // $2/$10 — tool_agent band 0.85
1979
1979
  ]
1980
1980
  },
1981
1981
  COMPLEX: {
@@ -1997,7 +1997,7 @@ var DEFAULT_ROUTING_CONFIG = {
1997
1997
  // Flagship Opus — in-family hot swap
1998
1998
  "xai/grok-4.5",
1999
1999
  // xAI flagship — strong tool use, independent infra
2000
- "moonshot/kimi-k3",
2000
+ "moonshot/kimi-k3.1-pro",
2001
2001
  // Moonshot flagship — independent infra
2002
2002
  "openai/gpt-5.6-terra",
2003
2003
  // GPT-5.6 balanced tier — stable (Sol excluded: #202)
@@ -2063,6 +2063,13 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
2063
2063
  supportsTools: true,
2064
2064
  supportsVision: true
2065
2065
  },
2066
+ "anthropic/claude-fable-5.2": {
2067
+ // supportsTools: not probed — fails closed
2068
+ contextWindow: 1e6,
2069
+ maxOutputTokens: 128e3,
2070
+ supportsTools: false,
2071
+ supportsVision: true
2072
+ },
2066
2073
  "anthropic/claude-haiku-4.5": {
2067
2074
  // override: The public catalog's `categories` omit "vision" for this Anthropic model even though the gateway accepts image input for it (the prior hand-maintained snapshot had it, and Anthropic's model card lists it). Without this the vision filter would silently drop it — reported against the catalog; remove once the categories carry vision.
2068
2075
  contextWindow: 2e5,
@@ -2232,6 +2239,26 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
2232
2239
  supportsTools: false,
2233
2240
  supportsVision: true
2234
2241
  },
2242
+ "google/gemini-4-carbon": {
2243
+ contextWindow: 1048576,
2244
+ maxOutputTokens: 65536,
2245
+ supportsTools: true,
2246
+ supportsVision: true
2247
+ },
2248
+ "google/gemini-4-hydrogen": {
2249
+ // supportsTools: not probed — fails closed
2250
+ contextWindow: 1048576,
2251
+ maxOutputTokens: 65536,
2252
+ supportsTools: false,
2253
+ supportsVision: true
2254
+ },
2255
+ "google/gemini-4-neon": {
2256
+ // supportsTools: not probed — fails closed
2257
+ contextWindow: 1048576,
2258
+ maxOutputTokens: 65536,
2259
+ supportsTools: false,
2260
+ supportsVision: true
2261
+ },
2235
2262
  "minimax/minimax-m2.7": {
2236
2263
  contextWindow: 204800,
2237
2264
  maxOutputTokens: 16384,
@@ -2251,18 +2278,10 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
2251
2278
  supportsTools: false,
2252
2279
  supportsVision: true
2253
2280
  },
2254
- "moonshot/kimi-k3": {
2255
- // absent from the 2026-11-08 listing but still routed — previous entry retained; probe before removing
2256
- contextWindow: 1048576,
2257
- maxOutputTokens: 65536,
2258
- supportsTools: true,
2259
- supportsVision: true
2260
- },
2261
2281
  "moonshot/kimi-k3.1-pro": {
2262
- // supportsTools: not probed — fails closed
2263
2282
  contextWindow: 1048576,
2264
2283
  maxOutputTokens: 65536,
2265
- supportsTools: false,
2284
+ supportsTools: true,
2266
2285
  supportsVision: true
2267
2286
  },
2268
2287
  "nvidia/minimax-m3.1-flash": {
@@ -2474,6 +2493,20 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
2474
2493
  supportsTools: true,
2475
2494
  supportsVision: true
2476
2495
  },
2496
+ "openai/gpt-6.2-astra": {
2497
+ // supportsTools: not probed — fails closed
2498
+ contextWindow: 105e4,
2499
+ maxOutputTokens: 128e3,
2500
+ supportsTools: false,
2501
+ supportsVision: true
2502
+ },
2503
+ "openai/gpt-6.2-sol": {
2504
+ // supportsTools: not probed — fails closed
2505
+ contextWindow: 105e4,
2506
+ maxOutputTokens: 128e3,
2507
+ supportsTools: false,
2508
+ supportsVision: true
2509
+ },
2477
2510
  "openai/o1": {
2478
2511
  contextWindow: 2e5,
2479
2512
  maxOutputTokens: 1e5,
@@ -2830,6 +2863,14 @@ var model_profiles_generated_default = {
2830
2863
  errorRate: 0,
2831
2864
  samples: 3
2832
2865
  },
2866
+ "moonshot/kimi-k3.1-pro": {
2867
+ measuredAt: "2026-11-23T20:18:18Z",
2868
+ latencyMs: 9243.1,
2869
+ p95LatencyMs: 10504.1,
2870
+ outputTokensPerSecond: 55.89,
2871
+ errorRate: 0,
2872
+ samples: 3
2873
+ },
2833
2874
  "nvidia/mistral-nemotron": {
2834
2875
  measuredAt: "2026-08-29T16:51:33Z",
2835
2876
  latencyMs: 7349.6,
@@ -3521,7 +3562,7 @@ var AFFINITY = {
3521
3562
  "claude-sonnet-5": 0.98,
3522
3563
  "gpt-5-mini": 0.96,
3523
3564
  "gemini-3.5-flash": 0.92,
3524
- "kimi-k3": 0.9,
3565
+ "kimi-k3.1-pro": 0.9,
3525
3566
  "deepseek-v4-pro": 0.88,
3526
3567
  "glm-5.2": 0.88
3527
3568
  },
@@ -3555,7 +3596,7 @@ var AFFINITY = {
3555
3596
  "claude-sonnet-5": 0.88,
3556
3597
  "gemini-3.5-flash": 0.82,
3557
3598
  "gpt-5.3-codex": 0.81,
3558
- "kimi-k3": 0.78,
3599
+ "kimi-k3.1-pro": 0.78,
3559
3600
  "deepseek-v4-pro": 0.76
3560
3601
  },
3561
3602
  retailHigh: {
@@ -3563,7 +3604,7 @@ var AFFINITY = {
3563
3604
  "claude-sonnet-5": 0.88,
3564
3605
  "gemini-3.5-flash": 0.82,
3565
3606
  "gpt-5.3-codex": 0.81,
3566
- "kimi-k3": 0.78,
3607
+ "kimi-k3.1-pro": 0.78,
3567
3608
  "gpt-5-mini": 0.76
3568
3609
  },
3569
3610
  // Standard airline workflows stay on GPT-5 Mini: six full-session
@@ -3597,7 +3638,7 @@ var AFFINITY = {
3597
3638
  "claude-sonnet-5": 1,
3598
3639
  "gemini-3.5-flash": 0.88,
3599
3640
  "gpt-5.3-codex": 0.87,
3600
- "kimi-k3": 0.85,
3641
+ "kimi-k3.1-pro": 0.85,
3601
3642
  "gpt-5-mini": 0.84,
3602
3643
  "deepseek-v4-pro": 0.82
3603
3644
  },
@@ -3679,13 +3720,13 @@ var AFFINITY = {
3679
3720
  "grok-4.5": 0.93,
3680
3721
  "claude-sonnet-5": 0.9,
3681
3722
  "deepseek-v4-pro": 0.9,
3682
- "kimi-k3": 0.9
3723
+ "kimi-k3.1-pro": 0.9
3683
3724
  },
3684
3725
  vision: {
3685
3726
  "gemini-3.1-pro": 0.96,
3686
3727
  "qwen3.7-max": 0.9,
3687
3728
  "claude-sonnet-4.6": 0.9,
3688
- "kimi-k3": 0.9,
3729
+ "kimi-k3.1-pro": 0.9,
3689
3730
  "grok-4.3": 0.9
3690
3731
  },
3691
3732
  // Long-context eligibility is necessary but not sufficient: a provider can
@@ -3702,13 +3743,18 @@ var AFFINITY = {
3702
3743
  // A structured extraction must preserve both the output contract and the
3703
3744
  // source-language fields. For Mandarin input the language-native Kimi
3704
3745
  // candidate gets a distinct band — a candidate-pool decision, not a post-hoc
3705
- // override, so it still falls back normally when Kimi is unavailable. Kimi
3706
- // K3 costs ~5x its retired sibling K2.7, so the band must be wider than the
3707
- // auto affinityFloorGap (0.10) or price alone re-selects a non-native model
3708
- // for Mandarin input; 0.12 keeps K3 alone in the primary band for zh and
3709
- // leaves every other language untouched.
3746
+ // override, so it still falls back normally when Kimi is unavailable. The
3747
+ // Kimi flagship costs several times the cheap extraction models, so the band
3748
+ // must be wider than the auto affinityFloorGap (0.10) or price alone
3749
+ // re-selects a non-native model for Mandarin input; 0.12 keeps Kimi alone in
3750
+ // the primary band for zh and leaves every other language untouched.
3751
+ //
3752
+ // Every "kimi-k3.1-pro" value in AFFINITY is carried over from the Kimi
3753
+ // flagship it replaced (K3, whose values were in turn carried from K2.7);
3754
+ // none is a K3.1 Pro trajectory measurement. K3.1 Pro's own evidence is the
3755
+ // 2026-11-23 live probe: 3/3 completions, 0 errors, a well-formed tool call.
3710
3756
  extractionZh: {
3711
- "kimi-k3": 1,
3757
+ "kimi-k3.1-pro": 1,
3712
3758
  "gemini-3.5-flash": 0.88,
3713
3759
  "gemini-2.5-flash": 0.88,
3714
3760
  "gpt-4o-mini": 0.88,
@@ -3716,7 +3762,7 @@ var AFFINITY = {
3716
3762
  "claude-sonnet-4.6": 0.88
3717
3763
  },
3718
3764
  extraction: {
3719
- "kimi-k3": 0.9,
3765
+ "kimi-k3.1-pro": 0.9,
3720
3766
  "gemini-3.5-flash": 0.9,
3721
3767
  "gemini-2.5-flash": 0.9,
3722
3768
  "gpt-4o-mini": 0.9,
@@ -3726,7 +3772,7 @@ var AFFINITY = {
3726
3772
  chat: {
3727
3773
  "gemini-3.5-flash": 0.86,
3728
3774
  "gemini-2.5-flash": 0.86,
3729
- "kimi-k3": 0.86
3775
+ "kimi-k3.1-pro": 0.86
3730
3776
  }
3731
3777
  };
3732
3778
  function affinityBand(features) {
@@ -3793,7 +3839,7 @@ function evidenceCandidates(task) {
3793
3839
  "anthropic/claude-sonnet-5",
3794
3840
  "openai/gpt-5-mini",
3795
3841
  "google/gemini-3.5-flash",
3796
- "moonshot/kimi-k3",
3842
+ "moonshot/kimi-k3.1-pro",
3797
3843
  "deepseek/deepseek-v4-pro"
3798
3844
  ];
3799
3845
  }
@@ -3806,7 +3852,7 @@ function evidenceCandidates(task) {
3806
3852
  "openai/gpt-4o-mini",
3807
3853
  "google/gemini-3.5-flash",
3808
3854
  "openai/gpt-5.3-codex",
3809
- "moonshot/kimi-k3",
3855
+ "moonshot/kimi-k3.1-pro",
3810
3856
  "deepseek/deepseek-v4-pro"
3811
3857
  ];
3812
3858
  }
@@ -3842,7 +3888,7 @@ function evidenceCandidates(task) {
3842
3888
  ];
3843
3889
  }
3844
3890
  if (task === "extraction") {
3845
- return ["moonshot/kimi-k3", "google/gemini-3.5-flash", "anthropic/claude-sonnet-5"];
3891
+ return ["moonshot/kimi-k3.1-pro", "google/gemini-3.5-flash", "anthropic/claude-sonnet-5"];
3846
3892
  }
3847
3893
  if (task === "reasoning_math") {
3848
3894
  return [
@@ -3850,7 +3896,7 @@ function evidenceCandidates(task) {
3850
3896
  "xai/grok-4.5",
3851
3897
  "anthropic/claude-sonnet-5",
3852
3898
  "deepseek/deepseek-v4-pro",
3853
- "moonshot/kimi-k3"
3899
+ "moonshot/kimi-k3.1-pro"
3854
3900
  ];
3855
3901
  }
3856
3902
  return [];
@@ -3861,6 +3907,7 @@ var VERIFIED_TOOL_FALLBACKS = [
3861
3907
  "anthropic/claude-sonnet-5.5",
3862
3908
  "deepseek/deepseek-v4.1-flash",
3863
3909
  "google/gemini-3.8-flash",
3910
+ "google/gemini-4-carbon",
3864
3911
  "openai/gpt-5.1",
3865
3912
  "openai/gpt-6-astra",
3866
3913
  "openai/gpt-6-luna",
package/docs/features.md CHANGED
@@ -186,7 +186,7 @@ Use short aliases instead of full model paths:
186
186
  /model gpt5 # openai/gpt-5.6-terra; /model gpt-6-astra, gpt-6-sol, gpt-6-luna for GPT-6
187
187
  /model deepseek # deepseek/deepseek-chat
188
188
  /model reasoner # deepseek/deepseek-reasoner
189
- /model kimi # moonshot/kimi-k2.7; /model kimi-k3 for the 1M-ctx flagship
189
+ /model kimi # moonshot/kimi-k2.7; /model kimi-k3.1-pro for the 1M-ctx flagship
190
190
  /model glm # zai/glm-5.3
191
191
  /model gemini # google/gemini-2.5-pro
192
192
  /model flash # google/gemini-2.5-flash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/clawrouter",
3
- "version": "0.12.317",
3
+ "version": "0.12.319",
4
4
  "description": "Smart LLM router — save 84% on inference costs. 91 models (8 free). Pay by credit card (API key) or USDC (x402 wallet).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -116,7 +116,7 @@
116
116
  },
117
117
  "devDependencies": {
118
118
  "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/fbe63065c111020f7868d3b444480501423b4fbd",
119
- "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/273c2af0a9abe70212efbad7117b72eb3038cffc",
119
+ "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/02136fb6debedead5747f618b3381894331f9330",
120
120
  "@eslint/js": "^10.0.1",
121
121
  "eslint": "^10.2.0",
122
122
  "openclaw": "^2026.7.2-beta.7",
@@ -140,7 +140,7 @@ it against a baseline nobody wrote down. See
140
140
 
141
141
  ## Available Models
142
142
 
143
- <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> models including: gpt-6-astra [GPT-6 flagship, 1M ctx], gpt-6-sol, gpt-6.1-sol [refreshed Sol], gpt-6-luna [fast], gpt-5.6-terra [balanced, stable default], gpt-5.6-sol [flagship], gpt-5.6-luna [cost-efficient], gpt-5.6-sol/terra/luna-pro [pro reasoning tiers], gpt-5.5, gpt-5.5-pro [max compute], chat-latest [ChatGPT Instant], gpt-5.4, gpt-5.1, gpt-4o, o3, claude-fable-5.1, claude-fable-5, claude-opus-5.5 [newest Opus], claude-opus-5 [1M ctx], claude-opus-4.8, claude-opus-4.7, claude-opus-4.5, claude-sonnet-5.5, claude-sonnet-5, claude-sonnet-4.6, gemini-3.1-pro, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-2.5-flash, deepseek-v4-pro, deepseek-chat, grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-build-0.1, glm-5.3 [Z.AI flagship, 1M ctx], glm-5.3-flash [natively multimodal, 1M ctx], glm-5.2, minimax-m3, kimi-k3 [1M ctx flagship], kimi-k2.7, qwen3.8-max [Qwen 3.8 flagship, 1M ctx], qwen3.7-max, qwen3.7-plus, qwen3.7-flash, mimo [Xiaomi MiMo-V2.5 Pro, 1M ctx], mistral-large-4 [Mistral flagship, 512K ctx, vision], hy4-preview [Tencent, 770B MoE], laguna-s-2.1 [Poolside, coding], and <!-- br:models.free -->8<!-- /br:models.free --> free open-weight models (nemotron-3.5-lightning [1M ctx, thinking mode — the free default], nemotron-3-ultra-550b [550B/55B MoE, 1M ctx — the largest free model], nemotron-3.5-bolt [about a second to answer, reads images], nemotron-3-super-120b [reasoning], nemotron-3-nano-omni-30b-a3b-reasoning [256K ctx], north-mini-code [Cohere, coding, sub-second], laguna-xs-2.1 [Poolside, coding, ~161 tok/s], muse-glimmer-30b [Meta Muse, reasoning]). Only Bolt is flagged for vision: pin it with `/model vision-free`. Otherwise image turns route to a paid vision model, because the other free models the catalogs advertise as vision-capable don't pass a solid-colour probe on both chains.
143
+ <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> models including: gpt-6-astra [GPT-6 flagship, 1M ctx], gpt-6-sol, gpt-6.1-sol [refreshed Sol], gpt-6-luna [fast], gpt-5.6-terra [balanced, stable default], gpt-5.6-sol [flagship], gpt-5.6-luna [cost-efficient], gpt-5.6-sol/terra/luna-pro [pro reasoning tiers], gpt-5.5, gpt-5.5-pro [max compute], chat-latest [ChatGPT Instant], gpt-5.4, gpt-5.1, gpt-4o, o3, claude-fable-5.1, claude-fable-5, claude-opus-5.5 [newest Opus], claude-opus-5 [1M ctx], claude-opus-4.8, claude-opus-4.7, claude-opus-4.5, claude-sonnet-5.5, claude-sonnet-5, claude-sonnet-4.6, gemini-3.1-pro, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-2.5-flash, deepseek-v4-pro, deepseek-chat, grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-build-0.1, glm-5.3 [Z.AI flagship, 1M ctx], glm-5.3-flash [natively multimodal, 1M ctx], glm-5.2, minimax-m3, kimi-k3.1-pro [1M ctx flagship], kimi-k2.7, qwen3.8-max [Qwen 3.8 flagship, 1M ctx], qwen3.7-max, qwen3.7-plus, qwen3.7-flash, mimo [Xiaomi MiMo-V2.5 Pro, 1M ctx], mistral-large-4 [Mistral flagship, 512K ctx, vision], hy4-preview [Tencent, 770B MoE], laguna-s-2.1 [Poolside, coding], and <!-- br:models.free -->8<!-- /br:models.free --> free open-weight models (nemotron-3.5-lightning [1M ctx, thinking mode — the free default], nemotron-3-ultra-550b [550B/55B MoE, 1M ctx — the largest free model], nemotron-3.5-bolt [about a second to answer, reads images], nemotron-3-super-120b [reasoning], nemotron-3-nano-omni-30b-a3b-reasoning [256K ctx], north-mini-code [Cohere, coding, sub-second], laguna-xs-2.1 [Poolside, coding, ~161 tok/s], muse-glimmer-30b [Meta Muse, reasoning]). Only Bolt is flagged for vision: pin it with `/model vision-free`. Otherwise image turns route to a paid vision model, because the other free models the catalogs advertise as vision-capable don't pass a solid-colour probe on both chains.
144
144
 
145
145
  ## Model Prices — Look Them Up Live
146
146