5656 # Quota applied across all models and all clients.
5757 serviceQuota :
5858 quota :
59- limit : 100000 # Maximum tokens allowed in the window.
60- duration : " 1h" # Sliding window duration.
59+ limit : 100000 # Maximum tokens allowed in the window.
60+ duration : " 1h" # Sliding window duration.
6161` ` `
6262
6363### Custom Cost Expression
@@ -92,13 +92,13 @@ perModelQuotas:
9292 quota:
9393 mode: Exclusive
9494 defaultBucket:
95- limit: 10000 # Strict limit for expensive model.
95+ limit: 10000 # Strict limit for expensive model.
9696 duration: "1h"
9797 - modelName: gpt-3.5-turbo
9898 quota:
9999 mode: Exclusive
100100 defaultBucket:
101- limit: 100000 # Higher limit for cost-effective model.
101+ limit: 100000 # Higher limit for cost-effective model.
102102 duration: "1h"
103103` ` `
104104
@@ -117,7 +117,7 @@ when a request matches one or more rules.
117117perModelQuotas:
118118 - modelName: gpt-4
119119 quota:
120- mode: Shared # Charge both default and matching rule buckets.
120+ mode: Shared # Charge both default and matching rule buckets.
121121 defaultBucket:
122122 limit: 10000
123123 duration: "1h"
@@ -127,7 +127,7 @@ perModelQuotas:
127127 - name: x-tenant-id
128128 type: Distinct
129129 quota:
130- limit: 2000 # Per-tenant limit within the shared budget.
130+ limit: 2000 # Per-tenant limit within the shared budget.
131131 duration: "1h"
132132` ` `
133133
@@ -148,7 +148,7 @@ perModelQuotas:
148148 quota:
149149 mode: Exclusive
150150 defaultBucket:
151- limit: 10000 # Fallback quota for unmatched tenants.
151+ limit: 10000 # Fallback quota for unmatched tenants.
152152 duration: "1h"
153153 bucketRules:
154154 - clientSelectors:
@@ -157,7 +157,7 @@ perModelQuotas:
157157 type: Exact
158158 value: premium-tenant
159159 quota:
160- limit: 50000 # Premium tenant gets a larger budget.
160+ limit: 50000 # Premium tenant gets a larger budget.
161161 duration: "1h"
162162` ` `
163163
@@ -168,7 +168,7 @@ bucketRules:
168168 - clientSelectors:
169169 - headers:
170170 - name: x-tenant-id
171- type: Distinct # One bucket per unique tenant ID.
171+ type: Distinct # One bucket per unique tenant ID.
172172 quota:
173173 limit: 5000
174174 duration: "1h"
@@ -190,7 +190,7 @@ bucketRules:
190190 quota:
191191 limit: 5000
192192 duration: "1h"
193- shadowMode: true # Evaluate but do not enforce.
193+ shadowMode: true # Evaluate but do not enforce.
194194` ` `
195195
196196:::tip
@@ -203,7 +203,7 @@ set correctly before switching to enforcement by removing `shadowMode` (or setti
203203The `duration` field on `QuotaValue` accepts a number followed by a unit suffix :
204204
205205| Suffix | Unit | Example |
206- |--------| ---------| --------- |
206+ | ------ | ------- | ------- |
207207| `s` | Seconds | `"30s"` |
208208| `m` | Minutes | `"15m"` |
209209| `h` | Hours | `"1h"` |
0 commit comments