From 46b3de6eaa0b4b61b5bf872324ecd571bbf4c638 Mon Sep 17 00:00:00 2001 From: VickyXAI <115643921+VickyXAI@users.noreply.github.com> Date: Tue, 24 Nov 2026 11:51:52 -0600 Subject: [PATCH] fix(chat): Gemini 2.5 retires 12-01; 3.5 Flash-Lite takes its tier slots Google retires Gemini 2.5 on 2026-12-01 and the gateways redirect gemini-2.5-flash -> gemini-3.5-flash-lite (same $0.3/$2.5) and gemini-2.5-pro -> gemini-3.8-flash. Merge on 12-01, not before. - fast: 2.5-flash's slot (second) now names 3.5-flash-lite, and the later duplicate is removed. From 12-01 the gateway answered the 2.5 name with 3.5 Flash-Lite, so the served order is unchanged. - cheap: 2.5-flash -> 3.5-flash-lite in place. - Price rows for both 2.5 ids kept for pins: 2.5-flash is exact for its successor, 2.5-pro (and its 200K step) over-covers 3.8 Flash. - blockrun_chat's cheap-mode line names Gemini 3.5 Flash-Lite. Schema cost re-measured: full 14,535, research 2,821, chat 2,169 (+2 each). test/retired-models.test.ts covers both ids and fails on a tier that lists a model twice. --- README.md | 6 +++--- docs/mcp-schema-overhead.md | 9 +++++---- src/tools/chat.ts | 2 +- src/utils/constants.ts | 20 +++++++++++++++++--- test/retired-models.test.ts | 14 ++++++++++++++ 5 files changed, 40 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 248ce3b..0a67394 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,533 | +| `full` *(default)* | 19 | 14,535 | | `trading` | 8 | 5,619 | | `media` | 7 | 7,124 | -| `research` | 5 | 2,819 | -| `chat` | 3 | 2,167 | +| `research` | 5 | 2,821 | +| `chat` | 3 | 2,169 | Running `--profile trading` instead of the default costs **61% 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 4809f08..1239045 100644 --- a/docs/mcp-schema-overhead.md +++ b/docs/mcp-schema-overhead.md @@ -10,17 +10,18 @@ Harness: [`scripts/measure-tool-schema.mjs`](../scripts/measure-tool-schema.mjs) which fails the build when the README card disagrees with a live measurement. Written 2026-09-01, verified against `@modelcontextprotocol/sdk` 1.29.0. Numbers re-measured -2026-09-26 for the Seedance video parameter expansion and its review pass. +2026-09-26 for the Seedance video parameter expansion and its review pass, and since kept current +by `test/schema-tokens.test.ts` (last: 2026-12-01, Gemini 2.5 Flash leaving `mode:"cheap"`). ## Our number | Profile | Tools | Context | |---------|-------|---------| -| `full` *(default)* | 19 | 14,533 | +| `full` *(default)* | 19 | 14,535 | | `trading` | 8 | 5,619 | | `media` | 7 | 7,124 | -| `research` | 5 | 2,819 | -| `chat` | 3 | 2,167 | +| `research` | 5 | 2,821 | +| `chat` | 3 | 2,169 | Descriptions are ~55% of it, input schemas ~41%. `--profile trading` costs 61% less than the default for the same workflow. diff --git a/src/tools/chat.ts b/src/tools/chat.ts index 4f2e516..60c5d66 100644 --- a/src/tools/chat.ts +++ b/src/tools/chat.ts @@ -488,7 +488,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.1 Pro, Grok 4.3, deepseek-v4-pro - mode:"coding" → Claude Opus 5, GPT-5.3-codex, Kimi K3.1 Pro, Grok Build, GLM-5.2 -- mode:"cheap" → deepseek-v4-pro, Qwen3.7 Flash, MiniMax M3, Gemini 2.5 Flash, DeepSeek Chat / V4.1 Flash +- mode:"cheap" → deepseek-v4-pro, Qwen3.7 Flash, MiniMax M3, Gemini 3.5 Flash-Lite, 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 2e2119d..cf31b91 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -77,7 +77,8 @@ export const BASE_RPC_URLS = [ // file recorded in July; RETIRED 2026-11-24, redirected to 3.6 Flash), // gemini-3-flash-preview ($0.5/$3), // 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-3.1-flash-lite ($0.25/$1.5), gemini-2.5-pro and gemini-2.5-flash +// (both RETIRED 2026-12-01: redirected to 3.8 Flash and 3.5 Flash-Lite), // gemini-2.5-flash-lite — all 1M context // 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: @@ -154,11 +155,19 @@ export const BASE_RPC_URLS = [ // openai/o1, openai/o3-mini, openai/o4-mini (and o1-mini, which redirected // onto o4-mini) -> openai/gpt-5.4-mini. Dead at OpenAI since 2026-10-23 // and on Azure since 2026-11-19. None was in a tier; see their price rows. +// +// 2026-12-01 RETIREMENTS (Google retires Gemini 2.5; the gateways redirect): +// google/gemini-2.5-flash -> google/gemini-3.5-flash-lite (same $0.3/$2.5). +// Written in place in fast and cheap. fast already listed 3.5-flash-lite +// further down; from 12-01 the gateway answered the 2.5 name with it, so +// the tier was already trying it second — that second slot now says so, +// and the later duplicate is gone. The order of every other member holds. +// google/gemini-2.5-pro -> google/gemini-3.8-flash. In no tier. export const MODEL_TIERS = { - fast: ["google/gemini-3.6-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"], + fast: ["google/gemini-3.6-flash", "google/gemini-3.5-flash-lite", "openai/gpt-5.6-luna", "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.1-pro", "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", "deepseek/deepseek-v4.1-flash", "openai/gpt-5.4-nano"], + cheap: ["deepseek/deepseek-v4-pro", "qwen/qwen3.7-flash", "minimax/minimax-m3", "google/gemini-3.5-flash-lite", "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.1-pro", "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 @@ -536,6 +545,8 @@ export const CHAT_PRICE_PER_MTOKEN: Record = { "openai/o3-mini": ["openai/gpt-5.4-mini", { input: 1.1, output: 4.4 }], "openai/o4-mini": ["openai/gpt-5.4-mini", { input: 1.1, output: 4.4 }], "google/gemini-3.5-flash": ["google/gemini-3.6-flash", { input: 1.5, output: 9 }], + // 2026-12-01: Google retires Gemini 2.5. + "google/gemini-2.5-flash": ["google/gemini-3.5-flash-lite", { input: 0.3, output: 2.5 }], + "google/gemini-2.5-pro": ["google/gemini-3.8-flash", { input: 1.25, output: 10 }], }; const bare = (id: string) => id.slice(id.indexOf("/") + 1); @@ -58,6 +61,17 @@ test("fast[0] names the model Google serves, in the position its old name held", assert.deepEqual(CHAT_PRICE_PER_MTOKEN["google/gemini-3.6-flash"], { input: 0.75, output: 3.75 }); }); +test("gemini-3.5-flash-lite holds gemini-2.5-flash's slot in fast and cheap, once each", () => { + // From 2026-12-01 the gateway answers the 2.5 name with 3.5 Flash-Lite, so + // the served order is unchanged: fast tried it second already (and again, + // as a duplicate, fourth); cheap tried it fourth. + assert.equal(MODEL_TIERS.fast[1], "google/gemini-3.5-flash-lite"); + assert.equal(MODEL_TIERS.cheap[3], "google/gemini-3.5-flash-lite"); + for (const [mode, ids] of Object.entries(MODEL_TIERS)) { + assert.equal(new Set(ids).size, ids.length, `${mode} lists a model twice`); + } +}); + test("every redirect target has its own price row (a tier or a pin lands on it)", () => { for (const [retired, [target]] of Object.entries(REDIRECTED)) { assert.ok(Object.hasOwn(CHAT_PRICE_PER_MTOKEN, target), `${retired} -> ${target} has no row`);