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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Two rules govern this file, and both are load-bearing:
1. **These are weak priors, never task-quality labels.** They inform the `speed` and `reliability` terms only. A model is not "better" because it is fast.
2. **Historical numbers are never presented as a current provider SLA.** Hosts are expected to inject fresher observations (see below); the committed snapshot exists so the engine is safe and useful when a catalog is temporarily unavailable.

The repository ships 68 live performance profiles (three samples per model), 9 auditable historical seeds, 83 function-calling probe results, and a built-in snapshot of the 93 text models in the public catalog (2026-11-08 sync, plus routed ids the listing omits). Eleven newly listed models passed a real structured tool-call probe and are admitted as availability fallbacks for tool-required turns. DeepSeek V4 Flash Vision Experimental and Qwen 3.8 Flash did not return a valid tool call and remain fail-closed. GPT-6.1 Sol and DeepSeek V4.1 Flash also passed a structured tool-call probe in the subsequent capability refresh. Gemini 4 Carbon, added 2026-11-11 ahead of its gateway listing, returned its own next tool call through a two-round tool history on both the streaming and non-streaming gateway paths, so it is admitted as a tool fallback too. Mistral Large 4 and Gemini 4 Argon have no probe evidence yet. A model with no probe evidence can serve plain chat but never a tool-required turn.
The repository ships 69 live performance profiles (three samples per model), 9 auditable historical seeds, 84 function-calling probe results, and a built-in snapshot of the 97 text models in the public catalog (2026-11-23 sync). Eleven newly listed models passed a real structured tool-call probe and are admitted as availability fallbacks for tool-required turns. DeepSeek V4 Flash Vision Experimental and Qwen 3.8 Flash did not return a valid tool call and remain fail-closed. GPT-6.1 Sol and DeepSeek V4.1 Flash also passed a structured tool-call probe in the subsequent capability refresh. Gemini 4 Carbon, added 2026-11-11 ahead of its gateway listing, returned its own next tool call through a two-round tool history on both the streaming and non-streaming gateway paths, so it is admitted as a tool fallback too. Kimi K3.1 Pro, which replaced Kimi K3 in every chain and affinity band on 2026-11-23, passed the live profile probe (three completions, no errors, a well-formed tool call); its affinity values are carried over from K3, not measured on K3.1 Pro. Mistral Large 4, Gemini 4 Argon, Hydrogen and Neon, Claude Fable 5.2, and GPT-6.2 Astra and Sol have no probe evidence yet. A model with no probe evidence can serve plain chat but never a tool-required turn.

Passing the function-call probe does **not** promote a model to primary. New tool-capable models are appended after the configured and trajectory-benchmarked candidate chains with neutral task affinity; they can recover an unavailable route immediately (cheapest first outside Premium), while primary promotion still requires an end-to-end agent evaluation.

