diff --git a/README.md b/README.md index 91c7bab..8d17cd4 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,011 | +| `full` *(default)* | 19 | 14,014 | | `trading` | 8 | 5,411 | | `media` | 7 | 6,795 | -| `research` | 5 | 2,752 | -| `chat` | 3 | 2,079 | +| `research` | 5 | 2,755 | +| `chat` | 3 | 2,082 | 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 d60cb2d..81e07a7 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,011 | +| `full` *(default)* | 19 | 14,014 | | `trading` | 8 | 5,411 | | `media` | 7 | 6,795 | -| `research` | 5 | 2,752 | -| `chat` | 3 | 2,079 | +| `research` | 5 | 2,755 | +| `chat` | 3 | 2,082 | Descriptions are ~54% of it, input schemas ~42%. `--profile trading` costs 61% less than the default for the same workflow. diff --git a/scripts/verify-prices.ts b/scripts/verify-prices.ts index 93bdd2c..0817cf2 100644 --- a/scripts/verify-prices.ts +++ b/scripts/verify-prices.ts @@ -293,7 +293,7 @@ const PROBES: Probe[] = [ // drift apart are invisible until an invoice says otherwise. ...([ ["powerful", "openai/gpt-5.4-pro"], - ["reasoning", "openai/gpt-5.6-sol"], + ["reasoning", "anthropic/claude-opus-5"], // gpt-5.6-sol cut to $4/$20 2026-08-21 ["coding", "anthropic/claude-opus-5"], ["fast", "google/gemini-3.5-flash"], ["glm", "zai/glm-5.2"], diff --git a/src/tools/chat.ts b/src/tools/chat.ts index 5035ba0..a7d5eb3 100644 --- a/src/tools/chat.ts +++ b/src/tools/chat.ts @@ -432,13 +432,13 @@ Notable modes: - mode:"glm" → Zhipu GLM-5 / 5.2 / 5.1 / 5-Turbo (strong at coding) - mode:"free" → free models (no cost) -Pick directly: model:"anthropic/claude-opus-5", model:"moonshot/kimi-k3", model:"openai/gpt-5.6-sol", model:"xai/grok-4.5", model:"nvidia/gpt-oss-120b" (free). +Pick directly: model:"anthropic/claude-opus-5.5", model:"openai/gpt-6-sol", model:"xai/grok-4.7", model:"moonshot/kimi-k3", model:"nvidia/gpt-oss-120b" (free). Run blockrun_models to see all available models with pricing.`, annotations: TOOL_ANNOTATIONS.generative, inputSchema: { message: z.string().describe("Your message to the AI"), - model: z.string().optional().describe("Specific model ID (e.g., 'moonshot/kimi-k3', 'openai/gpt-5.6-sol', 'zai/glm-5')"), + model: z.string().optional().describe("Specific model ID (e.g., 'openai/gpt-6-sol', 'anthropic/claude-sonnet-5.5', 'zai/glm-5')"), mode: z.enum(["fast", "balanced", "powerful", "cheap", "reasoning", "free", "coding", "glm"]).optional().describe("Routing mode: powerful/reasoning = frontier models (Opus 5, GPT-5.6-sol, Kimi K3), coding = code-specialized, glm = Zhipu GLM (great for coding), cheap = budget models, free = $0 models (ignored if model specified)"), system: z.string().optional().describe("Optional system prompt"), max_tokens: z.number().optional().default(1024).describe("Max tokens in response"), diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 0e8551a..bfcdd58 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -38,12 +38,15 @@ export const BASE_RPC_URLS = [ // presence in the catalogue is NECESSARY BUT NOT SUFFICIENT for health; // absence from it is NOT SUFFICIENT for death — probe before deleting. // -// OpenAI (28): gpt-6-astra ($10/$50, 1M — the GPT-6 flagship; listed by +// OpenAI (31): gpt-6-astra ($10/$50, 1M — the GPT-6 flagship; listed by // 2026-09-08 ABOVE the $5/$30 default, so it carries a CHAT_PRICE_PER_MTOKEN -// row), gpt-5.6-sol ($5/$30, 1M, deepest reasoning), gpt-5.6-terra +// row), gpt-6-sol ($2/$10, 1M — the cost-efficient GPT-6 tier), gpt-6-luna +// ($0.1/$0.5, 1M — fast, low-cost GPT-6); all three GPT-6 bill input 2x and +// output 1.5x past 272K input; gpt-5.1 ($1.25/$10, 400K). gpt-5.6-sol ($4/$20, 1M, deepest +// reasoning; CUT from $5/$30 on 2026-08-21), gpt-5.6-terra // ($2/$12, 1M — the balanced default; CUT from $2.5/$15), gpt-5.6-luna // ($0.2/$1.2, 1M, no reasoning; CUT from $1/$6), plus the 2026-08 "pro -// reasoning mode" trio: gpt-5.6-sol-pro ($5/$30), gpt-5.6-terra-pro ($1/$6 — +// reasoning mode" trio: gpt-5.6-sol-pro ($4/$20), gpt-5.6-terra-pro ($1/$6 — // deliberately HALF the standard Terra rate, per the gateway registry, not a // pricing bug), gpt-5.6-luna-pro ($0.1/$0.6). gpt-5.5 ($5/$30), gpt-5.5-pro // ($30/$180 — ties gpt-5.4-pro for priciest model served), chat-latest @@ -52,9 +55,11 @@ export const BASE_RPC_URLS = [ // gpt-5.3-codex ($1.75/$14), gpt-5.2-pro ($21/$168), gpt-5.4-mini, // gpt-5-mini, gpt-5.4-nano, gpt-4.1{,-mini,-nano}, gpt-4o{,-mini}, // o1 ($15/$60), o3 ($2/$8), o3-mini, o4-mini -// Anthropic (10): claude-fable-5.1 ($10/$50, 1M — listed by 2026-09-08 ABOVE -// the default, so it carries a price row), claude-opus-5 ($5/$25, 1M, 128k out — newest Opus, -// step-change over 4.8 at the same price; live-probed 2026-08-12), +// Anthropic (12): claude-fable-5.1 ($10/$50, 1M — listed by 2026-09-08 ABOVE +// the default, so it carries a price row), claude-opus-5.5 ($4/$20, 1M, 128k +// out — newest Opus, cheaper than Opus 5, thinking always on), +// claude-sonnet-5.5 ($2/$10, 1M, 128k out — newest Sonnet), claude-opus-5 +// ($5/$25, 1M, 128k out; live-probed 2026-08-12), // claude-opus-4.8 ($5/$25, 1M), claude-fable-5 ($10/$50, 1M), // claude-opus-4.7 ($5/$25, 1M), claude-sonnet-5 ($2/$10, 1M — CUT from // $3/$15; both gateways 2026-09-08. On the native path the price row IS the @@ -74,7 +79,9 @@ export const BASE_RPC_URLS = [ // ZAI (4): glm-5.2 ($1.4/$4.4, 1M), glm-5.1 ($1.4/$4.4), glm-5 ($1/$3.2 — // Z.AI RAISED the list rate; still the cheapest ZAI, but no longer a // cheap-tier pick), glm-5-turbo ($1.2/$4) -// xAI (3): grok-4.5 ($2/$6, 500K, native search), grok-4.3 ($1.25/$2.5, 1M), +// xAI (5): grok-4.7 ($2/$6, 500K, vision, always-on reasoning), grok-4.6 +// ($2/$6, 500K), grok-4.5 ($2/$6, 500K) — all three 2x at >=200K input and +// native Live Search; grok-4.3 ($1.25/$2.5, 1M), // grok-build-0.1 ($1/$2, coding) // MiniMax (2): minimax-m3 ($0.3/$1.2, 1M), minimax-m2.7 ($0.3/$1.2, 200K) // Qwen (3): qwen3.7-max ($1.475/$4.425, 1M), qwen3.7-plus ($0.32/$1.28, 1M), @@ -310,6 +317,7 @@ export const CHAT_PRICE_PER_MTOKEN: Record [undefined, "openai/gpt-5.2-pro", 1.026640], [undefined, "openai/o1", 0.727420], [undefined, "anthropic/claude-fable-5", 0.486310], - [undefined, "openai/gpt-5.6-sol", 0.244171], + [undefined, "openai/gpt-5.6-sol", 0.195125], // cut to $4/$20 2026-08-21; re-probed 2026-10-02 [undefined, "anthropic/claude-opus-5", 0.243655], [undefined, "openai/gpt-5.6-terra", 0.098269], [undefined, "google/gemini-3.5-flash", 0.073951], [undefined, "zai/glm-5", 0.049346], [undefined, "deepseek/deepseek-v4-pro", 0.064790], + // Added 2026-10-02 (live 402, same prompt). + [undefined, "openai/gpt-6-astra", 0.486310], + [undefined, "openai/gpt-6-sol", 0.098063], + [undefined, "openai/gpt-6-luna", 0.005854], + [undefined, "openai/gpt-5.1", 0.062051], + [undefined, "anthropic/claude-fable-5.1", 0.486310], + [undefined, "anthropic/claude-opus-5.5", 0.195125], + [undefined, "anthropic/claude-sonnet-5.5", 0.098063], + [undefined, "xai/grok-4.6", 0.097650], + [undefined, "xai/grok-4.7", 0.097650], // Tier routing: the charge is that of the member the loop settles on, so each // tier is pinned against its most expensive member's live quote. ["powerful", undefined, 1.460020], // gpt-5.4-pro ["balanced", undefined, 0.244171], // gpt-5.5 - ["reasoning", undefined, 0.243655], // gpt-5.6-sol / opus-5 + ["reasoning", undefined, 0.243655], // opus-5 ["coding", undefined, 0.243655], // claude-opus-5 ["fast", undefined, 0.073951], // gemini-3.5-flash ["glm", undefined, 0.049346], // glm-5.x @@ -98,7 +108,9 @@ test("estimateChatCost prices an unknown model at the catalog ceiling, not a gue // (seven as of 2026-09-08 — `npm run verify:prices` sweeps the live catalogue // and fails the moment an eighth appears without a row). const unknown = estimateChatCost(1024, undefined, "someone/brand-new-model", undefined, 100_000); - assert.equal(unknown, estimateChatCost(1024, undefined, "openai/gpt-5.6-sol", undefined, 100_000)); + // gpt-5.5 sits exactly at the $5/$30 ceiling (gpt-5.6-sol did until its + // 2026-08-21 cut to $4/$20). + assert.equal(unknown, estimateChatCost(1024, undefined, "openai/gpt-5.5", undefined, 100_000)); assert.ok(unknown >= 0.244171); }); @@ -434,6 +446,8 @@ test("anthropicCallCost normalises the gateway's echo to the catalogue key and n ["claude-sonnet-4.6-20260301", "anthropic/claude-sonnet-4.6"], ["claude-opus-5-20260101", "anthropic/claude-opus-5"], ["anthropic/claude-opus-5", "anthropic/claude-opus-5"], + ["claude-opus-5-5", "anthropic/claude-opus-5.5"], + ["claude-sonnet-5-5-20261001", "anthropic/claude-sonnet-5.5"], ]; for (const [echo, key] of ECHOES) { const booked = anthropicCallCost(echo, 100_000, 1024); @@ -445,7 +459,7 @@ test("anthropicCallCost normalises the gateway's echo to the catalogue key and n // A sibling with NO row returns null — the estimate fallback — rather than // borrowing its major version's rate. This is the mechanism that would have // let claude-fable-5.1 book fable-5's row before it had one of its own. - for (const unlisted of ["claude-sonnet-5-1", "claude-sonnet-5.1", "claude-fable-5-2", "claude-opus-5-5-20270101", "claude-opus-5x", "claude-does-not-exist"]) { + for (const unlisted of ["claude-sonnet-5-1", "claude-sonnet-5.1", "claude-fable-5-2", "claude-opus-5-6-20270101", "claude-opus-5x", "claude-does-not-exist"]) { assert.equal(anthropicCallCost(unlisted, 100_000, 1024), null, `${unlisted} has no row and must not borrow one`); } });