Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.56.3

### Fixed — pinned `gpt-4.1-nano` reserves enough on Solana

- The `openai/gpt-4.1-nano` price row is gone. Since 2026-11-03 the Solana
gateway has answered that model with `openai/gpt-4.1-mini`, which costs
about 4x more, so a pinned call reserved too little there. Base answers it
with `openai/gpt-5-nano`, and arc still serves it. The paid default now
covers all three.

## 0.56.2

### Changed — retired models leave the routing tiers
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.56.2
0.56.3
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blockrun/mcp",
"version": "0.56.2",
"version": "0.56.3",
"mcpName": "io.github.BlockRunAI/blockrun-mcp",
"description": "BlockRun MCP Server - Give your AI agent web search, deep research, prediction markets, and crypto data. Pay per call from a USDC wallet (Solana or Base) or a BlockRun API key.",
"type": "module",
Expand Down
6 changes: 5 additions & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,11 @@ export const CHAT_PRICE_PER_MTOKEN: Record<string, { input: number; output: numb
"openai/gpt-5.2": { input: 1.75, output: 14 },
"openai/gpt-4.1": { input: 2, output: 8 },
"openai/gpt-4.1-mini": { input: 0.4, output: 1.6 },
"openai/gpt-4.1-nano": { input: 0.1, output: 0.4 },
// NOT openai/gpt-4.1-nano: Solana has sent it to gpt-4.1-mini ($0.4/$1.6)
// since 2026-11-03, so its old $0.1/$0.4 row under-reserves that rail (base
// sends it to gpt-5-nano at $0.05/$0.4 until 2027-02-09; arc still serves it
// at $0.1/$0.4). Unlisted, it reserves the $5/$30 default, which covers
// every rail (the o3-mini rule).
"openai/gpt-4o": { input: 2.5, output: 10 },
"openai/gpt-4o-mini": { input: 0.15, output: 0.6 },
"openai/o3": { input: 2, output: 8 },
Expand Down
17 changes: 17 additions & 0 deletions test/retired-models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,20 @@ test("o3-mini and o4-mini carry no row: theirs would under-reserve gpt-5.4-mini'
assert.deepEqual(rateFor(id), DEFAULT_CHAT_PRICE, id);
}
});

test("gpt-4.1-nano carries no row: $0.1/$0.4 under-reserves Solana's redirect", () => {
// Base -> gpt-5-nano ($0.05/$0.4) until 2027-02-09; Solana -> gpt-4.1-mini
// ($0.4/$1.6) since 2026-11-03; arc serves it at $0.1/$0.4. The default
// covers every rail.
assert.equal(Object.hasOwn(CHAT_PRICE_PER_MTOKEN, "openai/gpt-4.1-nano"), false);
for (const target of ["openai/gpt-5-nano", "openai/gpt-4.1-mini"]) {
const t = rateFor(target);
const r = rateFor("openai/gpt-4.1-nano");
assert.ok(r.input >= t.input && r.output >= t.output, `gpt-4.1-nano under-reserves ${target}`);
for (const chars of [1_000, 100_000, 700_000]) {
const pinned = estimateChatCost(1024, undefined, "openai/gpt-4.1-nano", undefined, chars);
const served = estimateChatCost(1024, undefined, target, undefined, chars);
assert.ok(pinned >= served, `gpt-4.1-nano at ${chars} chars reserves ${pinned} < ${served} for ${target}`);
}
}
});
Loading