From 1a7dd550ecc47e090871f0632b243a97a420e9bd Mon Sep 17 00:00:00 2001 From: Tudorel Oprisan Date: Tue, 9 Jun 2026 18:05:10 +0100 Subject: [PATCH] added debug --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index ef9e5d1..f7aa7f0 100644 --- a/main.py +++ b/main.py @@ -12,8 +12,8 @@ app = FastAPI() # Configuration from environment variables # We use removesuffix to ensure we have the base URL without the /v1 part, # as the incoming path already includes 'v1/...' (e.g. /v1/chat/completions) -MAIN_PC_BASE = os.getenv("MAIN_PC_URL", "http://10.0.4.x:8080/v1").removesuffix("/v1") -LOCAL_SLM_BASE = os.getenv("LOCAL_SLM_URL", "http://llama-slm:8080/v1").removesuffix("/v1") +MAIN_PC_BASE = os.getenv("MAIN_PC_URL", "http://10.0.4.11:8080/v1").removesuffix("/v1") +LOCAL_SLM_BASE = os.getenv("LOCAL_SLM_URL", "http://10.0.4.200:8080/v1").removesuffix("/v1") OPENAI_BASE = "https://api.openai.com" OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "") @@ -60,6 +60,7 @@ async def proxy( if not target_url: return Response(content="No valid target available (Main PC offline, SLM unavailable, and no OpenAI key)", status_code=503) + print(f"Routing {path} -> {target_url}") # Prepare request for proxying body = await request.body() headers = dict(request.headers)