a2a-source-edit: write agent.py

This commit is contained in:
a2a-cloud
2026-07-18 04:49:52 +00:00
parent f4d5ef0c05
commit 69a1e58beb

View File

@@ -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"],