From e543fe1bc4fc99d8d9800d9ccde003f2f8db3a16 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Sun, 23 Nov 2025 13:10:40 -0800 Subject: [PATCH] fix provider getattr --- routstr/algorithm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routstr/algorithm.py b/routstr/algorithm.py index efd2a566..ccdc7088 100644 --- a/routstr/algorithm.py +++ b/routstr/algorithm.py @@ -153,9 +153,9 @@ def should_prefer_model( # Log provider changes when candidate wins if should_replace: candidate_provider_name = getattr( - candidate_provider, "upstream_name", "unknown" + candidate_provider, "provider_type", "unknown" ) - current_provider_name = getattr(current_provider, "upstream_name", "unknown") + current_provider_name = getattr(current_provider, "provider_type", "unknown") logger.debug( f"Model selection for alias '{alias}': choosing {candidate_provider_name} " f"(cost: ${candidate_adjusted:.6f}) over {current_provider_name} "