Expand Down Expand Up @@ -345,7 +345,7 @@ The engine never makes a network call. Everything current is **injected** by the
const decision = route(prompt, systemPrompt, maxOutputTokens, {
config: DEFAULT_ROUTING_CONFIG,
modelPricing, // required — current prices from your catalog
modelCapabilities, // optional — overrides the built-in 93-model snapshot
modelCapabilities, // optional — overrides the built-in 97-model snapshot
modelPerformance, // optional — fresh speed/reliability, e.g. the Observatory feed
routingProfile: "auto",
hasTools, toolCount, toolNames, requiresTools,
Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ declare const HISTORICAL_MODEL_PROFILES: Readonly<Record<string, ModelPerformanc
* product catalog is temporarily unavailable, without importing product code.
*
* GENERATED by scripts/sync-model-capabilities.mjs from the public catalog
* (GET https://blockrun.ai/api/v1/models) on 2026-11-08; supportsTools comes
* (GET https://blockrun.ai/api/v1/models) on 2026-11-23; supportsTools comes
* from a live function-calling probe (scripts/probe-tools.json). Regenerate
* rather than editing by hand — a hand edit is overwritten on the next sync.
*/
Expand Down
110 changes: 75 additions & 35 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions scripts/probe-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@
"supportsTools": true,
"probedAt": "2026-08-29T16:51:33Z"
},
"moonshot/kimi-k3.1-pro": {
"supportsTools": true,
"probedAt": "2026-11-23T20:18:18Z"
},
"nvidia/mistral-nemotron": {
"supportsTools": false,
"probedAt": "2026-08-29T16:59:54Z",
Expand Down
10 changes: 5 additions & 5 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ export const DEFAULT_ROUTING_CONFIG: RoutingConfig = {
"openai/gpt-5.5", // $5/$30 — prior OpenAI flagship
"openai/gpt-5.4", // $2.50/$15 — previous flagship, benchmarked
"zai/glm-5.3", // $1.40/$4.40, 1M ctx, always-on thinking — verified live 2026-08-19
"moonshot/kimi-k3", // $3/$15, 1M ctx — Moonshot flagship (K2.7 successor)
"moonshot/kimi-k3.1-pro", // $2/$10, 1M ctx — Moonshot flagship (K3 successor)
"deepseek/deepseek-v4-pro", // $0.435/$0.87 — strongest open-weight reasoner
"deepseek/deepseek-chat", // $0.14/$0.28 — cheap last resort
"google/gemini-2.5-flash", // $0.30/$2.50
Expand Down Expand Up @@ -1231,7 +1231,7 @@ export const DEFAULT_ROUTING_CONFIG: RoutingConfig = {
primary: "openai/gpt-5.3-codex", // $1.75/$14 - 400K context, 128K output — code_edit/debug lead (portfolio.ts)
fallback: [
"anthropic/claude-sonnet-5", // $3/$15 — code_agent band 0.98
"moonshot/kimi-k3", // $3/$15, 1M ctx — Moonshot flagship
"moonshot/kimi-k3.1-pro", // $2/$10, 1M ctx — Moonshot flagship
"zai/glm-5.3", // $1.40/$4.40 — long-horizon coding
"google/gemini-3.6-flash", // $1.50/$7.50
"google/gemini-3.5-flash", // $1.50/$9
Expand All @@ -1256,7 +1256,7 @@ export const DEFAULT_ROUTING_CONFIG: RoutingConfig = {
"anthropic/claude-sonnet-5", // Sonnet-tier drop-down, near-Opus quality
"anthropic/claude-sonnet-4.6",
"xai/grok-4.5", // xAI flagship — 503-resistant, direct-xAI SKU
"moonshot/kimi-k3", // Moonshot flagship, independent infra
"moonshot/kimi-k3.1-pro", // Moonshot flagship, independent infra
"openai/gpt-5.6-terra", // GPT-5.6 balanced tier — stable (Sol excluded: #202)
"openai/gpt-5.5", // Prior OpenAI flagship — 1M+ ctx, native agent + computer use
"openai/gpt-5.4", // Previous flagship (slow but stable, benchmarked at 6,213ms)
Expand Down Expand Up @@ -1307,7 +1307,7 @@ export const DEFAULT_ROUTING_CONFIG: RoutingConfig = {
"openai/gpt-4o-mini", // $0.15/$0.60 — reliable tool calling
"anthropic/claude-haiku-4.5", // $1/$5
"deepseek/deepseek-chat", // $0.14/$0.28
"moonshot/kimi-k3", // $3/$15 — tool_agent band 0.85
"moonshot/kimi-k3.1-pro", // $2/$10 — tool_agent band 0.85
],
},
COMPLEX: {
Expand All @@ -1323,7 +1323,7 @@ export const DEFAULT_ROUTING_CONFIG: RoutingConfig = {
"anthropic/claude-opus-4.8", // Prior flagship Opus — identical cost to 5
"anthropic/claude-opus-4.7", // Flagship Opus — in-family hot swap
"xai/grok-4.5", // xAI flagship — strong tool use, independent infra
"moonshot/kimi-k3", // Moonshot flagship — independent infra
"moonshot/kimi-k3.1-pro", // Moonshot flagship — independent infra
"openai/gpt-5.6-terra", // GPT-5.6 balanced tier — stable (Sol excluded: #202)
"openai/gpt-5.5", // Prior flagship — native agent + computer use (exactly the agentic-tier use case)
"openai/gpt-5.4", // Previous flagship — reliable
Expand Down
Loading
Loading