Draft
Conversation
Two bugs caused the multi-node extend confirmation to display ~10x the correct price: 1. The quote API was called with quantity=8 (GPUs per node) instead of quantity=1 (one node per quote). The API's quantity parameter means 'number of nodes', not GPUs. This inflated each quote's total price by 8x. 2. The multi-node total was computed by summing raw quote prices, which include the full quoted duration. Because the quote request adds flexibility (up to +1 hour), a 4-hour request could yield 5-hour quotes, adding another ~1.25x. Combined: 8 * 1.25 = 10x. Fix: - Change quantity from 8 to 1 in the per-node getQuote call - Normalize multi-node total using per-node-hour rates (via getPricePerGpuHourFromQuote) multiplied by the actual requested duration, matching the single-node code path Co-authored-by: Daniel Tao <danieltaox@gmail.com>
|
Cursor Agent can help with this pull request. Just |
Changed Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
sf nodes extendcommand showing 10x inflated prices by correcting quote API parameters and price calculation logic.The previous implementation incorrectly passed
quantity: 8(GPUs per node) to the quote API'squantityparameter (number of nodes), inflating each quote by 8x. Additionally, the multi-node total summed raw quote prices, which included an extra hour for duration flexibility, leading to a further ~1.25x overestimation. These compounded to a ~10x error.Slack Thread