Commit b605517
fix: reasoning token double-count and permission disabled() specificity
- Token total: remove reasoningTokens from total computation since it's
a subset of outputTokens (from completion_tokens_details). Adding both
was double-counting reasoning tokens for models like o1/o3.
- Permission disabled(): use specificity scoring instead of findLast()
so that a specific allow rule (e.g. permission: "edit") beats a
catch-all deny (permission: "*"). Consistent with evaluate() fix.
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 21e7a01 commit b605517
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
273 | 286 | | |
274 | 287 | | |
275 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
822 | 824 | | |
823 | 825 | | |
824 | 826 | | |
| |||
0 commit comments