fix(ollama): show monthly cloud usage limit - #1270
Open
robinebers wants to merge 1 commit into
Open
robinebers wants to merge 1 commit into
robinebers wants to merge 1 commit into
Conversation
Map limits.monthly.usage, register the Monthly widget, and export the monthly percentage through the local limits API. Enable Monthly above the fold after Weekly without adding a menu-bar pin. Add regression coverage for monthly-only Free plans, absent and unusable values, dashboard data, both API shapes, and layout upgrades. Thanks to @maxmilian for identifying the missing monthly mapping in #1268 (comment). Fixes #1268.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Ollama accounts with a monthly cloud allowance now show a Monthly meter. A reported
limits.monthly.usage = 0.053becomes 5.3% usage in the API and 5% used in the dashboard's existing whole-percentage format.Fixes #1268.
What was happening
What this changes
monthlyin/v1/limitsand include its progress line in/v1/usage.Heads-up
Thanks to @maxmilian for identifying the missing Monthly mapping.
Tests
DYLD_FRAMEWORK_PATHfor test loading.CONFIG=debug ./script/build_and_run.sh verify: rebuild, signing, restart, and process verification passed.git diff --checkpassed.Screenshots
Native captures of the dashboard header and metric rows using synthetic Free and Pro payloads, with the meter set to Used. The Free fixture supplies only Monthly; Session and Weekly correctly show No data.
Note
Low Risk
Scoped Ollama provider change with optional-field parsing unchanged; layout migration is tested and does not touch auth or shared infrastructure.
Overview
Ollama Cloud now surfaces Monthly plan usage when
limits.monthlyis present in/api/usage, fixing cases (e.g. Free) where only a monthly allowance was returned and no quota meter appeared.The mapper adds a Monthly percent line via the same
percentLinehelper as Session/Weekly (fraction → %, no guessedresetsAt). A newollama.monthlywidget exportsmonthlyto/v1/limitsand/v1/usage. Default layout enables Monthly above the fold (after Weekly, not menu-bar pinned); upgrades add it once while respecting prior opt-outs. Docs and tests cover mapping edge cases, API projection, and layout migration.Reviewed by Cursor Bugbot for commit 5c031eb. Bugbot is set up for automated code reviews on this repo. Configure here.