Commit 36ef606
committed
Fix TypeError in RunUsage + RequestUsage operations
- Fix RunUsage.__add__() to handle RequestUsage objects properly
- Fix RunUsage.incr() to handle RequestUsage objects properly
- RequestUsage doesn't have tool_calls attribute, only requests property
- Resolves TypeError in streaming contexts where RunUsage + RequestUsage occurs
- Fixes race condition bug #3120 by making usage increments thread-safe
This addresses the core issue causing 16+ TypeError failures in CI test matrix.1 parent cb5de05 commit 36ef606
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
| |||
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
| |||
0 commit comments