Commit de03060
docs: correct QuotaPolicy cost-expression examples and clientSelector scope
The cost-expression examples used uint*int and uint*double arithmetic (e.g. "output_tokens * 6", "cached_input_tokens * 0.1"), which CEL rejects since the token variables are unsigned integers — the controller would skip the expression and silently stop enforcing that model's quota. Use unsigned literals and integer division (6u, / 10u), and document that fractional weights require an explicit uint(double(...)) cast.
Also correct the clientSelectors note: QuotaPolicy only honors the headers matcher; sourceCIDR/methods/path/queryParams are accepted by the embedded EG type but not applied to quota buckets.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Erica Hughberg <erica.sundberg.90@gmail.com>1 parent 79e51b5 commit de03060
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
218 | | - | |
| 222 | + | |
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
| |||
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
287 | | - | |
| 291 | + | |
288 | 292 | | |
289 | 293 | | |
290 | 294 | | |
| |||
0 commit comments