From 50e26b18b8a68566041231656005e11b3a5e4d11 Mon Sep 17 00:00:00 2001 From: chrysniongolo Date: Sat, 5 Dec 2026 00:28:11 +0100 Subject: [PATCH] feat: refresh OpenRouter model aliases (2026-12-05 snapshot) Remove 7 aliases absent from the live catalog (474 models), add 14 curated aliases, keep default/fallback claude-opus-4.8 unchanged. Exclude -pro, :batch, ~latest router aliases and new tiers above $15/M output. Update static CLI catalog, tests, README, and snapshot reference doc. --- README.md | 6 +- agentic_internet/cli.py | 4 +- agentic_internet/config/settings.py | 23 +++-- docs/references/README.md | 3 +- .../openrouter-models-2026-12-05.md | 93 +++++++++++++++++++ tests/test_model_catalog.py | 86 +++++++++++++++-- tests/test_model_manager.py | 4 +- 7 files changed, 198 insertions(+), 21 deletions(-) create mode 100644 docs/references/openrouter-models-2026-12-05.md diff --git a/README.md b/README.md index 2295011..4e2bff7 100644 --- a/README.md +++ b/README.md @@ -507,15 +507,15 @@ The static catalog is a curated offline fallback. Run `agentic-internet models - |----------|--------|----------| | Anthropic | Claude Opus 4.8, Sonnet 5.5, Haiku 5.5 | Reasoning, planning, orchestration | | OpenAI | GPT-6.1 Terra, GPT-6.1 Sol, GPT-6 Luna, GPT-5.2 | General tasks, coding, reasoning | -| Google | Gemini 4 Argon, Gemini 3.5 Flash, Gemini 2.5 Pro | Multimodal analysis, fast responses | +| Google | Gemini 4 Argon, Gemini 4 Hydrogen, Gemini 4 Neon, Gemini 3.5 Flash | Multimodal analysis, fast responses | | DeepSeek | V4.1 Flash, V3.2, R1 | Efficient and open-weight reasoning | | Qwen | Qwen3.8 Max Prime, Qwen3.7 Max, Qwen3 Coder | Coding, multilingual synthesis | | MoonshotAI | Kimi K3.1 Pro, Kimi K2.5 | Long-context and agentic tasks | | Mistral | Large 4, Large 2512, Devstral 2 | Business analysis, agentic coding | | MiniMax | M3.1 Flash | Fast, balanced agent workflows | -| xAI | Grok 4.3, Grok Build 0.1 | Reasoning and coding | +| xAI | Grok 4.3 | Reasoning and coding | | Perplexity | Sonar Pro, Sonar Reasoning Pro, Sonar Deep Research | Search-optimized research | -| Other | Liquid LFM 3, Tencent HY4, Cohere Command A Plus, Step 5 Preview | Efficient and specialized agent workflows | +| Other | Liquid LFM 3, Tencent HY4, Cohere Command A Plus, Step 5 | Efficient and specialized agent workflows | Free variants `lfm-3-1.7b-free` and `nemotron-3.5-super-vl-free` are available for bounded provider smoke tests. Free availability and final response quality remain provider-dependent; no paid fallback is implicit. diff --git a/agentic_internet/cli.py b/agentic_internet/cli.py index 217df36..7c1dd94 100644 --- a/agentic_internet/cli.py +++ b/agentic_internet/cli.py @@ -437,6 +437,7 @@ def news( "research": [ {"name": "claude-sonnet-5.5", "provider": "openrouter", "desc": "Claude Sonnet 5.5 - research synthesis"}, {"name": "gpt-6.1-sol", "provider": "openrouter", "desc": "GPT-6.1 Sol - deep analysis"}, + {"name": "gpt-6.2-sol", "provider": "openrouter", "desc": "GPT-6.2 Sol - long-context deep analysis"}, {"name": "gemini-4-argon", "provider": "openrouter", "desc": "Gemini 4 Argon - multimodal research"}, {"name": "qwen3.8-max-prime", "provider": "openrouter", "desc": "Qwen3.8 Max Prime - evidence synthesis"}, {"name": "command-a-plus", "provider": "openrouter", "desc": "Cohere Command A Plus - grounded research"}, @@ -447,13 +448,14 @@ def news( {"name": "claude-haiku-5.5", "provider": "openrouter", "desc": "Claude Haiku 5.5 - fast summarization"}, {"name": "gpt-6-luna", "provider": "openrouter", "desc": "GPT-6 Luna - efficient news analysis"}, {"name": "gemini-4-argon", "provider": "openrouter", "desc": "Gemini 4 Argon - multimodal current events"}, + {"name": "gemini-4-hydrogen", "provider": "openrouter", "desc": "Gemini 4 Hydrogen - fast multimodal news"}, {"name": "minimax-m3.1-flash", "provider": "openrouter", "desc": "MiniMax M3.1 Flash - fast analysis"}, ], "science": [ {"name": "claude-sonnet-5.5", "provider": "openrouter", "desc": "Claude Sonnet 5.5 - technical reasoning"}, {"name": "gpt-6.1-sol", "provider": "openrouter", "desc": "GPT-6.1 Sol - scientific analysis"}, {"name": "glm-5.3-prime", "provider": "openrouter", "desc": "GLM 5.3 Prime - technical synthesis"}, - {"name": "step-5-preview", "provider": "openrouter", "desc": "Step 5 Preview - reasoning and tools"}, + {"name": "step-5", "provider": "openrouter", "desc": "Step 5 - reasoning and tools"}, {"name": "command-a-plus", "provider": "openrouter", "desc": "Command A Plus - research and citations"}, ], } diff --git a/agentic_internet/config/settings.py b/agentic_internet/config/settings.py index ad05188..94e256c 100644 --- a/agentic_internet/config/settings.py +++ b/agentic_internet/config/settings.py @@ -25,7 +25,7 @@ class ModelConfig(BaseModel): max_tokens: int = Field(default=2048, description="Maximum tokens for generation") top_p: float = Field(default=0.95, description="Top-p sampling parameter") - # Model provider configurations (refreshed from OpenRouter snapshot on 2026-11-09) + # Model provider configurations (refreshed from OpenRouter snapshot on 2026-12-05) openrouter_models: dict[str, str] = Field( default={ # Anthropic @@ -49,25 +49,24 @@ class ModelConfig(BaseModel): "gpt-6.1-terra": "openrouter/openai/gpt-6.1-terra", "gpt-6.1-sol": "openrouter/openai/gpt-6.1-sol", "gpt-6-luna": "openrouter/openai/gpt-6-luna", + "gpt-6.2-sol": "openrouter/openai/gpt-6.2-sol", # Google "gemini-3.5-flash": "openrouter/google/gemini-3.5-flash", "gemini-3.1-flash-lite": "openrouter/google/gemini-3.1-flash-lite", "gemini-3-flash": "openrouter/google/gemini-3-flash-preview", - "gemini-2.5-pro": "openrouter/google/gemini-2.5-pro", - "gemini-2.5-flash": "openrouter/google/gemini-2.5-flash", "gemini-4-argon": "openrouter/google/gemini-4-argon", + "gemini-4-hydrogen": "openrouter/google/gemini-4-hydrogen", + "gemini-4-neon": "openrouter/google/gemini-4-neon", # DeepSeek "deepseek-v3.2": "openrouter/deepseek/deepseek-v3.2", "deepseek-r1": "openrouter/deepseek/deepseek-r1-0528", "deepseek-v4.1-flash": "openrouter/deepseek/deepseek-v4.1-flash-1017", # xAI "grok-4.3": "openrouter/x-ai/grok-4.3", - "grok-build-0.1": "openrouter/x-ai/grok-build-0.1", # Mistral "mistral-medium-3.5": "openrouter/mistralai/mistral-medium-3-5", "devstral-2": "openrouter/mistralai/devstral-2512", "mistral-large": "openrouter/mistralai/mistral-large-2512", - "mistral-medium-3.1": "openrouter/mistralai/mistral-medium-3.1", "mistral-small": "openrouter/mistralai/mistral-small-3.2-24b-instruct", "mistral-large-4": "openrouter/mistralai/mistral-large-4-0", # Qwen @@ -76,12 +75,13 @@ class ModelConfig(BaseModel): "qwen3-coder-next": "openrouter/qwen/qwen3-coder-next", "qwen3.7-max": "openrouter/qwen/qwen3.7-max", "qwen3.8-max-prime": "openrouter/qwen/qwen3.8-max-prime", + "qwen4-max": "openrouter/qwen/qwen4-max", + "qwen4-35b-a3b": "openrouter/qwen/qwen4-35b-a3b", # Meta "llama-4-maverick": "openrouter/meta-llama/llama-4-maverick", "llama-4-scout": "openrouter/meta-llama/llama-4-scout", # MoonshotAI "kimi-k2.5": "openrouter/moonshotai/kimi-k2.5", - "kimi-k2": "openrouter/moonshotai/kimi-k2", "kimi-k3.1-pro": "openrouter/moonshotai/kimi-k3.1-pro", # Perplexity "sonar-pro": "openrouter/perplexity/sonar-pro", @@ -90,18 +90,25 @@ class ModelConfig(BaseModel): "sonar-deep-research": "openrouter/perplexity/sonar-deep-research", # MiniMax "minimax-m3.1-flash": "openrouter/minimax/minimax-m3.1-flash", + "minimax-m4": "openrouter/minimax/minimax-m4", # Other agentic / multimodal models "step-3.7-flash": "openrouter/stepfun/step-3.7-flash", - "step-5-preview": "openrouter/stepfun/step-5-preview", + "step-5": "openrouter/stepfun/step-5", "perceptron-mk1": "openrouter/perceptron/perceptron-mk1", "perceptron-mk1.5": "openrouter/perceptron/perceptron-mk1.5", "glm-5.3-prime": "openrouter/z-ai/glm-5.3-prime", + "glm-5.4": "openrouter/z-ai/glm-5.4", "command-a-plus": "openrouter/cohere/command-a-plus", - "solar-mini4": "openrouter/upstage/solar-mini4", + "solar-mini-4.5": "openrouter/upstage/solar-mini-4-5", "lfm-3-1.7b": "openrouter/liquid/lfm-3-1.7b", "lfm-3-1.7b-free": "openrouter/liquid/lfm-3-1.7b:free", "nemotron-3.5-super-vl-free": "openrouter/nvidia/nemotron-3.5-super-vl:free", "hy4": "openrouter/tencent/hy4", + "hy4-flash": "openrouter/tencent/hy4-flash", + "ergo-1.0": "openrouter/amazon/ergo-1.0", + "inkling-2-mini": "openrouter/thinkingmachines/inkling-2-mini", + "flint-v1.1-free": "openrouter/recursive/flint-v1.1:free", + "ernie-5.5-flash-free": "openrouter/baidu/ernie-5.5-flash-preview:free", "particle-1": "openrouter/particle-ai/particle-1", "openrouter-auto": "openrouter/openrouter/auto", "openrouter-auto-code": "openrouter/openrouter/auto-code", diff --git a/docs/references/README.md b/docs/references/README.md index 88eed9a..10a50fe 100644 --- a/docs/references/README.md +++ b/docs/references/README.md @@ -16,7 +16,8 @@ Store durable library and provider notes here, including `llms.txt` files or sho | Snapshot | Purpose | |----------|---------| -| [OpenRouter models - 2026-11-09](openrouter-models-2026-11-09.md) | Latest verified OpenRouter inventory, stale-alias cleanup, recent mappings, and live validation | +| [OpenRouter models - 2026-12-05](openrouter-models-2026-12-05.md) | Latest verified OpenRouter inventory, stale-alias removal, curated additions, premium/batch/router exclusion rule | +| [OpenRouter models - 2026-11-09](openrouter-models-2026-11-09.md) | Previous OpenRouter inventory, stale-alias cleanup, recent mappings, and live validation | | [OpenRouter models - 2026-05-31](openrouter-models-2026-05-31.md) | Historical OpenRouter inventory and repo model-catalog gaps | | [SmolAgents features - 2026-05-31](smolagents-features-2026-05-31.md) | Current SmolAgents features and Code Mode implications | | [LiteLLM and uv security review - 2026-11-09](security/litellm-uv-cve-review-2026-11-09.md) | Recent advisory verification, client/proxy reachability, and remediation priorities | diff --git a/docs/references/openrouter-models-2026-12-05.md b/docs/references/openrouter-models-2026-12-05.md new file mode 100644 index 0000000..b09c8c4 --- /dev/null +++ b/docs/references/openrouter-models-2026-12-05.md @@ -0,0 +1,93 @@ +# OpenRouter Model Snapshot — 2026-12-05 + +## Verification + +- Source: [OpenRouter model overview](https://openrouter.ai/docs/guides/overview/models) and the public [`GET /api/v1/models`](https://openrouter.ai/api/v1/models) endpoint (no API key required). +- Live inventory: 474 models at review time (2026-12-05). +- Static project aliases: 65 before this refresh, 72 after (65 − 7 removed + 14 added). +- The default `openrouter/anthropic/claude-opus-4.8` and the OpenRouter fallback (same ID) are live and unchanged. +- Every configured alias value (minus the `openrouter/` prefix) was checked against the live inventory: 0 missing. +- Procedure follows [Plan 002](../exec-plans/completed/2026-11-09-refresh-openrouter-models.md). + +Static aliases are a curated offline fallback. Use `agentic-internet models --live` for the freshest inventory and capability metadata. + +**Live agent generation was NOT run as part of this refresh.** Validation is metadata only (public model catalog); no provider requests, paid or free, were made, and no API key was used. + +## Removed stale aliases + +The following 7 aliases were absent from the live catalog and were removed: + +| Alias | Former OpenRouter ID | Replacement | +|-------|----------------------|-------------| +| `gemini-2.5-pro` | `google/gemini-2.5-pro` | — (use `gemini-4-hydrogen` / `gemini-4-neon`) | +| `gemini-2.5-flash` | `google/gemini-2.5-flash` | — (use `gemini-3.5-flash`) | +| `grok-build-0.1` | `x-ai/grok-build-0.1` | — (use `grok-4.3`) | +| `mistral-medium-3.1` | `mistralai/mistral-medium-3.1` | — (use `mistral-medium-3.5`) | +| `kimi-k2` | `moonshotai/kimi-k2` | — (use `kimi-k2.5`) | +| `step-5-preview` | `stepfun/step-5-preview` | `step-5` | +| `solar-mini4` | `upstage/solar-mini4` | `solar-mini-4.5` | + +## Curated additions + +Prices are USD per million tokens (input / output) from the live snapshot. "Tools" means `tools` appears in `supported_parameters`. + +| Alias | OpenRouter ID | Price in / out | Tools | +|-------|---------------|----------------|-------| +| `gpt-6.2-sol` | `openai/gpt-6.2-sol` | $2 / $10 | yes | +| `gemini-4-hydrogen` | `google/gemini-4-hydrogen` | $1.50 / $7.50 | yes | +| `gemini-4-neon` | `google/gemini-4-neon` | $3 / $15 | yes | +| `qwen4-max` | `qwen/qwen4-max` | $1.425 / $4.275 | yes | +| `qwen4-35b-a3b` | `qwen/qwen4-35b-a3b` | $0.06 / $0.36 | yes | +| `minimax-m4` | `minimax/minimax-m4` | $0.80 / $3.10 | yes | +| `glm-5.4` | `z-ai/glm-5.4` | $1.40 / $4.40 | yes | +| `step-5` | `stepfun/step-5` | $1 / $2.70 | yes | +| `solar-mini-4.5` | `upstage/solar-mini-4-5` | $0.01 / $0.04 | yes | +| `hy4-flash` | `tencent/hy4-flash` | $0.07 / $0.281 | yes | +| `ergo-1.0` | `amazon/ergo-1.0` | $1 / $3 | yes | +| `inkling-2-mini` | `thinkingmachines/inkling-2-mini` | $0.06 / $0.24 | yes | +| `flint-v1.1-free` | `recursive/flint-v1.1:free` | $0 / $0 | yes | +| `ernie-5.5-flash-free` | `baidu/ernie-5.5-flash-preview:free` | $0 / $0 | yes | + +The LiteLLM-facing values in `ModelConfig.openrouter_models` prepend `openrouter/` to these provider IDs. + +## Exclusion rule + +To keep provider cost and routing predictable, new aliases exclude: + +1. `-pro` variants (for example `openai/gpt-6.2-sol-pro`, `openai/gpt-6.2-astra-pro`). +2. `:batch` variants (for example `openai/gpt-6.2-sol:batch`, `google/gemini-4-neon:batch`). +3. Floating `~...-latest` router aliases (for example `~openai/gpt-sol-latest`, `~google/gemini-neon-latest`, `~anthropic/claude-opus-latest`), because their target changes without a repo change. +4. New premium tiers priced above $15 per million output tokens: + - `openai/gpt-6.2-astra` — $8 / $40 + - `google/gemini-4-carbon` — $4 / $20 + +`tests/test_model_catalog.py` enforces the excluded aliases and asserts that no configured value contains `:batch` or `~`. + +The rule applies to new additions. Existing aliases that predate it were kept unchanged, even where their live output price is above $15/M: `claude-opus-4.8` (default and fallback, $25), `claude-opus-4.5` ($25), `claude-opus-4.1` ($75), `gpt-chat-latest` ($30), `gpt-5.2-pro` ($168), `gemini-4-argon` ($20). Pruning them is follow-up work for the operator to decide. + +## Static CLI catalog + +- `science`: `step-5-preview` was replaced by `step-5`. +- `research`: added `gpt-6.2-sol`. +- `news`: added `gemini-4-hydrogen`. + +Every static CLI entry still resolves through `settings.model.openrouter_models`; the parity test enforces this. + +## ModelManager + +`agentic_internet/agents/multi_model/model_manager.py` referenced none of the 7 removed IDs, so it is unchanged. Explicit aliases, including the new ones, resolve exactly through the central catalog. + +## Verification commands + +```bash +uv run --frozen ruff check agentic_internet tests +uv run --frozen ruff format --check agentic_internet tests +uv run --frozen mypy agentic_internet +uv run --frozen pytest -q +python3 .opencode/tools/golden_principles.py +uv lock --check +OPENROUTER_LIVE_TESTS=1 uv run --frozen pytest -q -m integration tests/test_openrouter_models.py +uv run --frozen agentic-internet models +``` + +Known issue, not fixed in this refresh: `agentic-internet models --list` prints nothing (exit code 0), and the same happens on `master`. The `--list` option defaults to `True` and has no off switch, so Typer/Click treats passing `--list` as setting it to `False`. Run `agentic-internet models` without the flag to see the static catalog. diff --git a/tests/test_model_catalog.py b/tests/test_model_catalog.py index f32b8ad..fb4e94d 100644 --- a/tests/test_model_catalog.py +++ b/tests/test_model_catalog.py @@ -27,9 +27,9 @@ def test_curated_recent_aliases_are_configured(): "glm-5.3-prime", "mistral-large-4", "minimax-m3.1-flash", - "step-5-preview", + "step-5", "command-a-plus", - "solar-mini4", + "solar-mini-4.5", "perceptron-mk1.5", "lfm-3-1.7b", "lfm-3-1.7b-free", @@ -38,15 +38,87 @@ def test_curated_recent_aliases_are_configured(): "particle-1", "openrouter-auto", "openrouter-auto-code", + # 2026-12-05 snapshot additions + "gpt-6.2-sol", + "gemini-4-hydrogen", + "gemini-4-neon", + "qwen4-max", + "qwen4-35b-a3b", + "minimax-m4", + "glm-5.4", + "hy4-flash", + "ergo-1.0", + "inkling-2-mini", + "flint-v1.1-free", + "ernie-5.5-flash-free", + } + missing = recent - settings.model.openrouter_models.keys() + assert not missing, f"Curated aliases missing: {sorted(missing)}" + + +def test_2026_12_05_additions_map_to_exact_ids(): + expected = { + "gpt-6.2-sol": "openrouter/openai/gpt-6.2-sol", + "gemini-4-hydrogen": "openrouter/google/gemini-4-hydrogen", + "gemini-4-neon": "openrouter/google/gemini-4-neon", + "qwen4-max": "openrouter/qwen/qwen4-max", + "qwen4-35b-a3b": "openrouter/qwen/qwen4-35b-a3b", + "minimax-m4": "openrouter/minimax/minimax-m4", + "glm-5.4": "openrouter/z-ai/glm-5.4", + "step-5": "openrouter/stepfun/step-5", + "solar-mini-4.5": "openrouter/upstage/solar-mini-4-5", + "hy4-flash": "openrouter/tencent/hy4-flash", + "ergo-1.0": "openrouter/amazon/ergo-1.0", + "inkling-2-mini": "openrouter/thinkingmachines/inkling-2-mini", + "flint-v1.1-free": "openrouter/recursive/flint-v1.1:free", + "ernie-5.5-flash-free": "openrouter/baidu/ernie-5.5-flash-preview:free", + } + configured = settings.model.openrouter_models + for alias, model_id in expected.items(): + assert configured.get(alias) == model_id, f"{alias} should map to {model_id}" + + +def test_stale_aliases_absent_from_2026_12_05_snapshot_are_removed(): + stale = { + "gemini-2.5-pro", + "gemini-2.5-flash", + "grok-build-0.1", + "mistral-medium-3.1", + "kimi-k2", + "step-5-preview", + "solar-mini4", } - assert recent <= settings.model.openrouter_models.keys() + configured = settings.model.openrouter_models + present = stale & configured.keys() + assert not present, f"Stale aliases still configured: {sorted(present)}" -def test_pro_variants_are_not_configured(): +def test_pro_and_premium_variants_are_not_configured(): configured = settings.model.openrouter_models - assert "gpt-6.1-terra-pro" not in configured - assert "gpt-6.1-sol-pro" not in configured - assert "gpt-6-luna-pro" not in configured + excluded = { + "gpt-6.1-terra-pro", + "gpt-6.1-sol-pro", + "gpt-6-luna-pro", + "gpt-6.2-sol-pro", + "gpt-6.2-astra-pro", + "gpt-6.2-astra", + "gemini-4-carbon", + } + present = excluded & configured.keys() + assert not present, f"Excluded Pro/premium aliases configured: {sorted(present)}" + excluded_ids = { + "openrouter/openai/gpt-6.2-sol-pro", + "openrouter/openai/gpt-6.2-astra-pro", + "openrouter/openai/gpt-6.2-astra", + "openrouter/google/gemini-4-carbon", + } + assert not excluded_ids & set(configured.values()) + + +def test_batch_and_floating_router_aliases_are_not_configured(): + for alias, model_id in settings.model.openrouter_models.items(): + assert ":batch" not in model_id, f"{alias} uses a :batch variant" + assert "~" not in model_id, f"{alias} uses a floating ~...-latest router alias" def test_default_and_fallback_remain_in_central_catalog(): diff --git a/tests/test_model_manager.py b/tests/test_model_manager.py index e42234e..f79c4b6 100644 --- a/tests/test_model_manager.py +++ b/tests/test_model_manager.py @@ -10,7 +10,9 @@ from agentic_internet.config.settings import settings -@pytest.mark.parametrize("alias", ["claude-opus-4.8", "o3", "gpt-6.1-terra", "lfm-3-1.7b-free"]) +@pytest.mark.parametrize( + "alias", ["claude-opus-4.8", "o3", "gpt-6.1-terra", "lfm-3-1.7b-free", "gpt-6.2-sol", "step-5"] +) def test_model_manager_resolves_central_alias_exactly(alias): expected_model_id = settings.model.openrouter_models[alias]