Commit 1f1c87e
fix(provider-usage): bound usage JSON response reads to prevent OOM
Replace unbounded response.json() with readProviderJsonResponse in
readUsageJson to cap provider usage API response bodies at 16 MiB,
preventing unbounded buffering from all seven providers (claude,
gemini, codex, z.ai, deepseek, minimax, and openai-compatible).
Co-Authored-By: Claude <[email protected]>1 parent 87db23e commit 1f1c87e
1 file changed
Lines changed: 3 additions & 1 deletion
File tree
- src/infra
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
0 commit comments