Commit fb0a97a
committed
fix(billing): apply 2x service-tier multiplier for fast/priority fallback
Models without an explicit priority price table (e.g. gpt-5.4-mini, gpt-5.4-nano)
were billed at base rate when requested with service_tier=fast/priority, while
OpenAI's published priority pricing for those SKUs is exactly 2x base. Align
with sub2api: serviceTierCostMultiplier now returns 2.0 for priority/fast, and
models that *do* declare InputPricePerMTokenPriority continue to use their
explicit priority price table unchanged.
Fixes #158.1 parent 016046f commit fb0a97a
2 files changed
Lines changed: 15 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 112 | | |
131 | 113 | | |
132 | 114 | | |
| |||
161 | 143 | | |
162 | 144 | | |
163 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
164 | 159 | | |
165 | 160 | | |
166 | 161 | | |
| |||
0 commit comments