From 7880aaa452fcff797cf3c0e855574ec0e52617a1 Mon Sep 17 00:00:00 2001 From: VickyXAI <115643921+VickyXAI@users.noreply.github.com> Date: Mon, 19 Oct 2026 23:53:22 -0500 Subject: [PATCH] feat(chat): add deepseek/deepseek-v4.1-flash beside deepseek-chat Base GET /v1/models and the account sheet list it at $0.14/$0.28 (cache read $0.028), the same as deepseek-chat. Added a price row and placed it right after deepseek-chat in the fast and cheap tiers (deepseek-chat is kept). Solana does not serve it yet (400 Unknown model, before any payment), so on that chain the tier falls through to the next member. Also corrects the cheap-mode description, which still named the retired Tencent Hy3. --- README.md | 6 +++--- docs/mcp-schema-overhead.md | 6 +++--- src/tools/chat.ts | 2 +- src/utils/constants.ts | 11 ++++++++--- test/chat.test.ts | 17 +++++++++++++++++ 5 files changed, 32 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a342f68..a37fa71 100644 --- a/README.md +++ b/README.md @@ -252,11 +252,11 @@ Package managers have shown install size for decades. Almost no MCP server shows | Profile | Tools | Context | |---------|-------|---------| -| `full` *(default)* | 19 | 14,335 | +| `full` *(default)* | 19 | 14,348 | | `trading` | 8 | 5,411 | | `media` | 7 | 7,144 | -| `research` | 5 | 2,727 | -| `chat` | 3 | 2,082 | +| `research` | 5 | 2,740 | +| `chat` | 3 | 2,095 | Running `--profile trading` instead of the default costs **62% less context** for the same trading workflow. If you only ever ask about markets, that is the single cheapest change you can make. diff --git a/docs/mcp-schema-overhead.md b/docs/mcp-schema-overhead.md index 2244ee2..63b8b5e 100644 --- a/docs/mcp-schema-overhead.md +++ b/docs/mcp-schema-overhead.md @@ -16,11 +16,11 @@ Written 2026-09-01, verified against `@modelcontextprotocol/sdk` 1.29.0. Numbers | Profile | Tools | Context | |---------|-------|---------| -| `full` *(default)* | 19 | 14,335 | +| `full` *(default)* | 19 | 14,348 | | `trading` | 8 | 5,411 | | `media` | 7 | 7,144 | -| `research` | 5 | 2,727 | -| `chat` | 3 | 2,082 | +| `research` | 5 | 2,740 | +| `chat` | 3 | 2,095 | Descriptions are ~54% of it, input schemas ~42%. `--profile trading` costs 62% less than the default for the same workflow. diff --git a/src/tools/chat.ts b/src/tools/chat.ts index 6b72e7d..f74d8d7 100644 --- a/src/tools/chat.ts +++ b/src/tools/chat.ts @@ -443,7 +443,7 @@ Notable modes: - mode:"powerful" → Claude Opus 5, Claude Opus 4.8, GPT-5.6-sol, Claude Fable 5 (frontier, 1M context) - mode:"reasoning" → Claude Opus 5, GPT-5.6-sol, Kimi K3, Grok 4.3, deepseek-v4-pro - mode:"coding" → Claude Opus 5, GPT-5.3-codex, Kimi K3, Grok Build, GLM-5.2 -- mode:"cheap" → deepseek-v4-pro, Qwen3.7 Flash, MiniMax M3, Tencent Hy3 +- mode:"cheap" → deepseek-v4-pro, Qwen3.7 Flash, MiniMax M3, Gemini 2.5 Flash, DeepSeek Chat / V4.1 Flash - mode:"glm" → Zhipu GLM-5 / 5.2 / 5.1 / 5-Turbo (strong at coding) - mode:"free" → free models (no cost) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 2eed2fa..30273ec 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -74,7 +74,10 @@ export const BASE_RPC_URLS = [ // gemini-3.5-flash-lite ($0.3/$2.5, live-probed 2026-08-12), // gemini-3.1-flash-lite ($0.25/$1.5), gemini-2.5-pro, gemini-2.5-flash, // gemini-2.5-flash-lite — all 1M context -// DeepSeek (4): deepseek-v4-flash-vision-exp ($0.3/$1.2), deepseek-v4-pro ($1.32/$3.96, 1M, reasoning + coding; +// DeepSeek (5): deepseek-v4.1-flash ($0.14/$0.28, 1M, reasoning + coding — +// listed on Base 2026-10-20, same price as deepseek-chat; NOT on Solana yet: +// sol.blockrun.ai answers 400 "Unknown model", which a routing tier just +// falls through before any payment), deepseek-v4-flash-vision-exp ($0.3/$1.2), deepseek-v4-pro ($1.32/$3.96, 1M, reasoning + coding; // repriced by the gateway and re-probed 2026-09-02), // deepseek-chat, deepseek-reasoner ($0.14/$0.28 on Base since DeepSeek's // 2026-08-07 cut; sol still quotes $0.2/$0.4 — see the drift note above) @@ -134,10 +137,10 @@ export const BASE_RPC_URLS = [ // hidden-alive since July). They stay routed at the tail of free[] until a // realistic-prompt POST probe reads their response `model` field. export const MODEL_TIERS = { - fast: ["google/gemini-3.5-flash", "google/gemini-2.5-flash", "openai/gpt-5.6-luna", "google/gemini-3.5-flash-lite", "openai/gpt-5-mini", "deepseek/deepseek-chat", "google/gemini-3-flash-preview"], + fast: ["google/gemini-3.5-flash", "google/gemini-2.5-flash", "openai/gpt-5.6-luna", "google/gemini-3.5-flash-lite", "openai/gpt-5-mini", "deepseek/deepseek-chat", "deepseek/deepseek-v4.1-flash", "google/gemini-3-flash-preview"], balanced: ["openai/gpt-5.6-terra", "anthropic/claude-sonnet-5", "moonshot/kimi-k3", "google/gemini-3.1-pro", "xai/grok-4.5", "openai/gpt-5.5"], powerful: ["anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "openai/gpt-5.6-sol", "anthropic/claude-fable-5", "openai/gpt-5.4-pro", "openai/gpt-5.2-pro"], - cheap: ["deepseek/deepseek-v4-pro", "qwen/qwen3.7-flash", "minimax/minimax-m3", "google/gemini-2.5-flash", "deepseek/deepseek-chat", "openai/gpt-5.4-nano"], + cheap: ["deepseek/deepseek-v4-pro", "qwen/qwen3.7-flash", "minimax/minimax-m3", "google/gemini-2.5-flash", "deepseek/deepseek-chat", "deepseek/deepseek-v4.1-flash", "openai/gpt-5.4-nano"], reasoning: ["anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "openai/gpt-5.6-sol", "moonshot/kimi-k3", "xai/grok-4.3", "deepseek/deepseek-v4-pro", "deepseek/deepseek-reasoner"], // 2026-08-12 sweep (both chains, realistic prompt). Order matters: free[0] // is what every mode:"free" call tries first, and a slow primary stalls the @@ -432,6 +435,8 @@ export const CHAT_PRICE_PER_MTOKEN: Record { + assert.deepEqual(CHAT_PRICE_PER_MTOKEN["deepseek/deepseek-v4.1-flash"], { input: 0.14, output: 0.28 }); + assert.deepEqual(CHAT_PRICE_PER_MTOKEN["deepseek/deepseek-v4.1-flash"], CHAT_PRICE_PER_MTOKEN["deepseek/deepseek-chat"]); + for (const tier of ["fast", "cheap"] as const) { + const ids = MODEL_TIERS[tier] as readonly string[]; + assert.equal(ids.indexOf("deepseek/deepseek-v4.1-flash"), ids.indexOf("deepseek/deepseek-chat") + 1, tier); + } + assert.equal( + estimateChatCost(1024, undefined, "deepseek-v4.1-flash", undefined, 100_000), + estimateChatCost(1024, undefined, "deepseek/deepseek-chat", undefined, 100_000), + ); +});