Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Description

Charge $0.001/execution regardless of whether LLM-based blocks are there.

  • Base charge is not subject to cost multiplier unlike model costs
  • Failed executions still charge base fee - users pay for compute time
  • All charges go to userStats table - integrated with existing billing system

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Screenshot 2025-07-29 at 11 16 39 AM

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

@vercel
Copy link

vercel bot commented Jul 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 6:23pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Jul 29, 2025 6:23pm

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.

Greptile Summary

This PR introduces a base execution charge of $0.001 for every workflow execution in the Sim Studio platform. The change adds a new billing constant BASE_EXECUTION_CHARGE defined in apps/sim/lib/billing/constants.ts. This represents a fundamental shift in the billing model to ensure users pay for computational resources consumed during workflow execution, regardless of whether the workflow uses AI models or LLM-based blocks.

The base charge operates independently of the existing cost multiplier system that affects model costs, ensuring consistent pricing across different environments. The charge applies to all executions, including failed ones, acknowledging that compute time is consumed even when workflows don't complete successfully. This integrates with the existing userStats billing system, maintaining consistency with the current billing infrastructure.

This change addresses a gap in the previous billing model where only LLM usage was monetized, leaving non-AI workflow executions unaccounted for in terms of operational cost recovery.

Confidence score: 5/5

  • This PR is extremely safe to merge as it only adds a well-defined constant without any implementation logic.
  • The change is minimal, well-documented, and follows established patterns by creating a dedicated constants file for billing configuration.
  • Only the new constants file needs attention, which is straightforward and low-risk.

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@icecrasher321 icecrasher321 merged commit 13608a8 into staging Jul 29, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/base-exec-charge branch July 30, 2025 00:44
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
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.

2 participants