()
| 582 | // queue, plus per-user quota snapshots so exhausted models are visible |
| 583 | // before POST. |
| 584 | const noneResponse = async (): Promise<FreebuffSessionServerResponse> => { |
| 585 | const [queueDepthByModel, rateLimitsByModel] = await Promise.all([ |
| 586 | deps.queueDepthsByModel(), |
| 587 | fetchRateLimitsByModel(params.userId, accessTier, deps), |
| 588 | ]) |
| 589 | return { |
| 590 | status: 'none', |
| 591 | accessTier, |
| 592 | queueDepthByModel, |
| 593 | ...nonEmptyRateLimitsByModel( |
| 594 | onlyUsedRateLimitsByModel(rateLimitsByModel), |
| 595 | ), |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | if (!row) return noneResponse() |
| 600 |
no test coverage detected