You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pricing refresh: send Accept-Encoding and revalidate with ETag (1.7MB -> ~8KB per run) #1564
The LiteLLM pricing fetch in rust/crates/ccusage/src/http.rs. Two things: enable ureq's gzip feature (right now no Accept-Encoding is sent, so the table transfers uncompressed), and keep the body + ETag on disk so later runs revalidate with If-None-Match instead of re-downloading.
Why?
Every non-offline run downloads the full pricing table, 1.7 MB on the wire. I hit this while chasing constant traffic on my machine — a statusline plus a 1-minute usage collector were re-downloading the same JSON ~3000 times a day, about 5 GB. The server side already supports everything needed:
ureq gzip feature + a best-effort body/etag pair in the temp dir (same spirit as the statusline cache), If-None-Match on later runs, and falling back to the last validated body when revalidation fails. Working locally: 1.7 MB per run before -> 160 KB cold / 8 KB warm after (warm is just the TLS handshake plus 304 headers). Tested with unit tests, fmt and clippy clean. Happy to open a PR — the branch is ready.
This issue was auto-closed. Issues from new contributors are auto-closed by default.
Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current main implementation covers this request. This item is kept for history and does not need to be reopened.
Activity
pullfrog commentedon Aug 2, 2026
github-actions commentedon Aug 2, 2026
This issue was auto-closed. Issues from new contributors are auto-closed by default.
Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies
lgtmi, your future issues will stay open. If a maintainer replieslgtm, your future issues and PRs will stay open.See CONTRIBUTING.md.
ryoppippi commentedon Aug 31, 2026
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current
mainimplementation covers this request. This item is kept for history and does not need to be reopened.