From 6c3120401b234dc59c6b003a68f4d8cf9b1a157e Mon Sep 17 00:00:00 2001 From: 1bcMax Date: Tue, 20 Oct 2026 14:05:25 -0500 Subject: [PATCH] =?UTF-8?q?chore(release):=201.21.1=20=E2=80=94=20Router?= =?UTF-8?q?=20Core=208773a99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port of router-core #9 and #10: V4.1 Flash and GPT-6.1 Sol are tool-capable and verified tool fallbacks; Gemini 4 Argon capability row; upstream's decision snapshot and performance profiles copied verbatim. --- CHANGELOG.md | 11 ++ VERSION | 2 +- blockrun_llm/__init__.py | 2 +- blockrun_llm/router_core/__init__.py | 2 +- blockrun_llm/router_core/config.py | 2 +- .../router_core/model_capabilities.py | 10 +- .../router_core/model_profiles.generated.json | 16 +++ blockrun_llm/router_core/portfolio.py | 2 + pyproject.toml | 2 +- .../unit/router_core_decisions.snapshot.json | 110 ++++++++++++------ tests/unit/test_router_core.py | 2 +- tests/unit/test_router_core_snapshot.py | 2 +- 12 files changed, 119 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e12005..0a397d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to blockrun-llm will be documented in this file. +## 1.21.1 — 2026-10-20 + +### Changed +- **Router Core re-synced to upstream `8773a99`.** A live probe confirmed + well-formed tool calls from `deepseek/deepseek-v4.1-flash` and + `openai/gpt-6.1-sol`, so both are now tool-capable and join the verified + tool fallbacks behind the configured chains. `google/gemini-4-argon` gets a + capability row (vision, not yet probed for tools, so it fails closed). The + port reproduces upstream's 88-request decision snapshot exactly, and no + primary changes. + ## 1.21.0 — 2026-10-20 ### Changed diff --git a/VERSION b/VERSION index 3500250..2844977 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.21.0 +1.21.1 diff --git a/blockrun_llm/__init__.py b/blockrun_llm/__init__.py index a62ca39..dec00e3 100644 --- a/blockrun_llm/__init__.py +++ b/blockrun_llm/__init__.py @@ -196,7 +196,7 @@ create_wallet as generate_wallet, # User-friendly alias ) -__version__ = "1.21.0" +__version__ = "1.21.1" __all__ = [ "DEFAULT_API_KEY_URL", "ENV_API_KEY", diff --git a/blockrun_llm/router_core/__init__.py b/blockrun_llm/router_core/__init__.py index 36c1fb9..4e1e20e 100644 --- a/blockrun_llm/router_core/__init__.py +++ b/blockrun_llm/router_core/__init__.py @@ -2,7 +2,7 @@ Router Core — deterministic, constraint-first model routing. Python port of `@blockrun/router-core `_ -(upstream commit ``2cd5a10``), the same routing engine the TypeScript SDK and +(upstream commit ``8773a99``), the same routing engine the TypeScript SDK and the BlockRun gateway use. The package is deliberately product-neutral: task classification, hard capability filtering, portfolio scoring, ordered fallbacks, and routing configuration. It contains no wallet, gateway client, diff --git a/blockrun_llm/router_core/config.py b/blockrun_llm/router_core/config.py index 8915fde..0ed0be4 100644 --- a/blockrun_llm/router_core/config.py +++ b/blockrun_llm/router_core/config.py @@ -2,7 +2,7 @@ Default Routing Config Python port of ``@blockrun/router-core`` ``config.ts`` (upstream commit -``2cd5a10``; the file is unchanged since ``e38958b``, 2026-09-29, so it is the +``8773a99``; the file is unchanged since ``e38958b``, 2026-09-29, so it is the same table the TypeScript SDK bundles). V3.5: every tier rung is a public catalog id. diff --git a/blockrun_llm/router_core/model_capabilities.py b/blockrun_llm/router_core/model_capabilities.py index f7722f7..aac1d6f 100644 --- a/blockrun_llm/router_core/model_capabilities.py +++ b/blockrun_llm/router_core/model_capabilities.py @@ -137,7 +137,7 @@ "deepseek/deepseek-v4.1-flash": { "context_window": 1_048_576, "max_output_tokens": 65_536, - "supports_tools": False, + "supports_tools": True, "supports_vision": False, }, "google/gemini-2.5-flash": { @@ -200,6 +200,12 @@ "supports_tools": True, "supports_vision": True, }, + "google/gemini-4-argon": { + "context_window": 1_048_576, + "max_output_tokens": 65_536, + "supports_tools": False, + "supports_vision": True, + }, "minimax/minimax-m2.7": { "context_window": 204_800, "max_output_tokens": 16_384, @@ -435,7 +441,7 @@ "openai/gpt-6.1-sol": { "context_window": 1_050_000, "max_output_tokens": 128_000, - "supports_tools": False, + "supports_tools": True, "supports_vision": True, }, "openai/o1": { diff --git a/blockrun_llm/router_core/model_profiles.generated.json b/blockrun_llm/router_core/model_profiles.generated.json index 59fe603..f8d9077 100644 --- a/blockrun_llm/router_core/model_profiles.generated.json +++ b/blockrun_llm/router_core/model_profiles.generated.json @@ -95,6 +95,14 @@ "errorRate": 0, "samples": 3 }, + "deepseek/deepseek-v4.1-flash": { + "measuredAt": "2026-10-20T18:12:51Z", + "latencyMs": 2383.5, + "p95LatencyMs": 2547.8, + "outputTokensPerSecond": 216.53, + "errorRate": 0, + "samples": 3 + }, "google/gemini-2.5-flash": { "measuredAt": "2026-08-29T16:51:33Z", "latencyMs": 5416.4, @@ -383,6 +391,14 @@ "errorRate": 0, "samples": 3 }, + "openai/gpt-6.1-sol": { + "measuredAt": "2026-10-20T18:12:51Z", + "latencyMs": 11324, + "p95LatencyMs": 12747.6, + "outputTokensPerSecond": 45.11, + "errorRate": 0, + "samples": 3 + }, "openai/o1": { "measuredAt": "2026-08-29T16:51:33Z", "latencyMs": 4324.9, diff --git a/blockrun_llm/router_core/portfolio.py b/blockrun_llm/router_core/portfolio.py index 1e74c00..6cead63 100644 --- a/blockrun_llm/router_core/portfolio.py +++ b/blockrun_llm/router_core/portfolio.py @@ -1101,11 +1101,13 @@ def evidence_candidates(task: TaskType) -> list[str]: "anthropic/claude-fable-5.1", "anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-5.1", "openai/gpt-6-astra", "openai/gpt-6-luna", "openai/gpt-6-sol", + "openai/gpt-6.1-sol", "xai/grok-4.6", "xai/grok-4.7", "xiaomi/mimo-v2.5", diff --git a/pyproject.toml b/pyproject.toml index 04e47ba..6f91879 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "blockrun-llm" -version = "1.21.0" +version = "1.21.1" description = "BlockRun SDK - Pay-per-request AI (LLM, Image, Video, Music, Voice) via x402 on Base and Solana" readme = "README.md" license = "MIT" diff --git a/tests/unit/router_core_decisions.snapshot.json b/tests/unit/router_core_decisions.snapshot.json index 5e04602..8a9758e 100644 --- a/tests/unit/router_core_decisions.snapshot.json +++ b/tests/unit/router_core_decisions.snapshot.json @@ -42,7 +42,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (1 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=-0.08 | short (1 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0032001, "baselineCost": 0.032005, "savings": 0.9000124980471801, @@ -61,6 +61,7 @@ "openai/gpt-5.3-codex", "moonshot/kimi-k3", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -71,7 +72,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -241,7 +243,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (20 tokens) | agentic (tools) | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=-0.08 | short (20 tokens) | agentic (tools) | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.020291200000000002, "baselineCost": 0.0577, "savings": 0.6483327556325823, @@ -260,6 +262,7 @@ "xai/grok-4.5", "google/gemini-3.5-flash", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -270,7 +273,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -446,7 +450,7 @@ "tier": "MEDIUM", "confidence": 0.7373034537835593, "method": "portfolio", - "reasoning": "score=0.09 | long (1217 tokens), references (following) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=0.09 | long (1217 tokens), references (following) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0084417, "baselineCost": 0.089285, "savings": 0.905452203617629, @@ -465,6 +469,7 @@ "openai/gpt-4.1", "openai/gpt-5.3-codex", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -475,7 +480,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -700,7 +706,7 @@ "tier": "MEDIUM", "confidence": 0.5, "method": "portfolio", - "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0006437999999999999, "baselineCost": 0.0065899999999999995, "savings": 0.9023065250379363, @@ -719,6 +725,7 @@ "openai/gpt-4.1", "openai/gpt-5.3-codex", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -729,7 +736,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -956,7 +964,7 @@ "tier": "MEDIUM", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=0.08 | long (14423 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=0.08 | long (14423 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0046423, "baselineCost": 0.104115, "savings": 0.9554118042549105, @@ -976,6 +984,7 @@ "openai/gpt-5.3-codex", "deepseek/deepseek-v4-pro", "anthropic/claude-opus-5.5", + "deepseek/deepseek-v4.1-flash", "openai/gpt-5.1", "google/gemini-3.8-flash", "openai/gpt-6-luna", @@ -985,7 +994,8 @@ "openai/gpt-6-astra", "xiaomi/mimo-v2.5", "xai/grok-4.7", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -1041,7 +1051,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (1 tokens) | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=25", + "reasoning": "score=-0.08 | short (1 tokens) | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=27", "costEstimate": 0.0032001, "baselineCost": 0.032005, "savings": 0.9000124980471801, @@ -1061,6 +1071,7 @@ "anthropic/claude-opus-5", "openai/gpt-4.1", "openai/gpt-4o-mini", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -1071,7 +1082,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -1262,7 +1274,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (20 tokens) | eco | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=25", + "reasoning": "score=-0.08 | short (20 tokens) | eco | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=27", "costEstimate": 0.0009656, "baselineCost": 0.0577, "savings": 0.9832651646447141, @@ -1282,6 +1294,7 @@ "openai/gpt-5-mini", "openai/gpt-4.1", "openai/gpt-4o-mini", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -1292,7 +1305,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -1504,7 +1518,7 @@ "tier": "MEDIUM", "confidence": 0.7373034537835593, "method": "portfolio", - "reasoning": "score=0.09 | long (1217 tokens), references (following) | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=27", + "reasoning": "score=0.09 | long (1217 tokens), references (following) | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=29", "costEstimate": 0.0084417, "baselineCost": 0.089285, "savings": 0.905452203617629, @@ -1526,6 +1540,7 @@ "anthropic/claude-opus-5", "openai/gpt-4.1", "openai/gpt-4o-mini", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -1536,7 +1551,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -1791,7 +1807,7 @@ "tier": "MEDIUM", "confidence": 0.5, "method": "portfolio", - "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=27", + "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=29", "costEstimate": 0.0006437999999999999, "baselineCost": 0.0065899999999999995, "savings": 0.9023065250379363, @@ -1813,6 +1829,7 @@ "anthropic/claude-opus-5", "openai/gpt-4.1", "openai/gpt-4o-mini", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -1823,7 +1840,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -2078,7 +2096,7 @@ "tier": "MEDIUM", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=0.08 | long (14423 tokens) | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=27", + "reasoning": "score=0.08 | long (14423 tokens) | eco | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=29", "costEstimate": 0.0046423, "baselineCost": 0.104115, "savings": 0.9554118042549105, @@ -2101,6 +2119,7 @@ "openai/gpt-4.1", "openai/gpt-4o-mini", "anthropic/claude-opus-5.5", + "deepseek/deepseek-v4.1-flash", "openai/gpt-5.1", "google/gemini-3.8-flash", "openai/gpt-6-luna", @@ -2110,7 +2129,8 @@ "openai/gpt-6-astra", "xiaomi/mimo-v2.5", "xai/grok-4.7", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -2208,7 +2228,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (1 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=-0.08 | short (1 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0032001, "baselineCost": 0.032005, "savings": 0.9000124980471801, @@ -2227,6 +2247,7 @@ "openai/gpt-5.3-codex", "moonshot/kimi-k3", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -2237,7 +2258,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -2407,7 +2429,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (20 tokens) | agentic (tools) | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=-0.08 | short (20 tokens) | agentic (tools) | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.020291200000000002, "baselineCost": 0.0577, "savings": 0.6483327556325823, @@ -2426,6 +2448,7 @@ "xai/grok-4.5", "google/gemini-3.5-flash", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -2436,7 +2459,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -2612,7 +2636,7 @@ "tier": "MEDIUM", "confidence": 0.7373034537835593, "method": "portfolio", - "reasoning": "score=0.09 | long (1217 tokens), references (following) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=0.09 | long (1217 tokens), references (following) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0084417, "baselineCost": 0.089285, "savings": 0.905452203617629, @@ -2631,6 +2655,7 @@ "openai/gpt-4.1", "openai/gpt-5.3-codex", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -2641,7 +2666,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -2866,7 +2892,7 @@ "tier": "MEDIUM", "confidence": 0.5, "method": "portfolio", - "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0006437999999999999, "baselineCost": 0.0065899999999999995, "savings": 0.9023065250379363, @@ -2885,6 +2911,7 @@ "openai/gpt-4.1", "openai/gpt-5.3-codex", "deepseek/deepseek-v4-pro", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-6-luna", "openai/gpt-6-sol", @@ -2895,7 +2922,8 @@ "anthropic/claude-sonnet-5.5", "openai/gpt-6-astra", "xiaomi/mimo-v2.5", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -3122,7 +3150,7 @@ "tier": "MEDIUM", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=0.08 | long (14423 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=24", + "reasoning": "score=0.08 | long (14423 tokens) | agentic (tools) | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", "costEstimate": 0.0046423, "baselineCost": 0.104115, "savings": 0.9554118042549105, @@ -3142,6 +3170,7 @@ "openai/gpt-5.3-codex", "deepseek/deepseek-v4-pro", "anthropic/claude-opus-5.5", + "deepseek/deepseek-v4.1-flash", "openai/gpt-5.1", "google/gemini-3.8-flash", "openai/gpt-6-luna", @@ -3151,7 +3180,8 @@ "openai/gpt-6-astra", "xiaomi/mimo-v2.5", "xai/grok-4.7", - "anthropic/claude-fable-5.1" + "anthropic/claude-fable-5.1", + "openai/gpt-6.1-sol" ], "candidateScores": [ { @@ -3215,7 +3245,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (1 tokens) | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", + "reasoning": "score=-0.08 | short (1 tokens) | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=28", "costEstimate": 0.0032001, "baselineCost": 0.032005, "savings": 0, @@ -3239,11 +3269,13 @@ "anthropic/claude-fable-5.1", "anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-5.1", "openai/gpt-6-astra", "openai/gpt-6-luna", "openai/gpt-6-sol", + "openai/gpt-6.1-sol", "xai/grok-4.6", "xai/grok-4.7", "xiaomi/mimo-v2.5" @@ -3434,7 +3466,7 @@ "tier": "SIMPLE", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=-0.08 | short (20 tokens) | premium | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", + "reasoning": "score=-0.08 | short (20 tokens) | premium | v3 task=tool_agent_parallel agentRisk=high deepWebResearch=false terminalCode=false terminalSafety=false candidates=28", "costEstimate": 0.020291200000000002, "baselineCost": 0.0577, "savings": 0, @@ -3458,11 +3490,13 @@ "anthropic/claude-fable-5.1", "anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-5.1", "openai/gpt-6-astra", "openai/gpt-6-luna", "openai/gpt-6-sol", + "openai/gpt-6.1-sol", "xai/grok-4.6", "xai/grok-4.7", "xiaomi/mimo-v2.5" @@ -3637,7 +3671,7 @@ "tier": "MEDIUM", "confidence": 0.7373034537835593, "method": "portfolio", - "reasoning": "score=0.09 | long (1217 tokens), references (following) | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", + "reasoning": "score=0.09 | long (1217 tokens), references (following) | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=28", "costEstimate": 0.0084417, "baselineCost": 0.089285, "savings": 0, @@ -3661,11 +3695,13 @@ "anthropic/claude-fable-5.1", "anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-5.1", "openai/gpt-6-astra", "openai/gpt-6-luna", "openai/gpt-6-sol", + "openai/gpt-6.1-sol", "xai/grok-4.6", "xai/grok-4.7", "xiaomi/mimo-v2.5" @@ -3875,7 +3911,7 @@ "tier": "MEDIUM", "confidence": 0.5, "method": "portfolio", - "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", + "reasoning": "score=-0.06 | short (38 tokens), imperative (deploy), references (the api), agentic-light (check the, deploy) | ambiguous -> default: MEDIUM | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=28", "costEstimate": 0.0006437999999999999, "baselineCost": 0.0065899999999999995, "savings": 0, @@ -3899,11 +3935,13 @@ "anthropic/claude-fable-5.1", "anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-5.1", "openai/gpt-6-astra", "openai/gpt-6-luna", "openai/gpt-6-sol", + "openai/gpt-6.1-sol", "xai/grok-4.6", "xai/grok-4.7", "xiaomi/mimo-v2.5" @@ -4108,7 +4146,7 @@ "tier": "MEDIUM", "confidence": 0.7231218051243898, "method": "portfolio", - "reasoning": "score=0.08 | long (14423 tokens) | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=26", + "reasoning": "score=0.08 | long (14423 tokens) | premium | v3 task=tool_agent agentRisk=standard deepWebResearch=false terminalCode=false terminalSafety=false candidates=28", "costEstimate": 0.0046423, "baselineCost": 0.104115, "savings": 0, @@ -4132,11 +4170,13 @@ "anthropic/claude-fable-5.1", "anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", + "deepseek/deepseek-v4.1-flash", "google/gemini-3.8-flash", "openai/gpt-5.1", "openai/gpt-6-astra", "openai/gpt-6-luna", "openai/gpt-6-sol", + "openai/gpt-6.1-sol", "xai/grok-4.6", "xai/grok-4.7", "xiaomi/mimo-v2.5" diff --git a/tests/unit/test_router_core.py b/tests/unit/test_router_core.py index 6590bff..1a625d2 100644 --- a/tests/unit/test_router_core.py +++ b/tests/unit/test_router_core.py @@ -5,7 +5,7 @@ case (``model-capabilities.test.ts``, ``portfolio.test.ts``, ``rules.test.ts``, ``selector.test.ts``, ``strategy.test.ts``, ``tokens.test.ts``, ``tool-intent.test.ts``, ``unavailable-models.test.ts`` at commit -``2cd5a10``). They are the regression guard +``8773a99``). They are the regression guard that the Python port keeps choosing the same models as the TypeScript SDK — when upstream is re-synced, re-port these alongside the source. """ diff --git a/tests/unit/test_router_core_snapshot.py b/tests/unit/test_router_core_snapshot.py index 7fd79c2..214bae6 100644 --- a/tests/unit/test_router_core_snapshot.py +++ b/tests/unit/test_router_core_snapshot.py @@ -2,7 +2,7 @@ Cross-language decision-snapshot parity. ``router_core_decisions.snapshot.json`` is a verbatim copy of upstream -``decisions.snapshot.json`` at commit ``2cd5a10`` — 88 complete decisions the +``decisions.snapshot.json`` at commit ``8773a99`` — 88 complete decisions the TypeScript engine produced for a frozen corpus (22 prompts x 4 profiles with rotating tool/vision/structured-output shapes, frozen pricing, frozen clock). This test recomputes every decision with the Python port and compares field