@blockrun/llm 4.5.0 → 4.5.1

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
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### Cut your LLM bill by <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->%. One line of TypeScript.
6
6
 
7
- The smart-routing SDK for <!-- br:models.chatVisible -->97<!-- /br:models.chatVisible --> models — every request goes to the cheapest model that can handle it,
7
+ The smart-routing SDK for <!-- br:models.chatVisible -->93<!-- /br:models.chatVisible --> models — every request goes to the cheapest model that can handle it,
8
8
  paid with an API key or per-request USDC on Solana, Base or Arc. No vendor lock-in.
9
9
 
10
10
  [![npm](https://img.shields.io/npm/v/@blockrun/llm.svg?style=flat-square)](https://www.npmjs.com/package/@blockrun/llm)
@@ -44,7 +44,7 @@ console.log(r.response); // the proof
44
44
  ## Why This SDK
45
45
 
46
46
  - 🧠 **Smart routing that pays for itself.** The bundled [Router Core V3](https://github.com/BlockRunAI/router-core) engine (shared with [ClawRouter](https://github.com/BlockRunAI/ClawRouter)) classifies every request locally in <1ms across <!-- br:clawrouter.dimensions -->15<!-- /br:clawrouter.dimensions --> dimensions and routes to the cheapest capable model.
47
- - 🆓 **<!-- br:models.free -->9<!-- /br:models.free --> genuinely free models.** $0 in and out, including two 1M-context Nemotrons, two that accept images, a 1M-context MiniMax and a free Poolside coding model.
47
+ - 🆓 **<!-- br:models.free -->8<!-- /br:models.free --> genuinely free models.** $0 in and out, including two 1M-context Nemotrons, two that accept images, a 1M-context MiniMax and a free Poolside coding model.
48
48
  - 🔐 **Two ways to connect.** A **BlockRun API key** billed against account credit ([sign up](https://user.blockrun.ai), [create a key](https://user.blockrun.ai/dashboard/keys), [add credit](https://user.blockrun.ai/dashboard/credits)), or a wallet signature with x402 micropayments and no account at all. Same code either way.
49
49
  - 💸 **Pay per request in USDC.** x402 micropayments on Solana, Base or Arc. Agents can fund and pay their own way.
50
50
  - 🛡️ **Automatic failover.** Transient errors (timeouts, 429, 5xx) before payment walk the router's ranked fallback chain instead of failing your request; a failure after a payment was sent never buys a second model.
@@ -56,8 +56,8 @@ console.log(r.response); // the proof
56
56
  | | OpenAI SDK | OpenRouter | LiteLLM | **@blockrun/llm** |
57
57
  | ------------------ | -------------- | ----------------- | ---------------- | ----------------------------------------------------------------------- |
58
58
  | **Cost routing** | ✗ one vendor | Manual selection | Manual selection | **Automatic — <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% cheaper** |
59
- | **Models** | GPT only | 200+ | 100+ (BYO keys) | **<!-- br:models.chatVisible -->97<!-- /br:models.chatVisible -->, one credential** |
60
- | **Free tier** | ✗ | Rate-limited | ✗ | **<!-- br:models.free -->9<!-- /br:models.free --> models, no signup** |
59
+ | **Models** | GPT only | 200+ | 100+ (BYO keys) | **<!-- br:models.chatVisible -->93<!-- /br:models.chatVisible -->, one credential** |
60
+ | **Free tier** | ✗ | Rate-limited | ✗ | **<!-- br:models.free -->8<!-- /br:models.free --> models, no signup** |
61
61
  | **Auth** | API key | Account + API key | Your API keys | **API key *or* wallet signature** |
62
62
  | **Payment** | Card + invoice | Credit card | BYO keys | **Account credit or USDC per-request** |
63
63
  | **Agent-ready** | ✗ | ✗ | ✗ | **✓ — one key, or agents fund their own wallet** |
@@ -200,7 +200,7 @@ const result = await client.smartChat('Hello!');
200
200
  console.log(result.model, result.response);
201
201
 
202
202
  // Or pin a model yourself
203
- const reply = await client.chat('openai/gpt-5.4', 'Hello!');
203
+ const reply = await client.chat('openai/gpt-6.2-sol', 'Hello!');
204
204
  ```
205
205
 
206
206
  That's it. The SDK handles the x402 payment, and `smartChat()` keeps the bill
@@ -269,7 +269,7 @@ const tools: Tool[] = [{
269
269
 
270
270
  // 1. smartChat(): one-line routed chat
271
271
  const result = await client.smartChat('What is the capital of France?');
272
- console.log(result.model); // 'google/gemini-2.5-flash'
272
+ console.log(result.model); // 'google/gemini-3.5-flash-lite'
273
273
  console.log(`Saved ${(result.routing.savings * 100).toFixed(0)}%`); // 'Saved 90%': this request vs the baseline
274
274
 
275
275
  // 2. smartChatCompletion(): full agent / tool conversations, routed
@@ -280,11 +280,11 @@ const reply = await client.chatCompletion('blockrun/auto', messages);
280
280
 
281
281
  // Inspect a decision without paying for anything
282
282
  const decision = await client.route('Prove the Riemann hypothesis step by step');
283
- console.log(decision.model); // 'deepseek/deepseek-v4-pro'
283
+ console.log(decision.model); // 'google/gemini-3.6-flash'
284
284
  console.log(decision.method); // 'portfolio'
285
285
  console.log(decision.taskType); // 'reasoning'
286
286
  console.log(decision.candidates); // ranked, capability-eligible models
287
- console.log(decision.fallbacks); // ['google/gemini-3.5-flash', 'deepseek/deepseek-reasoner', 'xai/grok-4.3', ...]
287
+ console.log(decision.fallbacks); // ['deepseek/deepseek-v4-pro', 'deepseek/deepseek-reasoner', 'xai/grok-4.3', ...]
288
288
  ```
289
289
 
290
290
  The aliases are resolved locally by `chat()` and `chatCompletion()` on both
@@ -353,7 +353,7 @@ const reply = await client.chat('nvidia/nemotron-3.5-lightning', 'hello', {
353
353
 
354
354
  | Profile | Strategy | Savings vs Opus 5 | Best For |
355
355
  |---------|----------|-------------------|----------|
356
- | `eco` | Cheapest capable model — ranks the <!-- br:models.free -->9<!-- /br:models.free -->-model free tier first | **<!-- br:savings.ecoVsBaselinePct -->98<!-- /br:savings.ecoVsBaselinePct -->%** | Cost-sensitive production, zero-cost testing |
356
+ | `eco` | Cheapest capable model — ranks the <!-- br:models.free -->8<!-- /br:models.free -->-model free tier first | **<!-- br:savings.ecoVsBaselinePct -->98<!-- /br:savings.ecoVsBaselinePct -->%** | Cost-sensitive production, zero-cost testing |
357
357
  | `auto` | Best balance of cost and quality (default) | **<!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->%** | General use |
358
358
  | `premium` | Highest-quality model per tier | 0% | Quality-critical tasks |
359
359
 
@@ -406,9 +406,9 @@ anchors the portfolio's candidate pool):
406
406
 
407
407
  | Tier | Example Tasks | ECO | AUTO | PREMIUM |
408
408
  |------|---------------|-----|------|---------|
409
- | SIMPLE | "What is the capital of France?", definitions | nemotron-3.5-lightning (**FREE**) | gemini-2.5-flash | gemini-3.5-flash |
410
- | MEDIUM | Code snippets, explanations | glm-5.3-flash | gemini-3.5-flash | gpt-5.3-codex |
411
- | COMPLEX | Architecture, long documents | glm-5.3-flash | gemini-3.1-pro | claude-fable-5 |
409
+ | SIMPLE | "What is the capital of France?", definitions | nemotron-3.5-lightning (**FREE**) | gemini-3.5-flash-lite | gemini-3.6-flash |
410
+ | MEDIUM | Code snippets, explanations | glm-5.3-flash | gemini-3.6-flash | gpt-5.3-codex |
411
+ | COMPLEX | Architecture, long documents | glm-5.3-flash | gemini-3.1-pro | claude-opus-5.5 |
412
412
  | REASONING | Proofs, multi-step reasoning | deepseek-reasoner | deepseek-reasoner | claude-sonnet-5 |
413
413
 
414
414
  This table mirrors the pinned router-core `DEFAULT_ROUTING_CONFIG`;
@@ -640,7 +640,7 @@ console.log(routed.model, routed.response);
640
640
  const response = await client.chat('deepseek/deepseek-chat', 'gm Solana');
641
641
 
642
642
  // Live Search with Grok
643
- const trending = await client.chat('xai/grok-4.5', 'What is trending on X?', { search: true });
643
+ const trending = await client.chat('xai/grok-4.7', 'What is trending on X?', { search: true });
644
644
 
645
645
  // xAI x_search on chosen accounts, structured output, real cost per call
646
646
  const res = await client.chatCompletion('xai/grok-4.3', [
@@ -736,7 +736,7 @@ const client = new SolanaLLMClient({
736
736
  await client.smartChat('gm');
737
737
 
738
738
  // Later calls are metered: you pay for the tokens the call actually used.
739
- const reply = await client.chat('anthropic/claude-sonnet-4.6', 'Summarize x402 in one line', {
739
+ const reply = await client.chat('anthropic/claude-sonnet-5.5', 'Summarize x402 in one line', {
740
740
  maxTokens: 2048, // a ceiling, not a price
741
741
  });
742
742
 
@@ -769,7 +769,7 @@ import { LLMClient } from '@blockrun/llm';
769
769
  const client = new LLMClient({ apiUrl: 'https://arc.blockrun.ai/api' });
770
770
 
771
771
  const routed = await client.smartChat('gm Arc');
772
- const response = await client.chat('openai/gpt-5.4', 'gm Arc');
772
+ const response = await client.chat('openai/gpt-6.1-sol', 'gm Arc');
773
773
  ```
774
774
 
775
775
  The 402 from that host names `eip155:5042`, and the SDK signs the EIP-3009 authorization against Arc's USDC (`0x3600…0000`, EIP-712 domain `USDC` v2), never Base's. Circle's facilitator verifies and settles it on Arc; you pay no gas. Which networks the SDK can sign for is the exported `EVM_NETWORKS` table (Base, Arc, Base Sepolia); a 402 naming any other network, or a non-USDC asset, is refused before anything is signed.
@@ -861,7 +861,7 @@ const messages: ChatMessage[] = [
861
861
  { role: 'user', content: 'Explain quantum computing in simple terms' },
862
862
  ];
863
863
 
864
- const response = await client.chatCompletionStream('google/gemini-2.5-flash', messages);
864
+ const response = await client.chatCompletionStream('google/gemini-3.5-flash-lite', messages);
865
865
 
866
866
  const reader = response.body!.getReader();
867
867
  const decoder = new TextDecoder();
@@ -960,19 +960,23 @@ gateway's health check holds it back; it stays on the free tier.
960
960
  `nemotron-3.5-bolt` for free image input.
961
961
 
962
962
  <details>
963
- <summary><strong>Paid chat models</strong> — OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot, MiniMax, Z.ai, Qwen, Mistral, Tencent, Poolside, Xiaomi</summary>
963
+ <summary><strong>Paid chat models</strong> — OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot, MiniMax, Z.ai, Qwen, Mistral, Tencent, Poolside, Xiaomi, Meta, Reflection</summary>
964
964
 
965
965
  ### OpenAI
966
966
 
967
967
  GPT-6: Astra is the flagship for long-horizon agentic work and computer use,
968
968
  Sol the cost-efficient tier for complex coding, Luna the fast low-cost tier.
969
+ GPT-6.2 refreshes Astra and Sol at the same tiers.
969
970
  GPT-5.6: three tiers on one base (Sol deepest reasoning, Terra balanced, Luna
970
971
  cheap and fast), each with a `-pro` sibling that thinks longer at the same
971
972
  token price.
972
973
 
973
974
  | Model | Context | Notes |
974
975
  |---|---|---|
976
+ | `openai/gpt-6.2-astra` | 1.05M | GPT-6.2 flagship for the hardest long-horizon work |
977
+ | `openai/gpt-6.2-sol` | 1.05M | Everyday GPT-6.2 for coding and agents at scale |
975
978
  | `openai/gpt-6.1-sol` | 1.05M | |
979
+ | `openai/gpt-6.1-terra` | 1.05M | Cost-efficient GPT-6.1 for coding and agents, at half 6.1 Sol's rate |
976
980
  | `openai/gpt-6-astra` | 1.05M | GPT-6 flagship |
977
981
  | `openai/gpt-6-sol` | 1.05M | |
978
982
  | `openai/gpt-6-luna` | 1.05M | |
@@ -993,15 +997,15 @@ token price.
993
997
  | `openai/gpt-5.2` | 400K | |
994
998
  | `openai/gpt-5.2-pro` | 400K | |
995
999
  | `openai/gpt-5.1` | 400K | Configurable reasoning effort |
996
- | `openai/gpt-5-mini` | 200K | |
1000
+ | `openai/gpt-5-mini` | 200K | Retires 2026-12-11; the gateway will redirect it to `openai/gpt-5.6-luna` |
997
1001
  | `openai/gpt-4.1` | 128K | |
998
1002
  | `openai/gpt-4.1-mini` | 128K | |
999
1003
  | `openai/gpt-4o` | 128K | |
1000
1004
  | `openai/gpt-4o-mini` | 128K | |
1001
- | `openai/o1` | 200K | Reasoning |
1002
- | `openai/o3` | 200K | Reasoning |
1003
- | `openai/o3-mini` | 128K | Reasoning |
1004
- | `openai/o4-mini` | 128K | Reasoning |
1005
+ | `openai/o3` | 200K | Reasoning. Retires 2026-12-11; the gateway will redirect it to `openai/gpt-5.4-mini` |
1006
+
1007
+ `openai/o1`, `o1-mini`, `o3-mini` and `o4-mini` have left the catalog. They
1008
+ stay callable: the gateway redirects them to `openai/gpt-5.4-mini`.
1005
1009
 
1006
1010
  ### Anthropic Claude
1007
1011
 
@@ -1023,20 +1027,25 @@ token price.
1023
1027
 
1024
1028
  ### Google Gemini
1025
1029
 
1026
- | Model | Context |
1027
- |---|---|
1028
- | `google/gemini-4-carbon` | 1M |
1029
- | `google/gemini-4-argon` | 1M |
1030
- | `google/gemini-3.1-pro` | 1M |
1031
- | `google/gemini-3.8-flash` | 1M |
1032
- | `google/gemini-3.6-flash` | 1M |
1033
- | `google/gemini-3.5-flash` | 1M |
1034
- | `google/gemini-3-flash-preview` | 1M |
1035
- | `google/gemini-3.5-flash-lite` | 1M |
1036
- | `google/gemini-3.1-flash-lite` | 1M |
1037
- | `google/gemini-2.5-pro` | 1M |
1038
- | `google/gemini-2.5-flash` | 1M |
1039
- | `google/gemini-2.5-flash-lite` | 1M |
1030
+ | Model | Context | Notes |
1031
+ |---|---|---|
1032
+ | `google/gemini-4-neon` | 1M | Newest Gemini 4 — agentic coding and knowledge work |
1033
+ | `google/gemini-4-carbon` | 1M | |
1034
+ | `google/gemini-4-argon` | 1M | |
1035
+ | `google/gemini-4-hydrogen` | 1M | Fast, efficient Gemini 4 for everyday coding and agents |
1036
+ | `google/gemini-3.1-pro` | 1M | |
1037
+ | `google/gemini-3.8-flash` | 1M | |
1038
+ | `google/gemini-3.6-flash` | 1M | |
1039
+ | `google/gemini-3-flash-preview` | 1M | |
1040
+ | `google/gemini-3.5-flash-lite` | 1M | |
1041
+ | `google/gemini-3.1-flash-lite` | 1M | |
1042
+ | `google/gemini-2.5-pro` | 1M | Retires 2026-12-01; the gateway will redirect it to `google/gemini-3.8-flash` |
1043
+ | `google/gemini-2.5-flash` | 1M | Retires 2026-12-01; the gateway will redirect it to `google/gemini-3.5-flash-lite` |
1044
+ | `google/gemini-2.5-flash-lite` | 1M | |
1045
+
1046
+ `google/gemini-3.5-flash` has left the catalog. It stays callable: Google now
1047
+ serves Gemini 3.6 Flash under that name, so the gateway redirects it to
1048
+ `google/gemini-3.6-flash`.
1040
1049
 
1041
1050
  ### DeepSeek
1042
1051
 
@@ -1091,7 +1100,7 @@ callable — the gateway redirects them to a healthy model.
1091
1100
  |---|---|---|
1092
1101
  | `mistral/mistral-large-4` | 512K | Reasoning + vision, 256K output |
1093
1102
  | `tencent/hy4-preview` | 1M | Preview |
1094
- | `poolside/laguna-s-2.1` | 1M | Paid coding model (sibling of the free XS) |
1103
+ | `poolside/laguna-s-2.1` | 1M | Paid coding model (sibling of the free XS). Not for tool calls: the 2026-11-28 tool probe got a 500 after payment, so smart routing never sends it a tool-calling turn. Plain chat works |
1095
1104
 
1096
1105
  ### Xiaomi
1097
1106
 
@@ -1100,6 +1109,18 @@ callable — the gateway redirects them to a healthy model.
1100
1109
  | `xiaomi/mimo-v2.5` | 1M |
1101
1110
  | `xiaomi/mimo-v2.5-pro` | 1M |
1102
1111
 
1112
+ ### Listed on Solana only
1113
+
1114
+ These are in the Solana catalog
1115
+ ([sol.blockrun.ai](https://sol.blockrun.ai/api/v1/models)) but not the Base
1116
+ one; call them with `SolanaLLMClient`.
1117
+
1118
+ | Model | Context | Notes |
1119
+ |---|---|---|
1120
+ | `meta/muse-wonder-1.0` | 1M | Meta's frontier model (preview), image + text input, always reasons |
1121
+ | `meta/muse-spark-1.3` | 1M | Meta's current general model, image + text input, always reasons |
1122
+ | `reflection/beam-1.0-501b-a23b` | 1M | Open-weight 501B MoE reasoning model for coding and long-horizon agents |
1123
+
1103
1124
  ### Testnet Models (Base Sepolia)
1104
1125
 
1105
1126
  | Model |
@@ -1659,7 +1680,7 @@ import { AnthropicClient } from '@blockrun/llm';
1659
1680
  const client = new AnthropicClient();
1660
1681
 
1661
1682
  const response = await client.messages.create({
1662
- model: 'claude-sonnet-4-6',
1683
+ model: 'claude-sonnet-5-5',
1663
1684
  max_tokens: 1024,
1664
1685
  messages: [{ role: 'user', content: 'Hello!' }],
1665
1686
  });
@@ -1667,7 +1688,7 @@ console.log(response.content[0]);
1667
1688
 
1668
1689
  // Any model works in Anthropic format
1669
1690
  const gptResponse = await client.messages.create({
1670
- model: 'openai/gpt-5.4',
1691
+ model: 'openai/gpt-6.2-sol',
1671
1692
  max_tokens: 1024,
1672
1693
  messages: [{ role: 'user', content: 'Hello from GPT!' }],
1673
1694
  });
@@ -1912,7 +1933,7 @@ to pick up security fixes.
1912
1933
  ## Frequently Asked Questions
1913
1934
 
1914
1935
  ### What is @blockrun/llm?
1915
- A TypeScript SDK that cuts LLM costs by <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% on a realistic workload with built-in smart routing: every request goes to the cheapest of <!-- br:models.chatVisible -->97<!-- /br:models.chatVisible --> models (OpenAI, Anthropic, Google, xAI, DeepSeek, Moonshot, and more) that can handle it, paid with an account API key or per-request USDC via x402 on Solana, Base or Arc.
1936
+ A TypeScript SDK that cuts LLM costs by <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% on a realistic workload with built-in smart routing: every request goes to the cheapest of <!-- br:models.chatVisible -->93<!-- /br:models.chatVisible --> models (OpenAI, Anthropic, Google, xAI, DeepSeek, Moonshot, and more) that can handle it, paid with an account API key or per-request USDC via x402 on Solana, Base or Arc.
1916
1937
 
1917
1938
  ### What is smart routing?
1918
1939
  Router Core V3, bundled into the SDK: the same deterministic engine that powers ClawRouter. It analyzes each request across <!-- br:clawrouter.dimensions -->15<!-- /br:clawrouter.dimensions --> dimensions locally, in under 1ms, and picks the cheapest capable model. Use `smartChat()`, `smartChatCompletion()`, or the `blockrun/auto` model alias. See [Smart Routing](#smart-routing-router-core-v3).
package/dist/index.cjs CHANGED
@@ -784,7 +784,7 @@ function buildDecisionsBody(request) {
784
784
  // src/client.ts
785
785
  var import_accounts2 = require("viem/accounts");
786
786
 
787
- // node_modules/.pnpm/@blockrun+router-core@https+++codeload.github.com+BlockRunAI+router-core+tar.gz+53fe78353e1b3_omdfyyg7rrspxbl65mdwmbpkkm/node_modules/@blockrun/router-core/dist/index.js
787
+ // node_modules/.pnpm/@blockrun+router-core@https+++codeload.github.com+BlockRunAI+router-core+tar.gz+92f77ecf38f26_fgur35njqqflxyj3ae7ccxtje4/node_modules/@blockrun/router-core/dist/index.js
788
788
  var UNSEGMENTED_SCRIPT = /[؀-ۿ -ヿ㐀-䶿一-鿿가-힯豈-﫿＀-￯]/;
789
789
  var WORD_CHAR = /[\p{L}\p{N}]/u;
790
790
  var ASCII_PHRASE = /^[a-z0-9' -]+$/;
@@ -3055,10 +3055,9 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
3055
3055
  supportsVision: false
3056
3056
  },
3057
3057
  "mistral/mistral-large-4": {
3058
- // supportsTools: not probed — fails closed
3059
3058
  contextWindow: 524288,
3060
3059
  maxOutputTokens: 262144,
3061
- supportsTools: false,
3060
+ supportsTools: true,
3062
3061
  supportsVision: true
3063
3062
  },
3064
3063
  "moonshot/kimi-k3.1-pro": {
@@ -3275,6 +3274,12 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
3275
3274
  supportsTools: true,
3276
3275
  supportsVision: true
3277
3276
  },
3277
+ "openai/gpt-6.1-terra": {
3278
+ contextWindow: 105e4,
3279
+ maxOutputTokens: 128e3,
3280
+ supportsTools: true,
3281
+ supportsVision: true
3282
+ },
3278
3283
  "openai/gpt-6.2-astra": {
3279
3284
  contextWindow: 105e4,
3280
3285
  maxOutputTokens: 128e3,
@@ -3294,7 +3299,7 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
3294
3299
  supportsVision: false
3295
3300
  },
3296
3301
  "poolside/laguna-s-2.1": {
3297
- // supportsTools: not probed — fails closed
3302
+ // supportsTools: gateway unavailable at probe time — fails closed
3298
3303
  contextWindow: 1048576,
3299
3304
  maxOutputTokens: 131072,
3300
3305
  supportsTools: false,
@@ -3327,21 +3332,19 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
3327
3332
  "qwen/qwen3.8-flash": {
3328
3333
  contextWindow: 1e6,
3329
3334
  maxOutputTokens: 131072,
3330
- supportsTools: false,
3335
+ supportsTools: true,
3331
3336
  supportsVision: true
3332
3337
  },
3333
3338
  "qwen/qwen3.8-max": {
3334
- // supportsTools: not probed — fails closed
3335
3339
  contextWindow: 1e6,
3336
3340
  maxOutputTokens: 131072,
3337
- supportsTools: false,
3341
+ supportsTools: true,
3338
3342
  supportsVision: false
3339
3343
  },
3340
3344
  "tencent/hy4-preview": {
3341
- // supportsTools: not probed — fails closed
3342
3345
  contextWindow: 1048576,
3343
3346
  maxOutputTokens: 64e3,
3344
- supportsTools: false,
3347
+ supportsTools: true,
3345
3348
  supportsVision: false
3346
3349
  },
3347
3350
  "xai/grok-4.3": {
@@ -3680,6 +3683,14 @@ var model_profiles_generated_default = {
3680
3683
  errorRate: 0,
3681
3684
  samples: 3
3682
3685
  },
3686
+ "mistral/mistral-large-4": {
3687
+ measuredAt: "2026-11-28T04:13:09Z",
3688
+ latencyMs: 6174.9,
3689
+ p95LatencyMs: 7306.8,
3690
+ outputTokensPerSecond: 84.27,
3691
+ errorRate: 0,
3692
+ samples: 3
3693
+ },
3683
3694
  "moonshot/kimi-k3": {
3684
3695
  measuredAt: "2026-08-29T16:51:33Z",
3685
3696
  latencyMs: 24498.9,
@@ -3904,6 +3915,14 @@ var model_profiles_generated_default = {
3904
3915
  errorRate: 0,
3905
3916
  samples: 3
3906
3917
  },
3918
+ "openai/gpt-6.1-terra": {
3919
+ measuredAt: "2026-11-28T04:14:35Z",
3920
+ latencyMs: 6020,
3921
+ p95LatencyMs: 6378.1,
3922
+ outputTokensPerSecond: 57.78,
3923
+ errorRate: 0,
3924
+ samples: 3
3925
+ },
3907
3926
  "openai/gpt-6.2-astra": {
3908
3927
  measuredAt: "2026-11-27T23:25:03Z",
3909
3928
  latencyMs: 7973.9,
@@ -3976,6 +3995,22 @@ var model_profiles_generated_default = {
3976
3995
  errorRate: 0,
3977
3996
  samples: 3
3978
3997
  },
3998
+ "qwen/qwen3.8-flash": {
3999
+ measuredAt: "2026-11-28T04:13:09Z",
4000
+ latencyMs: 8271.9,
4001
+ p95LatencyMs: 8495,
4002
+ outputTokensPerSecond: 61.95,
4003
+ errorRate: 0,
4004
+ samples: 3
4005
+ },
4006
+ "qwen/qwen3.8-max": {
4007
+ measuredAt: "2026-11-28T04:13:09Z",
4008
+ latencyMs: 15575.9,
4009
+ p95LatencyMs: 16331,
4010
+ outputTokensPerSecond: 32.95,
4011
+ errorRate: 0,
4012
+ samples: 3
4013
+ },
3979
4014
  "tencent/hy3": {
3980
4015
  measuredAt: "2026-08-29T16:51:33Z",
3981
4016
  latencyMs: 6062.3,
@@ -3984,6 +4019,14 @@ var model_profiles_generated_default = {
3984
4019
  errorRate: 0,
3985
4020
  samples: 3
3986
4021
  },
4022
+ "tencent/hy4-preview": {
4023
+ measuredAt: "2026-11-28T04:13:09Z",
4024
+ latencyMs: 9049.2,
4025
+ p95LatencyMs: 9460.4,
4026
+ outputTokensPerSecond: 56.69,
4027
+ errorRate: 0,
4028
+ samples: 3
4029
+ },
3987
4030
  "xai/grok-4.3": {
3988
4031
  measuredAt: "2026-08-29T16:51:33Z",
3989
4032
  latencyMs: 9467.7,
@@ -5547,7 +5590,7 @@ function getCostSummary() {
5547
5590
  }
5548
5591
 
5549
5592
  // src/version.ts
5550
- var SDK_VERSION = "4.5.0";
5593
+ var SDK_VERSION = "4.5.1";
5551
5594
  var USER_AGENT = `blockrun-ts/${SDK_VERSION}`;
5552
5595
 
5553
5596
  // src/client.ts
@@ -5654,7 +5697,7 @@ var LLMClient = class _LLMClient {
5654
5697
  /**
5655
5698
  * Simple 1-line chat interface.
5656
5699
  *
5657
- * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-4.6')
5700
+ * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-5.5')
5658
5701
  * @param prompt - User message
5659
5702
  * @param options - Optional chat parameters
5660
5703
  * @returns Assistant's response text
@@ -5725,9 +5768,9 @@ var LLMClient = class _LLMClient {
5725
5768
  * ```ts
5726
5769
  * const result = await client.smartChat('What is 2+2?');
5727
5770
  * console.log(result.response); // '4'
5728
- * console.log(result.model); // 'google/gemini-3.5-flash'
5771
+ * console.log(result.model); // 'google/gemini-3.6-flash'
5729
5772
  * console.log(result.routing.method); // 'portfolio'
5730
- * console.log(result.routing.savings); // 0.78 (78% savings)
5773
+ * console.log(result.routing.savings); // 0.84 (84% savings)
5731
5774
  * ```
5732
5775
  *
5733
5776
  * @example With routing profile
@@ -10020,7 +10063,7 @@ var BlockrunClient = class {
10020
10063
  *
10021
10064
  * Example — streaming chat:
10022
10065
  * for await (const chunk of br.stream<ChatChunk>("/v1/chat/completions", {
10023
- * model: "anthropic/claude-sonnet-4-6",
10066
+ * model: "anthropic/claude-sonnet-5.5",
10024
10067
  * messages: [{ role: "user", content: "Hi" }],
10025
10068
  * stream: true,
10026
10069
  * })) {
package/dist/index.d.cts CHANGED
@@ -1633,7 +1633,7 @@ declare class LLMClient {
1633
1633
  /**
1634
1634
  * Simple 1-line chat interface.
1635
1635
  *
1636
- * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-4.6')
1636
+ * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-5.5')
1637
1637
  * @param prompt - User message
1638
1638
  * @param options - Optional chat parameters
1639
1639
  * @returns Assistant's response text
@@ -1666,9 +1666,9 @@ declare class LLMClient {
1666
1666
  * ```ts
1667
1667
  * const result = await client.smartChat('What is 2+2?');
1668
1668
  * console.log(result.response); // '4'
1669
- * console.log(result.model); // 'google/gemini-3.5-flash'
1669
+ * console.log(result.model); // 'google/gemini-3.6-flash'
1670
1670
  * console.log(result.routing.method); // 'portfolio'
1671
- * console.log(result.routing.savings); // 0.78 (78% savings)
1671
+ * console.log(result.routing.savings); // 0.84 (84% savings)
1672
1672
  * ```
1673
1673
  *
1674
1674
  * @example With routing profile
@@ -2830,7 +2830,7 @@ declare class BlockrunClient {
2830
2830
  *
2831
2831
  * Example — streaming chat:
2832
2832
  * for await (const chunk of br.stream<ChatChunk>("/v1/chat/completions", {
2833
- * model: "anthropic/claude-sonnet-4-6",
2833
+ * model: "anthropic/claude-sonnet-5.5",
2834
2834
  * messages: [{ role: "user", content: "Hi" }],
2835
2835
  * stream: true,
2836
2836
  * })) {
package/dist/index.d.ts CHANGED
@@ -1633,7 +1633,7 @@ declare class LLMClient {
1633
1633
  /**
1634
1634
  * Simple 1-line chat interface.
1635
1635
  *
1636
- * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-4.6')
1636
+ * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-5.5')
1637
1637
  * @param prompt - User message
1638
1638
  * @param options - Optional chat parameters
1639
1639
  * @returns Assistant's response text
@@ -1666,9 +1666,9 @@ declare class LLMClient {
1666
1666
  * ```ts
1667
1667
  * const result = await client.smartChat('What is 2+2?');
1668
1668
  * console.log(result.response); // '4'
1669
- * console.log(result.model); // 'google/gemini-3.5-flash'
1669
+ * console.log(result.model); // 'google/gemini-3.6-flash'
1670
1670
  * console.log(result.routing.method); // 'portfolio'
1671
- * console.log(result.routing.savings); // 0.78 (78% savings)
1671
+ * console.log(result.routing.savings); // 0.84 (84% savings)
1672
1672
  * ```
1673
1673
  *
1674
1674
  * @example With routing profile
@@ -2830,7 +2830,7 @@ declare class BlockrunClient {
2830
2830
  *
2831
2831
  * Example — streaming chat:
2832
2832
  * for await (const chunk of br.stream<ChatChunk>("/v1/chat/completions", {
2833
- * model: "anthropic/claude-sonnet-4-6",
2833
+ * model: "anthropic/claude-sonnet-5.5",
2834
2834
  * messages: [{ role: "user", content: "Hi" }],
2835
2835
  * stream: true,
2836
2836
  * })) {
package/dist/index.js CHANGED
@@ -641,7 +641,7 @@ function buildDecisionsBody(request) {
641
641
  // src/client.ts
642
642
  import { privateKeyToAccount } from "viem/accounts";
643
643
 
644
- // node_modules/.pnpm/@blockrun+router-core@https+++codeload.github.com+BlockRunAI+router-core+tar.gz+53fe78353e1b3_omdfyyg7rrspxbl65mdwmbpkkm/node_modules/@blockrun/router-core/dist/index.js
644
+ // node_modules/.pnpm/@blockrun+router-core@https+++codeload.github.com+BlockRunAI+router-core+tar.gz+92f77ecf38f26_fgur35njqqflxyj3ae7ccxtje4/node_modules/@blockrun/router-core/dist/index.js
645
645
  var UNSEGMENTED_SCRIPT = /[؀-ۿ -ヿ㐀-䶿一-鿿가-힯豈-﫿＀-￯]/;
646
646
  var WORD_CHAR = /[\p{L}\p{N}]/u;
647
647
  var ASCII_PHRASE = /^[a-z0-9' -]+$/;
@@ -2912,10 +2912,9 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
2912
2912
  supportsVision: false
2913
2913
  },
2914
2914
  "mistral/mistral-large-4": {
2915
- // supportsTools: not probed — fails closed
2916
2915
  contextWindow: 524288,
2917
2916
  maxOutputTokens: 262144,
2918
- supportsTools: false,
2917
+ supportsTools: true,
2919
2918
  supportsVision: true
2920
2919
  },
2921
2920
  "moonshot/kimi-k3.1-pro": {
@@ -3132,6 +3131,12 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
3132
3131
  supportsTools: true,
3133
3132
  supportsVision: true
3134
3133
  },
3134
+ "openai/gpt-6.1-terra": {
3135
+ contextWindow: 105e4,
3136
+ maxOutputTokens: 128e3,
3137
+ supportsTools: true,
3138
+ supportsVision: true
3139
+ },
3135
3140
  "openai/gpt-6.2-astra": {
3136
3141
  contextWindow: 105e4,
3137
3142
  maxOutputTokens: 128e3,
@@ -3151,7 +3156,7 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
3151
3156
  supportsVision: false
3152
3157
  },
3153
3158
  "poolside/laguna-s-2.1": {
3154
- // supportsTools: not probed — fails closed
3159
+ // supportsTools: gateway unavailable at probe time — fails closed
3155
3160
  contextWindow: 1048576,
3156
3161
  maxOutputTokens: 131072,
3157
3162
  supportsTools: false,
@@ -3184,21 +3189,19 @@ var DEFAULT_MODEL_CAPABILITIES = Object.freeze({
3184
3189
  "qwen/qwen3.8-flash": {
3185
3190
  contextWindow: 1e6,
3186
3191
  maxOutputTokens: 131072,
3187
- supportsTools: false,
3192
+ supportsTools: true,
3188
3193
  supportsVision: true
3189
3194
  },
3190
3195
  "qwen/qwen3.8-max": {
3191
- // supportsTools: not probed — fails closed
3192
3196
  contextWindow: 1e6,
3193
3197
  maxOutputTokens: 131072,
3194
- supportsTools: false,
3198
+ supportsTools: true,
3195
3199
  supportsVision: false
3196
3200
  },
3197
3201
  "tencent/hy4-preview": {
3198
- // supportsTools: not probed — fails closed
3199
3202
  contextWindow: 1048576,
3200
3203
  maxOutputTokens: 64e3,
3201
- supportsTools: false,
3204
+ supportsTools: true,
3202
3205
  supportsVision: false
3203
3206
  },
3204
3207
  "xai/grok-4.3": {
@@ -3537,6 +3540,14 @@ var model_profiles_generated_default = {
3537
3540
  errorRate: 0,
3538
3541
  samples: 3
3539
3542
  },
3543
+ "mistral/mistral-large-4": {
3544
+ measuredAt: "2026-11-28T04:13:09Z",
3545
+ latencyMs: 6174.9,
3546
+ p95LatencyMs: 7306.8,
3547
+ outputTokensPerSecond: 84.27,
3548
+ errorRate: 0,
3549
+ samples: 3
3550
+ },
3540
3551
  "moonshot/kimi-k3": {
3541
3552
  measuredAt: "2026-08-29T16:51:33Z",
3542
3553
  latencyMs: 24498.9,
@@ -3761,6 +3772,14 @@ var model_profiles_generated_default = {
3761
3772
  errorRate: 0,
3762
3773
  samples: 3
3763
3774
  },
3775
+ "openai/gpt-6.1-terra": {
3776
+ measuredAt: "2026-11-28T04:14:35Z",
3777
+ latencyMs: 6020,
3778
+ p95LatencyMs: 6378.1,
3779
+ outputTokensPerSecond: 57.78,
3780
+ errorRate: 0,
3781
+ samples: 3
3782
+ },
3764
3783
  "openai/gpt-6.2-astra": {
3765
3784
  measuredAt: "2026-11-27T23:25:03Z",
3766
3785
  latencyMs: 7973.9,
@@ -3833,6 +3852,22 @@ var model_profiles_generated_default = {
3833
3852
  errorRate: 0,
3834
3853
  samples: 3
3835
3854
  },
3855
+ "qwen/qwen3.8-flash": {
3856
+ measuredAt: "2026-11-28T04:13:09Z",
3857
+ latencyMs: 8271.9,
3858
+ p95LatencyMs: 8495,
3859
+ outputTokensPerSecond: 61.95,
3860
+ errorRate: 0,
3861
+ samples: 3
3862
+ },
3863
+ "qwen/qwen3.8-max": {
3864
+ measuredAt: "2026-11-28T04:13:09Z",
3865
+ latencyMs: 15575.9,
3866
+ p95LatencyMs: 16331,
3867
+ outputTokensPerSecond: 32.95,
3868
+ errorRate: 0,
3869
+ samples: 3
3870
+ },
3836
3871
  "tencent/hy3": {
3837
3872
  measuredAt: "2026-08-29T16:51:33Z",
3838
3873
  latencyMs: 6062.3,
@@ -3841,6 +3876,14 @@ var model_profiles_generated_default = {
3841
3876
  errorRate: 0,
3842
3877
  samples: 3
3843
3878
  },
3879
+ "tencent/hy4-preview": {
3880
+ measuredAt: "2026-11-28T04:13:09Z",
3881
+ latencyMs: 9049.2,
3882
+ p95LatencyMs: 9460.4,
3883
+ outputTokensPerSecond: 56.69,
3884
+ errorRate: 0,
3885
+ samples: 3
3886
+ },
3844
3887
  "xai/grok-4.3": {
3845
3888
  measuredAt: "2026-08-29T16:51:33Z",
3846
3889
  latencyMs: 9467.7,
@@ -5404,7 +5447,7 @@ function getCostSummary() {
5404
5447
  }
5405
5448
 
5406
5449
  // src/version.ts
5407
- var SDK_VERSION = "4.5.0";
5450
+ var SDK_VERSION = "4.5.1";
5408
5451
  var USER_AGENT = `blockrun-ts/${SDK_VERSION}`;
5409
5452
 
5410
5453
  // src/client.ts
@@ -5511,7 +5554,7 @@ var LLMClient = class _LLMClient {
5511
5554
  /**
5512
5555
  * Simple 1-line chat interface.
5513
5556
  *
5514
- * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-4.6')
5557
+ * @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-5.5')
5515
5558
  * @param prompt - User message
5516
5559
  * @param options - Optional chat parameters
5517
5560
  * @returns Assistant's response text
@@ -5582,9 +5625,9 @@ var LLMClient = class _LLMClient {
5582
5625
  * ```ts
5583
5626
  * const result = await client.smartChat('What is 2+2?');
5584
5627
  * console.log(result.response); // '4'
5585
- * console.log(result.model); // 'google/gemini-3.5-flash'
5628
+ * console.log(result.model); // 'google/gemini-3.6-flash'
5586
5629
  * console.log(result.routing.method); // 'portfolio'
5587
- * console.log(result.routing.savings); // 0.78 (78% savings)
5630
+ * console.log(result.routing.savings); // 0.84 (84% savings)
5588
5631
  * ```
5589
5632
  *
5590
5633
  * @example With routing profile
@@ -9877,7 +9920,7 @@ var BlockrunClient = class {
9877
9920
  *
9878
9921
  * Example — streaming chat:
9879
9922
  * for await (const chunk of br.stream<ChatChunk>("/v1/chat/completions", {
9880
- * model: "anthropic/claude-sonnet-4-6",
9923
+ * model: "anthropic/claude-sonnet-5.5",
9881
9924
  * messages: [{ role: "user", content: "Hi" }],
9882
9925
  * stream: true,
9883
9926
  * })) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/llm",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for BlockRun - every frontier model behind one OpenAI-compatible client. Pay with a BlockRun API key or per-call in USDC. Smart routing picks the cheapest capable model. No rate limits.",
6
6
  "main": "dist/index.cjs",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@blockrun/core": "^0.1.0",
61
- "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/53fe78353e1b356aae2186cf33d6f13ae2fa7749",
61
+ "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/92f77ecf38f2608365a71c1ec3e6e4f28777031a",
62
62
  "@eslint/js": "^10.0.1",
63
63
  "@solana/kit": "^8.4.0",
64
64
  "@types/node": "^26.4.1",