diff --git a/app/llm/base.py b/app/llm/base.py index 218be65e..f70cb0c3 100644 --- a/app/llm/base.py +++ b/app/llm/base.py @@ -21,7 +21,7 @@ class ProviderConfig(BaseModel): api_key: Optional[str] = None base_url: Optional[str] = None - model: str = "gpt-4o" + model: str = "openai/gpt-oss-20b" temperature: float = 0.7 max_tokens: int = 2048 timeout: float = 30.0 diff --git a/app/llm/openrouter_models.py b/app/llm/openrouter_models.py new file mode 100644 index 00000000..056e71d1 --- /dev/null +++ b/app/llm/openrouter_models.py @@ -0,0 +1,60 @@ +"""Exact model ids from OpenRouter's 2026-10-19 retirement notice. + +This policy applies only to OpenRouter requests, including BYOK. It says +nothing about the availability of a model on a direct OpenAI endpoint. +""" + +from __future__ import annotations + +from datetime import date +import logging +from urllib.parse import urlparse + +RETIREMENT_DATE = date(2027, 1, 14) +RETIRING_MODEL_IDS = frozenset( + { + "openai/gpt-4o", + "openai/gpt-4o-2024-05-13", + "openai/gpt-4o-2024-08-06", + "openai/gpt-4o-2024-11-20", + "openai/gpt-4o-mini", + "openai/gpt-4o-mini-2024-07-18", + "openai/gpt-4.1", + "openai/gpt-4.1-mini", + } +) +# Only known legacy spellings; never guess arbitrary model families or suffixes. +_RETIRING_SHORT_IDS = {model.removeprefix("openai/"): model for model in RETIRING_MODEL_IDS} + + +def is_openrouter_url(base_url: str) -> bool: + return urlparse(str(base_url)).hostname == "openrouter.ai" + + +def retiring_model_id(model: str) -> str | None: + model = (model or "").strip() + canonical = _RETIRING_SHORT_IDS.get(model, model) + return canonical if canonical in RETIRING_MODEL_IDS else None + + +def retirement_warning(model: str) -> str | None: + canonical = retiring_model_id(model) + if canonical is None: + return None + return ( + f"OpenRouter model '{canonical}' retires on {RETIREMENT_DATE.isoformat()}, including BYOK. " + "Choose a supported model explicitly (for example openai/gpt-oss-20b); " + "old cost estimates retain the original model's rates." + ) + + +def prepare_openrouter_model(model: str, *, today: date | None = None) -> str: + """Keep explicit legacy choices until retirement; never silently switch a paid model.""" + canonical = retiring_model_id(model) + if canonical is None: + return model + warning = retirement_warning(model) + if (today or date.today()) >= RETIREMENT_DATE: + raise ValueError(warning) + logging.getLogger(__name__).warning(warning) + return canonical diff --git a/app/llm/providers.py b/app/llm/providers.py index 96458fc7..37d22fec 100644 --- a/app/llm/providers.py +++ b/app/llm/providers.py @@ -5,6 +5,7 @@ from typing import Optional from .base import LLMProvider, LLMResponse +from .openrouter_models import is_openrouter_url, prepare_openrouter_model class MockProvider(LLMProvider): @@ -128,6 +129,12 @@ def generate(self, prompt: str, system_prompt: Optional[str] = None, **kwargs) - "max_tokens": kwargs.get("max_tokens", self.config.max_tokens), } + if is_openrouter_url(base_url): + try: + payload["model"] = prepare_openrouter_model(payload["model"]) + except ValueError as exc: + return LLMResponse(content=f"Error: {exc}", latency_ms=0) + start = time.time() try: resp = self.client.post(url, json=payload, headers=headers, timeout=self.config.timeout) diff --git a/app/llm_engine/client.py b/app/llm_engine/client.py index fa6d04cc..83c0b207 100644 --- a/app/llm_engine/client.py +++ b/app/llm_engine/client.py @@ -18,6 +18,7 @@ from .schemas import WorkerResponse, QualityReport, LLMFixResponse from .skill_output_fidelity import build_output_fidelity_guidance from app.heuristics.security import scan_text +from app.llm.openrouter_models import is_openrouter_url, prepare_openrouter_model OPENROUTER_DEFAULT_MODEL = "openai/gpt-oss-20b" OPENROUTER_DEFAULT_BASE_URL = "https://openrouter.ai/api/v1" @@ -426,6 +427,8 @@ def _call_api( "temperature": 0.2, # Low temp for deterministic structure "max_tokens": max_tokens, } + if is_openrouter_url(self.base_url): + kwargs["model"] = prepare_openrouter_model(kwargs["model"]) if request_timeout_seconds is not None: kwargs["timeout"] = request_timeout_seconds if reasoning_effort and self._supports_swarm_reasoning_control(kwargs["model"]): diff --git a/app/optimizer/estimator.py b/app/optimizer/estimator.py index 16d65e9a..6394fe95 100644 --- a/app/optimizer/estimator.py +++ b/app/optimizer/estimator.py @@ -14,6 +14,7 @@ get_model_metadata, ) from .models import OptimizationConfig +from app.llm.openrouter_models import retirement_warning # Pricing per 1M tokens (USD), sourced from the reviewed OpenRouter snapshot. # Keep the public mapping for older callers, but do not add a fake default rate: @@ -49,6 +50,7 @@ def estimate_run_cost(config: OptimizationConfig, initial_prompt: str) -> Dict[s Dict containing 'min_cost', 'max_cost', and a formatted 'message'. """ model_name = (config.model or "").strip() + warning = retirement_warning(model_name) metadata = get_model_metadata(model_name) pricing = MODEL_PRICING.get(canonical_model_id(model_name)) @@ -113,6 +115,7 @@ def estimate_run_cost(config: OptimizationConfig, initial_prompt: str) -> Dict[s # 5. Cost Calculation. A missing rate is a real unknown, not a free call. if pricing is None or metadata is None: return { + "warnings": [warning] if warning else [], "min_cost": None, "max_cost": None, "message": ( @@ -146,7 +149,11 @@ def estimate_run_cost(config: OptimizationConfig, initial_prompt: str) -> Dict[s f"({config.model}, {total_llm_calls} calls, ~{int(final_input_tokens + final_output_tokens)} tokens)" ) + if warning: + msg += "\n" + warning + return { + "warnings": [warning] if warning else [], "min_cost": round(min_cost, 4), "max_cost": round(max_cost, 4), "message": msg, diff --git a/app/optimizer/language_costs.py b/app/optimizer/language_costs.py index 8200ff71..54b53735 100644 --- a/app/optimizer/language_costs.py +++ b/app/optimizer/language_costs.py @@ -11,6 +11,7 @@ get_model_metadata, ) from app.text_utils import estimate_tokens +from app.llm.openrouter_models import retirement_warning try: import tiktoken @@ -211,6 +212,9 @@ def estimate_prompt_cost( pricing_known = metadata is not None and not warnings pricing_source = OPENROUTER_MODELS_URL if pricing_known else None pricing_verified_at = metadata.verified_at if metadata else None + warning = retirement_warning(resolved_model) + if warning: + warnings.append(warning) if metadata is None: tokenizer_name = None else: diff --git a/app/optimizer/model_catalog.py b/app/optimizer/model_catalog.py index dac2e81b..ca95da41 100644 --- a/app/optimizer/model_catalog.py +++ b/app/optimizer/model_catalog.py @@ -42,8 +42,9 @@ class OpenRouterModel: name="OpenAI: gpt-oss-20b", tokenizer="GPT", context_length=131_072, - input_rate_per_million=0.03, - output_rate_per_million=0.13, + input_rate_per_million=0.018, + output_rate_per_million=0.09, + verified_at="2026-10-21", ), "openai/gpt-oss-120b": OpenRouterModel( id="openai/gpt-oss-120b", @@ -109,8 +110,8 @@ class OpenRouterModel: input_rate_per_million=0.30, output_rate_per_million=2.50, ), - # These legacy aliases are still live OpenRouter ids and keep the - # evolutionary optimizer's existing configurations usable. + # Historical pricing compatibility: these ids retire on 2027-01-14. + # Keep their own prices for saved runs; never alias them to a replacement. "openai/gpt-4o": OpenRouterModel( id="openai/gpt-4o", name="OpenAI: GPT-4o", diff --git a/app/optimizer/models.py b/app/optimizer/models.py index eb135071..1aeede58 100644 --- a/app/optimizer/models.py +++ b/app/optimizer/models.py @@ -11,7 +11,7 @@ class OptimizationConfig(BaseModel): max_generations: int = 3 candidates_per_generation: int = 3 target_score: float = 1.0 # Stop if this score is reached - model: str = "gpt-4o" # Model used for the Mutation Agent + model: str = "openai/gpt-oss-20b" # Model used for the Mutation Agent custom_system_prompt: Optional[str] = None interactive_every: int = 0 # Pause for human input every N generations (0 = never) adversarial_every: int = 0 # Run adversarial generation every N generations (0 = never) diff --git a/cli/commands/optimize.py b/cli/commands/optimize.py index 32a93849..7f79ff76 100644 --- a/cli/commands/optimize.py +++ b/cli/commands/optimize.py @@ -41,7 +41,7 @@ def optimize_run( "mock", "--provider", "-p", help="LLM provider: openai, ollama, or mock" ), model: Optional[str] = typer.Option( - None, "--model", "-m", help="Model identifier (e.g., gpt-4o, llama3)" + None, "--model", "-m", help="Model identifier (e.g., openai/gpt-oss-20b, llama3)" ), interactive_every: int = typer.Option( 0, "--interactive-every", "-i", help="Pause every N generations for human input (0 = never)" @@ -202,7 +202,7 @@ def optimize_resume( "mock", "--provider", "-p", help="LLM provider: openai, ollama, or mock" ), model: Optional[str] = typer.Option( - None, "--model", "-m", help="Model identifier (e.g., gpt-4o, llama3)" + None, "--model", "-m", help="Model identifier (e.g., openai/gpt-oss-20b, llama3)" ), ): """ diff --git a/docs/qa/2026-10-21-openrouter-retirement.md b/docs/qa/2026-10-21-openrouter-retirement.md new file mode 100644 index 00000000..caed22df --- /dev/null +++ b/docs/qa/2026-10-21-openrouter-retirement.md @@ -0,0 +1,62 @@ +# OpenRouter retirement audit — 21 October 2026 + +Base inspected: `996efc59085cefd131ffaa2b3d62efb276211133` (`main`). Open PRs were checked; none covered this migration. No production traffic or deployed environment settings were inspected. + +## Dependency classification + +| Surface | Evidence / behavior | Change | +| --- | --- | --- | +| `app/llm_engine/client.py` / `WorkerClient._call_api` | Actual SDK request path for cloud product features; default `openai/gpt-oss-20b`, configurable via env/model override | Preserve default; apply retirement policy to the effective request model only when destination hostname is `openrouter.ai` | +| `app/llm/base.py` / `ProviderConfig` | Generic provider configuration had bare `gpt-4o` default | Align new configurations with existing OpenRouter default `openai/gpt-oss-20b` | +| `app/llm/providers.py` / `OpenAIProvider` | Class name means OpenAI-compatible HTTP, but default endpoint/key are OpenRouter | Normalize exact known retiring short ids; warn before deadline; return actionable error without posting at/after deadline | +| `app/llm/factory.py` | Already defaults its OpenAI-compatible cloud configuration to GPT-OSS-20B | Preserve env/config overrides | +| `app/optimizer/models.py` / `OptimizationConfig` | `gpt-4o` default influences estimates and persisted run metadata, not necessarily the provider actually executing mutations | Set new configuration default to GPT-OSS-20B; deserialize existing explicit values unchanged | +| `app/optimizer/model_catalog.py` | Reviewed price/tokenizer snapshot, not a list of executed calls or a runtime model selector | Keep GPT-4o and mini rows and aliases for saved estimates; mark compatibility comment; refresh only GPT-OSS-20B price/date | +| `language_costs.py`, `estimator.py`, `costs.py` | Prompt/run estimates and accumulated estimated cost | Add retirement warnings to user-facing estimates; retain original legacy-model prices, never replacement prices | +| `web/app/benchmark/models.json` | Frontend model metadata snapshot; current defaults already GPT-OSS-20B | Match refreshed GPT-OSS-20B backend rates and verification date | +| Tests using GPT-4o strings | Offline fixtures for historical pricing, persistence, reporting and validation | Keep compatibility fixtures; add exact retirement/date/host-scope tests | +| `examples/openai_pipe.py` | Optional direct `OpenAI()` example, using `OPENAI_API_KEY`; not the default OpenRouter integration | Leave unchanged. This notice is not sufficient evidence to change a direct OpenAI integration. | +| CLI `--model` help | Suggested an obsolete GPT-4o identifier | Replace example with the supported cloud default | + +All eight exact ids in the OpenRouter 19 October notice are recognized, together with their exact unqualified legacy spellings. The notification includes dated GPT-4o snapshots and OpenRouter BYOK. No family-prefix migration is used. This change does not establish that direct OpenAI requests retire on the same date. + +## Compatibility policy + +- New defaults use `openai/gpt-oss-20b`, matching current cloud behavior rather than introducing another model family. +- Existing explicit choices are not silently switched. Before 14 January 2027, a retiring short spelling is sent as its original provider-qualified id with a warning. At/after the deadline the request is rejected locally with a supported-model instruction, without spending an API call. +- Only the exact destination hostname `openrouter.ai` receives this policy. Explicit direct OpenAI or other compatible endpoints retain their supplied model ids. Proxy/custom domains cannot be identified reliably as OpenRouter and remain the operator's responsibility. +- Saved runs deserialize their original `model` strings unchanged. Legacy `gpt-4o` / `gpt-4o-mini` price aliases still describe those models, not a substituted model. Dated variants without a reviewed price remain unknown; no guessed price is added. +- Prompt and evolutionary-run estimates now warn about retirement. Estimates for old models can still be used as historical estimates after the deadline; this is not an availability claim. + +## Models and costs + +The Models API was retrieved on 21 October 2026. GPT-OSS-20B's base text rates were $0.018 input / $0.09 output per million tokens, replacing the September snapshot's $0.03 / $0.13 in both backend and frontend records. Other catalog records retain their own September verification dates; they have not been relabeled as current. + +Candidate alternatives (USD per million input / output tokens): + +| Model | Rates | Relevant compatibility | +| --- | --- | --- | +| `openai/gpt-oss-20b` | $0.018 / $0.09 | Existing default; JSON response format and current request behavior already supported. Lowest-change choice for Compiler. | +| `openai/gpt-6-luna` | $0.10 / $0.50 | Text/JSON/structured outputs; no temperature; optional reasoning supports `none`. Suitable candidate for bounded JSON tasks only after adapting Compiler's sampling parameters and testing outputs. Not substituted here. | +| `openai/gpt-5.6-luna` | $0.20 / $1.20 | Existing catalog/benchmark option; no temperature, optional reasoning. Its existing selection is preserved, but no new claim that all current Compiler requests are compatible is made. | +| `google/gemini-2.5-flash-lite` | $0.10 / $0.40 | JSON/structured outputs and temperature supported. Different model/provider behavior needs task-specific evaluation before changing defaults. | + +Luna's catalog includes increased pricing above 272,000 prompt tokens; cached input and service tiers also vary. The existing static price estimator does not model all routing, long-context tiers or reasoning usage. Provider-reported usage/cost remains separate. Adding more flat-price aliases would hide this limitation, so no new Luna pricing entry or automatic migration was introduced. + +Sources: [Models API](https://openrouter.ai/api/v1/models), [GPT-OSS-20B](https://openrouter.ai/openai/gpt-oss-20b), [GPT-6 Luna](https://openrouter.ai/openai/gpt-6-luna), [Luna endpoints](https://openrouter.ai/api/v1/models/openai/gpt-6-luna/endpoints), [GPT-5.6 Luna](https://openrouter.ai/openai/gpt-5.6-luna), [Gemini Flash Lite](https://openrouter.ai/google/gemini-2.5-flash-lite). + +## Pre-existing limits kept out of this patch + +`cli/commands/optimize.py` passes its model string as the factory's `config` positional argument. `get_provider` expects `ProviderConfig`, so an explicit CLI `--model` may fail initialization and fall back to mock; run-cost metadata can also differ from the provider's effective env-selected model. Resume reloads saved configuration. This is not fixed by changing a default and needs a separate focused CLI configuration/reporting change. No successful live CLI model migration is claimed. + +No API key was available, so paid completions, JSON-output quality and production usage are unverified. The PR remains draft. Reviewers should explicitly replace retiring deployment/env selections before the deadline, then run an authenticated compile/optimize smoke check. No merge or deployment was performed. + +## Validation + +- `python -m pytest tests/ -q`: **2,758 passed, 5 skipped**, 30 existing collection/deprecation warnings; 152.56 seconds. Live provider tests are opt-in and were skipped. +- Focused provider/catalog/estimator suite: **114 passed, 5 skipped**. Additional retirement/evolution/report/API subset: **46 passed**. Final new retirement test file: **20 passed**. These overlap with the full suite and are not additional unique tests. +- `npm run test -- --run app/benchmark/page.test.tsx app/__tests__/optimizer-page.test.tsx`: **21 passed**, 2 test files. +- `npm run build`: passed, including TypeScript checks and static generation. +- Ruff checks on all changed Python files and `git diff --check`: passed. +- The first backend run failed because the environment's SOCKS proxy required `socksio`; installing it in the isolated test environment resolved those failures. No dependency manifest was changed for this environment-specific package. +- No authenticated upstream completion or production end-to-end check was run. diff --git a/tests/optimizer/test_language_costs.py b/tests/optimizer/test_language_costs.py index ea357434..b800ca90 100644 --- a/tests/optimizer/test_language_costs.py +++ b/tests/optimizer/test_language_costs.py @@ -26,11 +26,11 @@ def test_turkish_prompt_can_cost_more_tokens_than_english_equivalent(): def test_default_openrouter_gpt_oss_20b_pricing_is_applied(): estimate = estimate_prompt_cost("hello world", token_count_override=1_000_000) - assert estimate.input_rate_per_million == pytest.approx(0.03) - assert estimate.output_rate_per_million == pytest.approx(0.13) - assert estimate.estimated_cost_usd == pytest.approx(0.03) + assert estimate.input_rate_per_million == pytest.approx(0.018) + assert estimate.output_rate_per_million == pytest.approx(0.09) + assert estimate.estimated_cost_usd == pytest.approx(0.018) assert estimate.pricing_known is True - assert estimate.pricing_verified_at == "2026-09-12" + assert estimate.pricing_verified_at == "2026-10-21" def test_gemini_flash_lite_pricing_is_applied(): diff --git a/tests/test_llm_providers.py b/tests/test_llm_providers.py index 64973c69..03fcdd5e 100644 --- a/tests/test_llm_providers.py +++ b/tests/test_llm_providers.py @@ -12,7 +12,7 @@ class TestProviderConfig: def test_default_values(self): config = ProviderConfig() - assert config.model == "gpt-4o" + assert config.model == "openai/gpt-oss-20b" assert config.temperature == 0.7 assert config.max_tokens == 2048 diff --git a/tests/test_openrouter_retirement.py b/tests/test_openrouter_retirement.py new file mode 100644 index 00000000..b98109af --- /dev/null +++ b/tests/test_openrouter_retirement.py @@ -0,0 +1,138 @@ +"""Offline migration checks; all provider/SDK calls are mocked.""" + +from datetime import date +from unittest.mock import MagicMock, patch + +import pytest + +from app.llm.base import ProviderConfig +from app.llm.openrouter_models import ( + RETIRING_MODEL_IDS, + is_openrouter_url, + prepare_openrouter_model, + retirement_warning, +) +from app.llm.providers import OpenAIProvider +from app.llm_engine.client import WorkerClient +from app.optimizer.models import OptimizationConfig, OptimizationRun +from app.optimizer.language_costs import estimate_prompt_cost +from app.optimizer.estimator import estimate_run_cost +from app.optimizer.costs import PricingModel + + +@pytest.mark.parametrize("model", sorted(RETIRING_MODEL_IDS)) +def test_exact_ids_and_legacy_short_forms_warn_before_retirement(model, caplog): + for spelling in [model, model.removeprefix("openai/")]: + assert prepare_openrouter_model(spelling, today=date(2027, 1, 13)) == model + assert "2027-01-14" in caplog.text + assert "BYOK" in caplog.text + assert "secret" not in caplog.text + for day in [date(2027, 1, 14), date(2027, 1, 15)]: + with pytest.raises(ValueError, match="Choose a supported model explicitly"): + prepare_openrouter_model(spelling, today=day) + + +@pytest.mark.parametrize("model", ["openai/gpt-oss-20b", "custom/model", "openai/gpt-4o-custom"]) +def test_other_choices_are_preserved(model): + assert prepare_openrouter_model(model, today=date(2028, 1, 1)) == model + assert retirement_warning(model) is None + + +def test_old_saved_runs_and_prices_remain_readable_without_becoming_replacement_prices(): + for spelling in ["gpt-4o-mini", "openai/gpt-4o-mini"]: + run = OptimizationRun.model_validate({"config": {"model": spelling}, "generations": []}) + assert run.config.model == spelling + estimate = estimate_prompt_cost("hello", model=spelling, token_count_override=1_000_000) + assert estimate.pricing_known is True + assert estimate.estimated_cost_usd == pytest.approx(0.15) + assert estimate.output_rate_per_million == pytest.approx(0.60) + assert "2027-01-14" in estimate.warnings[0] + assert PricingModel.get_rate(spelling) == (0.15, 0.60) + run_estimate = estimate_run_cost(run.config, "hello") + assert run_estimate["cost_estimate_available"] is True + assert "2027-01-14" in run_estimate["message"] + # Dated variants have no reviewed pricing record: never borrow the alias rate. + estimate = estimate_prompt_cost("hello", model="openai/gpt-4o-2024-05-13") + assert estimate.pricing_known is False + assert any("2027-01-14" in warning for warning in estimate.warnings) + assert PricingModel.get_rate("openai/gpt-4o-2024-05-13") == (0.0, 0.0) + + +def test_defaults_match_existing_cloud_default(): + assert ProviderConfig().model == OptimizationConfig().model == "openai/gpt-oss-20b" + + +@pytest.mark.parametrize( + "base_url,is_router", + [ + ("https://openrouter.ai/api/v1", True), + ("https://api.openai.com/v1", False), + ("https://openrouter.ai.example.com/v1", False), + ("https://example.com/openrouter.ai/v1", False), + ], +) +def test_provider_policy_is_scoped_to_openrouter_host(base_url, is_router): + assert is_openrouter_url(base_url) is is_router + provider = OpenAIProvider(ProviderConfig(api_key="fake", base_url=base_url, model="gpt-4o")) + reply = MagicMock() + reply.json.return_value = {"choices": [{"message": {"content": "ok"}}]} + try: + with patch( + "app.llm.providers.prepare_openrouter_model", return_value="openai/gpt-4o" + ) as prepare: + with patch.object(provider.client, "post", return_value=reply) as post: + assert provider.generate("hello").content == "ok" + assert prepare.called is is_router + assert post.call_args.kwargs["json"]["model"] == ( + "openai/gpt-4o" if is_router else "gpt-4o" + ) + finally: + provider.close() + + +def test_retired_provider_request_has_actionable_error_and_never_posts(): + provider = OpenAIProvider(ProviderConfig(api_key="fake", model="gpt-4o")) + try: + with patch( + "app.llm.providers.prepare_openrouter_model", + side_effect=ValueError("Choose a supported model explicitly"), + ): + with patch.object(provider.client, "post") as post: + result = provider.generate("hello") + post.assert_not_called() + assert result.content == "Error: Choose a supported model explicitly" + finally: + provider.close() + + +@pytest.mark.parametrize( + "base_url,is_router", + [ + ("https://openrouter.ai/api/v1", True), + ("https://api.openai.com/v1", False), + ], +) +def test_worker_checks_effective_model_override_only_for_openrouter(base_url, is_router): + with patch("app.llm_engine.client.OpenAI") as sdk: + sdk.return_value.chat.completions.create.return_value = MagicMock( + choices=[MagicMock(message=MagicMock(content="{}"), finish_reason="stop")], + usage=None, + ) + worker = WorkerClient(api_key="fake", base_url=base_url, model="openai/gpt-oss-20b") + with patch( + "app.llm_engine.client.prepare_openrouter_model", return_value="openai/gpt-4o-mini" + ) as prepare: + worker._call_api([], model_override="gpt-4o-mini") + assert prepare.called is is_router + if is_router: + prepare.assert_called_once_with("gpt-4o-mini") + call = sdk.return_value.chat.completions.create.call_args.kwargs + assert call["model"] == ("openai/gpt-4o-mini" if is_router else "gpt-4o-mini") + if is_router: + sdk.return_value.chat.completions.create.reset_mock() + with patch( + "app.llm_engine.client.prepare_openrouter_model", side_effect=ValueError("retired") + ): + with pytest.raises(ValueError, match="retired"): + worker._call_api([]) + sdk.return_value.chat.completions.create.assert_not_called() diff --git a/web/app/benchmark/models.json b/web/app/benchmark/models.json index 76a83408..8bad9e04 100644 --- a/web/app/benchmark/models.json +++ b/web/app/benchmark/models.json @@ -50,9 +50,9 @@ "group": "Cheap", "tokenizer": "GPT", "contextLength": 131072, - "inputRatePerMillion": 0.03, - "outputRatePerMillion": 0.13, - "verifiedAt": "2026-09-12", + "inputRatePerMillion": 0.018, + "outputRatePerMillion": 0.09, + "verifiedAt": "2026-10-21", "sourceUrl": "https://openrouter.ai/api/v1/models" }, {