Commit e98120e
committed
feat(ai): allow provider-specific numeric fields on UsageTotals.costDetails
The JSDoc promised "loosely typed" costDetails to accommodate provider
divergence (BYOK upstream costs, cache discounts, per-tier rates) but
the declared shape only allowed two OpenRouter-specific keys, so any
other adapter would have been forced to `as any`-cast to report its
own breakdown. Add a numeric index signature so additional keys are
type-legal without a cast, matching the documented intent.
Picked up in CodeRabbit review of TanStack#469.1 parent 4c5aca1 commit e98120e
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
833 | 835 | | |
834 | 836 | | |
835 | 837 | | |
836 | 838 | | |
| 839 | + | |
837 | 840 | | |
838 | 841 | | |
839 | 842 | | |
| |||
0 commit comments