From 5738b1bd996ec706376807fd5506229508bc7664 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Thu, 11 Dec 2025 10:31:51 +0800 Subject: [PATCH] rm hardcoded excluded models --- routstr/payment/models.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/routstr/payment/models.py b/routstr/payment/models.py index f0c57772..a7bc5cf5 100644 --- a/routstr/payment/models.py +++ b/routstr/payment/models.py @@ -2,7 +2,6 @@ import asyncio import json import random from pathlib import Path -from typing import Final from urllib.request import urlopen import httpx @@ -20,15 +19,6 @@ logger = get_logger(__name__) models_router = APIRouter() -DEFAULT_EXCLUDED_MODEL_IDS: Final[set[str]] = { - "openrouter/auto", - "openrouter/bodybuilder", - "google/gemini-2.5-pro-exp-03-25", - "opengvlab/internvl3-78b", - "openrouter/sonoma-dusk-alpha", - "openrouter/sonoma-sky-alpha", -} - class Architecture(BaseModel): modality: str @@ -120,10 +110,7 @@ def fetch_openrouter_models(source_filter: str | None = None) -> list[dict]: model["id"] = model_id[len(source_prefix) :] model_id = model["id"] - if ( - "(free)" in model.get("name", "") - or model_id in DEFAULT_EXCLUDED_MODEL_IDS - ): + if "(free)" in model.get("name", ""): continue if not _has_valid_pricing(model): @@ -160,10 +147,7 @@ async def async_fetch_openrouter_models(source_filter: str | None = None) -> lis model["id"] = model_id[len(source_prefix) :] model_id = model["id"] - if ( - "(free)" in model.get("name", "") - or model_id in DEFAULT_EXCLUDED_MODEL_IDS - ): + if "(free)" in model.get("name", ""): continue if not _has_valid_pricing(model):