Skip to content

Conversation

Flaque
Copy link
Member

@Flaque Flaque commented Mar 19, 2025

No description provided.

Copy link

semanticdiff-com bot commented Mar 19, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/lib/buy/index.tsx  0% smaller

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Modified the quote pricing logic in the CLI to add a 1 cent premium to automatic price calculations, improving order fill rates without affecting manual price inputs.

  • Added 1 cent increment to price per GPU hour in src/lib/buy/index.tsx QuoteAndBuy function to avoid quoting cache issues
  • Price adjustment only applies to automatic price calculations, preserving user-specified price inputs
  • Change leverages existing price calculation utilities from src/helpers/price.ts to maintain consistent pricing logic

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 197 to +199
pricePerGpuHour = getPricePerGpuHourFromQuote(quote);
// Add 1 cent to price to make order more likely to fill
pricePerGpuHour += 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Adding 1 cent to pricePerGpuHour could cause precision issues since JavaScript numbers may not handle decimal arithmetic perfectly. Consider using a decimal library or moving the addition after converting to total price.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant