Expand description
The values RateWindow::window_kind carries today.
Named by PERIOD, not by each upstream’s own term, so a consumer branches on
one vocabulary across providers. A producer maps the upstream’s name onto it:
Anthropic’s five_hour and Ollama’s “Session usage” are both
[FIVE_HOUR]; Anthropic’s seven_day and Ollama’s “Weekly usage” are both
[WEEKLY].
The list is open. A consumer must handle a value it does not know, and a new period is a new constant here, never a reuse of an existing one.
Constants§
- DAILY
- A one-day window.
- FIVE_
HOUR - A five-hour window, which several upstreams call a session.
- HOURLY
- A window that rolls over hourly, as the upstream names it. Its length can still be unstated: Ollama’s “Hourly usage” block gives none.
- MONTHLY
- A month-long window. Its length changes with the month, so it carries no
window_minutes, and it resets on the upstream’s billing anchor, which need not be the first of a calendar month. - WEEKLY
- A seven-day window.