ollama: read legacy session and weekly limits from /api/balance

Merged
LE
2d ago
+157-14

On a legacy plan the API-key lane returned included.session and included.weekly, which were ignored, so a key published no quota windows. Publish them in the page lane's legacy slots: session in primary (five_hour), weekly in secondary.


Summary by cubic

Publishes quota windows for legacy Ollama plans so an API key shows the same session and weekly windows as a legacy cookie lane.

  • Legacy plans state included.session and included.weekly instead of dollar allowances; they now publish in the page lane's legacy slots: session in primary (five_hour, 300 minutes), weekly in secondary (weekly, 10080 minutes), with usedPercent from remaining_percent and resetsAt from resets_at when parseable.
  • A body carrying both dollars and legacy limits slots dollars in primary and session in tertiary, matching the page behavior.
  • Updates the consumer contract and provider matrix docs.