There was an error while loading. Please reload this page.
1 parent 16682e8 commit 04a8b79Copy full SHA for 04a8b79
1 file changed
apps/sim/app/api/chat/[identifier]/route.ts
@@ -79,6 +79,11 @@ function executionsPerMinute(perMinute: number): TokenBucketConfig {
79
* The floor is deliberately shared by all plans for now. Sizing the slice to
80
* the *payer's* own plan needs the subscription, which `preprocessExecution`
81
* resolves a few lines after this runs, not here.
82
+ *
83
+ * A configured rate of `1` is the one value where this lands equal to the plan
84
+ * rather than under it, because no positive integer is below 1. It is inert:
85
+ * a workspace allowed one execution per minute has no capacity left to starve,
86
+ * and the two buckets then exhaust together rather than one masking the other.
87
*/
88
const CHAT_EXECUTION_RATE_PER_MINUTE = Math.max(
89
1,
0 commit comments