diff --git a/agent.py b/agent.py index 43edf47..1d9c33f 100644 --- a/agent.py +++ b/agent.py @@ -344,7 +344,7 @@ def _build_comparison_result(comparison_id: str, quotes: list[QuoteInput], weigh } ) - rows.sort(key=lambda row: (-row["scores"]["weighted_total"], row["total_price"], row["delivery_days"], row["vendor"].lower())) + rows.sort(key=_quote_sort_key) winner = rows[0] recommendation = { "vendor": winner["vendor"],