@blockrun/clawrouter 0.12.79 → 0.12.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +73 -54
- package/dist/cli.js.map +1 -1
- package/dist/index.js +85 -66
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/reinstall.sh +4 -4
- package/scripts/update.sh +4 -4
package/dist/cli.js
CHANGED
|
@@ -40214,7 +40214,7 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
40214
40214
|
// $0.20/$1.25, 1M context
|
|
40215
40215
|
"xai/grok-4-fast-non-reasoning",
|
|
40216
40216
|
// 1,143ms, $0.20/$0.50 — fast fallback
|
|
40217
|
-
"
|
|
40217
|
+
"free/gpt-oss-120b"
|
|
40218
40218
|
// 1,252ms, FREE fallback
|
|
40219
40219
|
]
|
|
40220
40220
|
},
|
|
@@ -40278,10 +40278,10 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
40278
40278
|
// Eco tier configs - absolute cheapest (blockrun/eco)
|
|
40279
40279
|
ecoTiers: {
|
|
40280
40280
|
SIMPLE: {
|
|
40281
|
-
primary: "
|
|
40281
|
+
primary: "free/gpt-oss-120b",
|
|
40282
40282
|
// FREE! $0.00/$0.00
|
|
40283
40283
|
fallback: [
|
|
40284
|
-
"
|
|
40284
|
+
"free/gpt-oss-20b",
|
|
40285
40285
|
// FREE — smaller, faster
|
|
40286
40286
|
"google/gemini-3.1-flash-lite",
|
|
40287
40287
|
// $0.25/$1.50 — newest flash-lite
|
|
@@ -40511,27 +40511,38 @@ var MODEL_ALIASES = {
|
|
|
40511
40511
|
// delisted 2026-03-12
|
|
40512
40512
|
"xai/grok-3-fast": "xai/grok-4-fast-reasoning",
|
|
40513
40513
|
// delisted (too expensive)
|
|
40514
|
-
// NVIDIA —
|
|
40515
|
-
nvidia: "
|
|
40516
|
-
"gpt-120b": "
|
|
40517
|
-
"gpt-20b": "
|
|
40518
|
-
|
|
40519
|
-
"
|
|
40520
|
-
"
|
|
40521
|
-
"
|
|
40522
|
-
"
|
|
40523
|
-
|
|
40524
|
-
|
|
40525
|
-
"
|
|
40526
|
-
"
|
|
40527
|
-
"
|
|
40528
|
-
"
|
|
40529
|
-
|
|
40530
|
-
|
|
40531
|
-
"
|
|
40532
|
-
"
|
|
40533
|
-
"
|
|
40534
|
-
|
|
40514
|
+
// NVIDIA — backward compat aliases (nvidia/xxx → free/xxx)
|
|
40515
|
+
nvidia: "free/gpt-oss-120b",
|
|
40516
|
+
"gpt-120b": "free/gpt-oss-120b",
|
|
40517
|
+
"gpt-20b": "free/gpt-oss-20b",
|
|
40518
|
+
"nvidia/gpt-oss-120b": "free/gpt-oss-120b",
|
|
40519
|
+
"nvidia/gpt-oss-20b": "free/gpt-oss-20b",
|
|
40520
|
+
"nvidia/nemotron-ultra-253b": "free/nemotron-ultra-253b",
|
|
40521
|
+
"nvidia/nemotron-3-super-120b": "free/nemotron-3-super-120b",
|
|
40522
|
+
"nvidia/nemotron-super-49b": "free/nemotron-super-49b",
|
|
40523
|
+
"nvidia/deepseek-v3.2": "free/deepseek-v3.2",
|
|
40524
|
+
"nvidia/mistral-large-3-675b": "free/mistral-large-3-675b",
|
|
40525
|
+
"nvidia/qwen3-coder-480b": "free/qwen3-coder-480b",
|
|
40526
|
+
"nvidia/devstral-2-123b": "free/devstral-2-123b",
|
|
40527
|
+
"nvidia/glm-4.7": "free/glm-4.7",
|
|
40528
|
+
"nvidia/llama-4-maverick": "free/llama-4-maverick",
|
|
40529
|
+
// Free model shorthand aliases
|
|
40530
|
+
"deepseek-free": "free/deepseek-v3.2",
|
|
40531
|
+
"mistral-free": "free/mistral-large-3-675b",
|
|
40532
|
+
"glm-free": "free/glm-4.7",
|
|
40533
|
+
"llama-free": "free/llama-4-maverick",
|
|
40534
|
+
nemotron: "free/nemotron-ultra-253b",
|
|
40535
|
+
"nemotron-ultra": "free/nemotron-ultra-253b",
|
|
40536
|
+
"nemotron-253b": "free/nemotron-ultra-253b",
|
|
40537
|
+
"nemotron-super": "free/nemotron-super-49b",
|
|
40538
|
+
"nemotron-49b": "free/nemotron-super-49b",
|
|
40539
|
+
"nemotron-120b": "free/nemotron-3-super-120b",
|
|
40540
|
+
devstral: "free/devstral-2-123b",
|
|
40541
|
+
"devstral-2": "free/devstral-2-123b",
|
|
40542
|
+
"qwen-coder": "free/qwen3-coder-480b",
|
|
40543
|
+
"qwen-coder-free": "free/qwen3-coder-480b",
|
|
40544
|
+
maverick: "free/llama-4-maverick",
|
|
40545
|
+
free: "free/nemotron-ultra-253b",
|
|
40535
40546
|
// MiniMax
|
|
40536
40547
|
minimax: "minimax/minimax-m2.7",
|
|
40537
40548
|
"minimax-m2.7": "minimax/minimax-m2.7",
|
|
@@ -40540,8 +40551,6 @@ var MODEL_ALIASES = {
|
|
|
40540
40551
|
glm: "zai/glm-5",
|
|
40541
40552
|
"glm-5": "zai/glm-5",
|
|
40542
40553
|
"glm-5-turbo": "zai/glm-5-turbo",
|
|
40543
|
-
// Free alias — points to strongest free model
|
|
40544
|
-
free: "nvidia/nemotron-ultra-253b",
|
|
40545
40554
|
// Routing profile aliases (common variations)
|
|
40546
40555
|
"auto-router": "auto",
|
|
40547
40556
|
router: "auto"
|
|
@@ -41081,11 +41090,12 @@ var BLOCKRUN_MODELS = [
|
|
|
41081
41090
|
agentic: true,
|
|
41082
41091
|
toolCalling: true
|
|
41083
41092
|
},
|
|
41084
|
-
//
|
|
41085
|
-
//
|
|
41086
|
-
//
|
|
41093
|
+
// Free models (hosted by NVIDIA, billingMode: "free" on server)
|
|
41094
|
+
// IDs use "free/" prefix so users see them as free in the /model picker.
|
|
41095
|
+
// ClawRouter maps free/xxx → nvidia/xxx before sending to BlockRun upstream.
|
|
41096
|
+
// toolCalling intentionally omitted: structured function calling unverified.
|
|
41087
41097
|
{
|
|
41088
|
-
id: "
|
|
41098
|
+
id: "free/gpt-oss-120b",
|
|
41089
41099
|
name: "[Free] GPT-OSS 120B",
|
|
41090
41100
|
version: "120b",
|
|
41091
41101
|
inputPrice: 0,
|
|
@@ -41094,7 +41104,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41094
41104
|
maxOutput: 16384
|
|
41095
41105
|
},
|
|
41096
41106
|
{
|
|
41097
|
-
id: "
|
|
41107
|
+
id: "free/gpt-oss-20b",
|
|
41098
41108
|
name: "[Free] GPT-OSS 20B",
|
|
41099
41109
|
version: "20b",
|
|
41100
41110
|
inputPrice: 0,
|
|
@@ -41103,7 +41113,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41103
41113
|
maxOutput: 16384
|
|
41104
41114
|
},
|
|
41105
41115
|
{
|
|
41106
|
-
id: "
|
|
41116
|
+
id: "free/nemotron-ultra-253b",
|
|
41107
41117
|
name: "[Free] Nemotron Ultra 253B",
|
|
41108
41118
|
version: "253b",
|
|
41109
41119
|
inputPrice: 0,
|
|
@@ -41113,7 +41123,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41113
41123
|
reasoning: true
|
|
41114
41124
|
},
|
|
41115
41125
|
{
|
|
41116
|
-
id: "
|
|
41126
|
+
id: "free/nemotron-3-super-120b",
|
|
41117
41127
|
name: "[Free] Nemotron 3 Super 120B",
|
|
41118
41128
|
version: "3-super-120b",
|
|
41119
41129
|
inputPrice: 0,
|
|
@@ -41123,7 +41133,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41123
41133
|
reasoning: true
|
|
41124
41134
|
},
|
|
41125
41135
|
{
|
|
41126
|
-
id: "
|
|
41136
|
+
id: "free/nemotron-super-49b",
|
|
41127
41137
|
name: "[Free] Nemotron Super 49B",
|
|
41128
41138
|
version: "super-49b",
|
|
41129
41139
|
inputPrice: 0,
|
|
@@ -41133,7 +41143,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41133
41143
|
reasoning: true
|
|
41134
41144
|
},
|
|
41135
41145
|
{
|
|
41136
|
-
id: "
|
|
41146
|
+
id: "free/deepseek-v3.2",
|
|
41137
41147
|
name: "[Free] DeepSeek V3.2",
|
|
41138
41148
|
version: "v3.2",
|
|
41139
41149
|
inputPrice: 0,
|
|
@@ -41143,7 +41153,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41143
41153
|
reasoning: true
|
|
41144
41154
|
},
|
|
41145
41155
|
{
|
|
41146
|
-
id: "
|
|
41156
|
+
id: "free/mistral-large-3-675b",
|
|
41147
41157
|
name: "[Free] Mistral Large 675B",
|
|
41148
41158
|
version: "3-675b",
|
|
41149
41159
|
inputPrice: 0,
|
|
@@ -41153,7 +41163,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41153
41163
|
reasoning: true
|
|
41154
41164
|
},
|
|
41155
41165
|
{
|
|
41156
|
-
id: "
|
|
41166
|
+
id: "free/qwen3-coder-480b",
|
|
41157
41167
|
name: "[Free] Qwen3 Coder 480B",
|
|
41158
41168
|
version: "480b",
|
|
41159
41169
|
inputPrice: 0,
|
|
@@ -41162,7 +41172,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41162
41172
|
maxOutput: 16384
|
|
41163
41173
|
},
|
|
41164
41174
|
{
|
|
41165
|
-
id: "
|
|
41175
|
+
id: "free/devstral-2-123b",
|
|
41166
41176
|
name: "[Free] Devstral 2 123B",
|
|
41167
41177
|
version: "2-123b",
|
|
41168
41178
|
inputPrice: 0,
|
|
@@ -41171,7 +41181,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41171
41181
|
maxOutput: 16384
|
|
41172
41182
|
},
|
|
41173
41183
|
{
|
|
41174
|
-
id: "
|
|
41184
|
+
id: "free/glm-4.7",
|
|
41175
41185
|
name: "[Free] GLM-4.7",
|
|
41176
41186
|
version: "4.7",
|
|
41177
41187
|
inputPrice: 0,
|
|
@@ -41181,7 +41191,7 @@ var BLOCKRUN_MODELS = [
|
|
|
41181
41191
|
reasoning: true
|
|
41182
41192
|
},
|
|
41183
41193
|
{
|
|
41184
|
-
id: "
|
|
41194
|
+
id: "free/llama-4-maverick",
|
|
41185
41195
|
name: "[Free] Llama 4 Maverick",
|
|
41186
41196
|
version: "4-maverick",
|
|
41187
41197
|
inputPrice: 0,
|
|
@@ -46764,20 +46774,26 @@ var ROUTING_PROFILES = /* @__PURE__ */ new Set([
|
|
|
46764
46774
|
"blockrun/premium",
|
|
46765
46775
|
"premium"
|
|
46766
46776
|
]);
|
|
46767
|
-
var FREE_MODEL = "
|
|
46777
|
+
var FREE_MODEL = "free/gpt-oss-120b";
|
|
46768
46778
|
var FREE_MODELS = /* @__PURE__ */ new Set([
|
|
46769
|
-
"
|
|
46770
|
-
"
|
|
46771
|
-
"
|
|
46772
|
-
"
|
|
46773
|
-
"
|
|
46774
|
-
"
|
|
46775
|
-
"
|
|
46776
|
-
"
|
|
46777
|
-
"
|
|
46778
|
-
"
|
|
46779
|
-
"
|
|
46779
|
+
"free/gpt-oss-120b",
|
|
46780
|
+
"free/gpt-oss-20b",
|
|
46781
|
+
"free/nemotron-ultra-253b",
|
|
46782
|
+
"free/nemotron-3-super-120b",
|
|
46783
|
+
"free/nemotron-super-49b",
|
|
46784
|
+
"free/deepseek-v3.2",
|
|
46785
|
+
"free/mistral-large-3-675b",
|
|
46786
|
+
"free/qwen3-coder-480b",
|
|
46787
|
+
"free/devstral-2-123b",
|
|
46788
|
+
"free/glm-4.7",
|
|
46789
|
+
"free/llama-4-maverick"
|
|
46780
46790
|
]);
|
|
46791
|
+
function toUpstreamModelId(modelId) {
|
|
46792
|
+
if (modelId.startsWith("free/")) {
|
|
46793
|
+
return "nvidia/" + modelId.slice("free/".length);
|
|
46794
|
+
}
|
|
46795
|
+
return modelId;
|
|
46796
|
+
}
|
|
46781
46797
|
var MAX_MESSAGES = 200;
|
|
46782
46798
|
var CONTEXT_LIMIT_KB = 5120;
|
|
46783
46799
|
var HEARTBEAT_INTERVAL_MS = 2e3;
|
|
@@ -48139,7 +48155,7 @@ async function tryModelRequest(upstreamUrl, method, headers, body, modelId, maxT
|
|
|
48139
48155
|
let requestBody = body;
|
|
48140
48156
|
try {
|
|
48141
48157
|
const parsed = JSON.parse(body.toString());
|
|
48142
|
-
parsed.model = modelId;
|
|
48158
|
+
parsed.model = toUpstreamModelId(modelId);
|
|
48143
48159
|
if (Array.isArray(parsed.messages)) {
|
|
48144
48160
|
parsed.messages = normalizeMessageRoles(parsed.messages);
|
|
48145
48161
|
}
|
|
@@ -48909,6 +48925,9 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
48909
48925
|
effectiveSessionId = deriveSessionId(parsedMessages);
|
|
48910
48926
|
}
|
|
48911
48927
|
if (bodyModified) {
|
|
48928
|
+
if (parsed.model && typeof parsed.model === "string") {
|
|
48929
|
+
parsed.model = toUpstreamModelId(parsed.model);
|
|
48930
|
+
}
|
|
48912
48931
|
body = Buffer.from(JSON.stringify(parsed));
|
|
48913
48932
|
}
|
|
48914
48933
|
} catch (err) {
|
|
@@ -49013,7 +49032,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
49013
49032
|
modelId = FREE_MODEL;
|
|
49014
49033
|
isFreeModel = true;
|
|
49015
49034
|
const parsed = JSON.parse(body.toString());
|
|
49016
|
-
parsed.model = FREE_MODEL;
|
|
49035
|
+
parsed.model = toUpstreamModelId(FREE_MODEL);
|
|
49017
49036
|
body = Buffer.from(JSON.stringify(parsed));
|
|
49018
49037
|
balanceFallbackNotice = sufficiency.info.isEmpty ? `> **\u26A0\uFE0F Wallet empty** \u2014 using free model. Fund your wallet to use ${originalModel}.
|
|
49019
49038
|
|