The gateway health check reported a bare key count that could not be reconciled from the line itself, so a reader could not tell whether a change meant a deleted credential, a filtered view, or a parsing difference.
Why
On 2026-09-16 the check printed "4 keys" where earlier runs of the same check printed "10 keys", while the store itself reported 18 (its own total_count) with 10 on page 1. Nothing had been deleted — the number was simply unlabelled. A drop like that reads exactly like a credential incident, which is what made me measure it. It was the third such count that week ("GPU exporters (both)" when there are three, "LiteLLM keys (all 3)" when there are four).
Change (one file, +3/-3)
scripts/litellm-health-check.py now reports the count with its population: 18 total (10 on page 1), using the API's own total_count field rather than the length of one page. A change between runs is therefore visible as a change in the total, and the page size can no longer masquerade as the fleet's key count.
Verification performed
Measured on CT 116: /key/list?page=1&size=10 returns 10 keys and total_count: 18.
Re-ran the count leg after the change and confirmed the string shows both numbers.
Confirmed the leg still reports the count even if the response shape changes (it falls back to the page length rather than raising).
Reviewers: confirm the reported total comes from total_count and not from a page length; that the fallback cannot silently report a smaller number as the total; and that the resulting string is unambiguous to a reader who has never seen the API ("18 total (10 on page 1)"). Also judge the expression's readability — if the one-liner is doing too much, say so, because the next person has to be able to read it.
The gateway health check reported a bare key count that could not be reconciled from the line itself, so a reader could not tell whether a change meant a deleted credential, a filtered view, or a parsing difference.
## Why
On 2026-09-16 the check printed "4 keys" where earlier runs of the same check printed "10 keys", while the store itself reported **18** (its own `total_count`) with 10 on page 1. Nothing had been deleted — the number was simply unlabelled. A drop like that reads exactly like a credential incident, which is what made me measure it. It was the third such count that week ("GPU exporters (both)" when there are three, "LiteLLM keys (all 3)" when there are four).
## Change (one file, +3/-3)
`scripts/litellm-health-check.py` now reports the count with its population: **`18 total (10 on page 1)`**, using the API's own `total_count` field rather than the length of one page. A change between runs is therefore visible as a change in the total, and the page size can no longer masquerade as the fleet's key count.
## Verification performed
- Measured on CT 116: `/key/list?page=1&size=10` returns 10 keys and `total_count: 18`.
- Re-ran the count leg after the change and confirmed the string shows both numbers.
- Confirmed the leg still reports the count even if the response shape changes (it falls back to the page length rather than raising).
Reviewers: confirm the reported total comes from `total_count` and not from a page length; that the fallback cannot silently report a smaller number as the total; and that the resulting string is unambiguous to a reader who has never seen the API ("18 total (10 on page 1)"). Also judge the expression's readability — if the one-liner is doing too much, say so, because the next person has to be able to read it.
The key-count line in litellm-health-check now reports self-describing
output: '18 total (10 on page 1)' instead of bare '18' or '4'. Uses
total_count from the paginated API response and names what was
counted. Previous bare numbers could not reconcile changes between
runs; now a reader sees both the total and the page 1 sample.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The gateway health check reported a bare key count that could not be reconciled from the line itself, so a reader could not tell whether a change meant a deleted credential, a filtered view, or a parsing difference.
Why
On 2026-09-16 the check printed "4 keys" where earlier runs of the same check printed "10 keys", while the store itself reported 18 (its own
total_count) with 10 on page 1. Nothing had been deleted — the number was simply unlabelled. A drop like that reads exactly like a credential incident, which is what made me measure it. It was the third such count that week ("GPU exporters (both)" when there are three, "LiteLLM keys (all 3)" when there are four).Change (one file, +3/-3)
scripts/litellm-health-check.pynow reports the count with its population:18 total (10 on page 1), using the API's owntotal_countfield rather than the length of one page. A change between runs is therefore visible as a change in the total, and the page size can no longer masquerade as the fleet's key count.Verification performed
/key/list?page=1&size=10returns 10 keys andtotal_count: 18.Reviewers: confirm the reported total comes from
total_countand not from a page length; that the fallback cannot silently report a smaller number as the total; and that the resulting string is unambiguous to a reader who has never seen the API ("18 total (10 on page 1)"). Also judge the expression's readability — if the one-liner is doing too much, say so, because the next person has to be able to read it.