From fe66f249f00e562e868530fb4ba02400801eec27 Mon Sep 17 00:00:00 2001 From: GitHappens2Me Date: Tue, 11 Nov 2025 15:42:26 +0100 Subject: [PATCH 1/2] small fixes --- README.md | 2 +- routstr/auth.py | 2 +- routstr/core/settings.py | 2 +- routstr/payment/__init__.py | 2 +- routstr/payment/{cost_caculation.py => cost_calculation.py} | 0 routstr/upstreams/upstream.py | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename routstr/payment/{cost_caculation.py => cost_calculation.py} (100%) diff --git a/README.md b/README.md index 2d482dc1..a0834551 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ Once built, the UI is automatically served by the FastAPI backend: - **Dashboard**: `http://localhost:8000/` - **Login**: `http://localhost:8000/login` -- **Models Management**: `http://localhost:8000/model +- **Models Management**: `http://localhost:8000/model` - **Providers Management**: `http://localhost:8000/providers` - **Settings**: `http://localhost:8000/settings` diff --git a/routstr/auth.py b/routstr/auth.py index b1e16987..d5b8ed87 100644 --- a/routstr/auth.py +++ b/routstr/auth.py @@ -9,7 +9,7 @@ from sqlmodel import col, update from .core import get_logger from .core.db import ApiKey, AsyncSession from .core.settings import settings -from .payment.cost_caculation import ( +from .payment.cost_calculation import ( CostData, CostDataError, MaxCostData, diff --git a/routstr/core/settings.py b/routstr/core/settings.py index eb8e59a9..9f213a3f 100644 --- a/routstr/core/settings.py +++ b/routstr/core/settings.py @@ -114,7 +114,7 @@ def resolve_bootstrap() -> Settings: ) except Exception: pass - # Map COST_PER_1K_* -> CUSTOM_PER_1K_* + # Map COST_PER_1K_* -> FIXED_PER_1K_* if ( "COST_PER_1K_INPUT_TOKENS" in os.environ and "FIXED_PER_1K_INPUT_TOKENS" not in os.environ diff --git a/routstr/payment/__init__.py b/routstr/payment/__init__.py index 55f5a854..0ca1ed03 100644 --- a/routstr/payment/__init__.py +++ b/routstr/payment/__init__.py @@ -1,4 +1,4 @@ -from .cost_caculation import CostData, CostDataError, MaxCostData, calculate_cost +from .cost_calculation import CostData, CostDataError, MaxCostData, calculate_cost __all__ = [ "CostData", diff --git a/routstr/payment/cost_caculation.py b/routstr/payment/cost_calculation.py similarity index 100% rename from routstr/payment/cost_caculation.py rename to routstr/payment/cost_calculation.py diff --git a/routstr/upstreams/upstream.py b/routstr/upstreams/upstream.py index 9d3b1e35..638971dc 100644 --- a/routstr/upstreams/upstream.py +++ b/routstr/upstreams/upstream.py @@ -13,7 +13,7 @@ from fastapi.responses import Response, StreamingResponse from ..auth import adjust_payment_for_tokens from ..core import get_logger from ..core.db import ApiKey, AsyncSession, create_session -from ..payment.cost_caculation import ( +from ..payment.cost_calculation import ( CostData, CostDataError, MaxCostData, From dacabaa5d48d58cc312684e5bd988bc21c8771f7 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Fri, 21 Nov 2025 18:06:48 -0800 Subject: [PATCH 2/2] fix pytests --- routstr/upstream/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routstr/upstream/base.py b/routstr/upstream/base.py index 7af1be85..937f4d2a 100644 --- a/routstr/upstream/base.py +++ b/routstr/upstream/base.py @@ -18,7 +18,7 @@ from ..core.db import ApiKey, AsyncSession, create_session if TYPE_CHECKING: from ..core.db import UpstreamProviderRow -from ..payment.cost_caculation import ( +from ..payment.cost_calculation import ( CostData, CostDataError, MaxCostData,