Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the spend limit has been reached. To enable Bugbot Autofix, raise your spend limit in the Cursor dashboard.
| opportunities.sort( | ||
| key=lambda opportunity: ( | ||
| -opportunity.monthly_savings_estimate, | ||
| {"high": 2, "medium": 1, "low": 0}.get(opportunity.confidence, 0), |
There was a problem hiding this comment.
Confidence sort order is inverted, preferring low confidence
Medium Severity
The confidence tiebreaker in opportunities.sort() ranks low-confidence opportunities before high-confidence ones. The mapping {"high": 2, "medium": 1, "low": 0} is sorted ascending by default, so low (0) comes first. The value needs to be negated (like the savings field) so that high-confidence opportunities are preferred when monthly savings are equal. This can cause the [:limit] truncation to drop high-confidence opportunities in favor of low-confidence ones.


Summary
Testing
Note
Medium Risk
Adds new workflow/model scoring logic to the
cost-modelingbackend response and surfaces it in the FinOps UI; incorrect heuristics or missing facet/workflow data could yield misleading savings recommendations.Overview
Extends FinOps cost modeling to compute workflow-level model downshift opportunities by comparing per-archetype success rates and average session costs across models, returning a ranked list plus
total_model_choice_savings_monthlyinCostModelingResponse.Adds a new
ModelChoiceOpportunityTablecard to the Modeling tab to display opportunities, confidence, rationale, and projected monthly savings (with an empty-state), and updates API types/schemas and tests (backend + frontend). Also marks the roadmap item as shipped.Written by Cursor Bugbot for commit 7de10e1. This will update automatically on new commits. Configure here.