From 15e61d17602c45ee2552d3c8cbf702bf1d5e2ecf Mon Sep 17 00:00:00 2001 From: Shroominic Date: Mon, 8 Sep 2025 10:53:02 +0100 Subject: [PATCH] refactor(proxy): use settings for upstream base; integrate new pricing flow and header prep --- routstr/proxy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routstr/proxy.py b/routstr/proxy.py index 715cfd0b..c9b939e1 100644 --- a/routstr/proxy.py +++ b/routstr/proxy.py @@ -15,8 +15,8 @@ from .auth import ( ) from .core import get_logger from .core.db import ApiKey, AsyncSession, create_session, get_session +from .core.settings import settings from .payment.helpers import ( - UPSTREAM_BASE_URL, check_token_balance, create_error_response, get_max_cost_for_model, @@ -307,7 +307,7 @@ async def forward_to_upstream( if path.startswith("v1/"): path = path.replace("v1/", "") - url = f"{UPSTREAM_BASE_URL}/{path}" + url = f"{settings.upstream_base_url}/{path}" logger.info( "Forwarding request to upstream", @@ -756,7 +756,7 @@ async def forward_get_to_upstream( if path.startswith("v1/"): path = path.replace("v1/", "") - url = f"{UPSTREAM_BASE_URL}/{path}" + url = f"{settings.upstream_base_url}/{path}" logger.info( "Forwarding GET request to upstream",