From f93bcaa7c7a9255649211083fe852e52299a3ec9 Mon Sep 17 00:00:00 2001 From: 1bcMax Date: Tue, 20 Oct 2026 10:48:15 -0500 Subject: [PATCH 1/3] feat: bare deepseek names V4.1 Flash; bump router-core to 2cd5a10 sol.blockrun.ai lists deepseek/deepseek-v4.1-flash since 2026-10-20, so the bare alias resolves on both chains and takes the canonical id (same price and upstream as deepseek-chat). Free deepseek-v4-flash/dsv4 aliases stay free. Adds V4.1 Flash to the max-output and context-window tables, and moves router-core to 2cd5a10 for its capability row. --- package-lock.json | 6 +++--- package.json | 2 +- src/agent/optimize.ts | 1 + src/agent/tokens.ts | 1 + src/ui/model-picker.ts | 14 ++++++-------- test/local.mjs | 5 +++-- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d8ef2b8..7178ecaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "dependencies": { "@blockrun/llm": "^3.19.1", "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/465c45941fb8ea9d6858fe8402abc8ba8934be90", - "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/65a92c85ea1f187a64e7611302ef6add236b0cba", + "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/2cd5a1026f755cd39a3f0d6e61cab23a5ad391a9", "@colbymchenry/codegraph": "^1.5.0", "@modelcontextprotocol/sdk": "^1.29.0", "@polymarket/builder-relayer-client": "^0.0.10", @@ -2110,8 +2110,8 @@ }, "node_modules/@blockrun/router-core": { "version": "0.3.0", - "resolved": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/65a92c85ea1f187a64e7611302ef6add236b0cba", - "integrity": "sha512-awF37H573S+UN2SVZ9f7rkDsVmyn6Ng6HML5GNitc7Z+nq4FW7adXqOjLe4EzYsOkn7+tDKypd3kS9ihQxD3VQ==", + "resolved": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/2cd5a1026f755cd39a3f0d6e61cab23a5ad391a9", + "integrity": "sha512-F2yzY5siV2a8e92szic5AtEvk2DgjeQHIqzAHHuxqBKXsq3M0b5R/CSvm6KO2aE/cqoBtnbh7gNSe+P1qsm/vQ==", "license": "MIT", "engines": { "node": ">=20.19.0" diff --git a/package.json b/package.json index 68cdcbbe..7135fa0c 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "dependencies": { "@blockrun/llm": "^3.19.1", "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/465c45941fb8ea9d6858fe8402abc8ba8934be90", - "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/65a92c85ea1f187a64e7611302ef6add236b0cba", + "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/2cd5a1026f755cd39a3f0d6e61cab23a5ad391a9", "@colbymchenry/codegraph": "^1.5.0", "@modelcontextprotocol/sdk": "^1.29.0", "@polymarket/builder-relayer-client": "^0.0.10", diff --git a/src/agent/optimize.ts b/src/agent/optimize.ts index 6ddc0f1e..f6a61f85 100644 --- a/src/agent/optimize.ts +++ b/src/agent/optimize.ts @@ -81,6 +81,7 @@ const MODEL_MAX_OUTPUT: Record = { 'deepseek/deepseek-chat': 65_536, 'deepseek/deepseek-reasoner': 65_536, 'deepseek/deepseek-v4-pro': 65_536, + 'deepseek/deepseek-v4.1-flash': 65_536, // Kimi K3 (flagship, 2026-07) supports 65K output per the BlockRun gateway // model entry (max_output: 65536). Without this entry the default 16K cap // left users with 4× headroom on the table for long-form coding outputs diff --git a/src/agent/tokens.ts b/src/agent/tokens.ts index c94461ce..ae85846a 100644 --- a/src/agent/tokens.ts +++ b/src/agent/tokens.ts @@ -284,6 +284,7 @@ const MODEL_CONTEXT_WINDOWS: Record = { 'deepseek/deepseek-chat': 1_000_000, 'deepseek/deepseek-reasoner': 1_000_000, 'deepseek/deepseek-v4-pro': 1_000_000, + 'deepseek/deepseek-v4.1-flash': 1_000_000, // xAI. grok-4.5 / 4.3 / build were missing until 2026-08-20: neither matches // any inference pattern below, so a cold catalog cache fell through to the // blind 128k default and compacted a 500K–1M window ~4-8x too early. diff --git a/src/ui/model-picker.ts b/src/ui/model-picker.ts index 32bfbeda..6659b77d 100644 --- a/src/ui/model-picker.ts +++ b/src/ui/model-picker.ts @@ -155,19 +155,17 @@ const LEGACY_SHORTCUTS: Record = { 'grok-4.1': 'xai/grok-4.3', // DeepSeek — paid SKUs route through deepseek/* (gateway aliases serve V4 // Flash modes upstream); free tier routes through nvidia/*. - deepseek: 'deepseek/deepseek-chat', // V4 Flash Chat (paid, $0.20/$0.40) + deepseek: 'deepseek/deepseek-v4.1-flash', // V4.1 Flash (paid, $0.14/$0.28) r1: 'deepseek/deepseek-reasoner', // V4 Flash Reasoner (paid) // V4 Pro: paid flagship, 1.6T MoE / 49B active, 1M ctx, $1.32/$3.96 (live 2026-10-02). 'deepseek-v4-pro': 'deepseek/deepseek-v4-pro', 'dsv4-pro': 'deepseek/deepseek-v4-pro', 'v4-pro': 'deepseek/deepseek-v4-pro', - // V4.1 Flash (live on Base 2026-10-20, $0.14/$0.28): the gateway's own name - // for the model deepseek-chat already serves — same upstream, same price, - // same non-thinking default. `deepseek` deliberately stays on deepseek-chat: - // sol.blockrun.ai does not list v4.1-flash yet, and a bare alias has to - // resolve on both chains (the `glm` rule). Explicit pins only until Solana - // lists it. NOTE `deepseek-v4-flash` / `dsv4` are FREE aliases (below) and - // must not move to this paid id. + // V4.1 Flash (live on Base and Solana 2026-10-20, $0.14/$0.28): the + // gateway's own name for the model deepseek-chat also serves — same + // upstream, same price, same non-thinking default. `deepseek` points here + // now that both chains list it (the `glm` rule). NOTE `deepseek-v4-flash` / + // `dsv4` are FREE aliases (below) and must not move to this paid id. 'deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', 'deepseek-v4.1': 'deepseek/deepseek-v4.1-flash', 'v4.1-flash': 'deepseek/deepseek-v4.1-flash', diff --git a/test/local.mjs b/test/local.mjs index 256916ea..2ce5e7c6 100644 --- a/test/local.mjs +++ b/test/local.mjs @@ -12549,8 +12549,9 @@ test('2026-10-20: deepseek-v4.1-flash is priced and pinnable; the dead nvidia De assert.deepEqual(MODEL_PRICING['deepseek/deepseek-v4.1-flash'], { input: 0.14, output: 0.28 }); assert.equal(resolveModel('deepseek-v4.1-flash'), 'deepseek/deepseek-v4.1-flash'); assert.equal(resolveModel('v4.1-flash'), 'deepseek/deepseek-v4.1-flash'); - // Base-only for now, so the bare alias stays on the both-chains twin. - assert.equal(resolveModel('deepseek'), 'deepseek/deepseek-chat'); + // Both chains list it (sol.blockrun.ai since 2026-10-20), so the bare alias + // takes the canonical id. + assert.equal(resolveModel('deepseek'), 'deepseek/deepseek-v4.1-flash'); // Free aliases never move to a paid model. assert.notEqual(resolveModel('deepseek-v4-flash'), 'deepseek/deepseek-v4.1-flash'); assert.equal(MODEL_PRICING[resolveModel('deepseek-v4-flash')].input, 0); From 430671a8799d2566446e1f727d77e9e826f32c70 Mon Sep 17 00:00:00 2001 From: 1bcMax Date: Tue, 20 Oct 2026 10:53:38 -0500 Subject: [PATCH 2/3] chore: bump model-catalog to fd63593 (catalog 2026.10.20.3) Picks up the V4.1 Flash retarget now that Solana lists it, and Base's $0.006/M DeepSeek cache-read price. --- package-lock.json | 21 +++------------------ package.json | 2 +- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7178ecaa..8bc0901a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ ], "dependencies": { "@blockrun/llm": "^3.19.1", - "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/465c45941fb8ea9d6858fe8402abc8ba8934be90", + "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/fd635936832b414e40f8fe6c91fc1ad57347cd63", "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/2cd5a1026f755cd39a3f0d6e61cab23a5ad391a9", "@colbymchenry/codegraph": "^1.5.0", "@modelcontextprotocol/sdk": "^1.29.0", @@ -2101,8 +2101,8 @@ }, "node_modules/@blockrun/model-catalog": { "version": "0.2.0", - "resolved": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/465c45941fb8ea9d6858fe8402abc8ba8934be90", - "integrity": "sha512-AVwaxZV75eLEJgEBW+RA4oZ2+IbB2UvkUi/p3fB/+RljoGdD8sMKoECVLKpfDxktjbINxAuS3+wUFm+vv2meqQ==", + "resolved": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/fd635936832b414e40f8fe6c91fc1ad57347cd63", + "integrity": "sha512-4ZAoBvPYzOmKL+zD90qFKOyyvh2qO6U83BWdXDOTYrII9uHF8iuPX7xFFIr6WC0N2EEBMRc4RexAGdG/j3rg0A==", "license": "MIT", "engines": { "node": ">=20.19.0" @@ -12059,21 +12059,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, - "node_modules/jayson/node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, "node_modules/jayson/node_modules/ws": { "version": "7.5.13", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz", diff --git a/package.json b/package.json index 7135fa0c..0fba6e31 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ }, "dependencies": { "@blockrun/llm": "^3.19.1", - "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/465c45941fb8ea9d6858fe8402abc8ba8934be90", + "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/fd635936832b414e40f8fe6c91fc1ad57347cd63", "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/2cd5a1026f755cd39a3f0d6e61cab23a5ad391a9", "@colbymchenry/codegraph": "^1.5.0", "@modelcontextprotocol/sdk": "^1.29.0", From 9a890dc4729171afee7cbc10826dcb2829e71693 Mon Sep 17 00:00:00 2001 From: 1bcMax Date: Tue, 20 Oct 2026 10:56:12 -0500 Subject: [PATCH 3/3] chore: regenerate lockfile with npm 10 (Node 22, as CI) --- package-lock.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package-lock.json b/package-lock.json index 8bc0901a..ccea675b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12059,6 +12059,21 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, + "node_modules/jayson/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/jayson/node_modules/ws": { "version": "7.5.13", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz",