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} "