Skip to content

Ollama cloud usage data unavailable — blocked on upstream API #31

@danielithomas

Description

@danielithomas

Summary

Ollama cloud usage percentages (session and weekly) are not displayed in --monitor or any output mode, even when cloud_enabled = true and enable_alpha_features = true are correctly configured. The root cause is that the API endpoint clawmeter probes (ollama.com/api/account/usage) does not exist — it returns HTTP 404.

This is an upstream dependency, not a clawmeter bug. The code is correctly structured and ready to consume the data once a real endpoint ships.

Upstream Dependency

  • Cloud usage stats. ollama/ollama#12532 — "Cloud usage stats" (opened Oct 2025, still open). The primary feature request for programmatic access to account usage data. No timeline from the Ollama team.
  • Account Usage API Endpoint ollama/ollama#15132 — "Account Usage API Endpoint" (opened Mar 2026, closed as duplicate of #12532). Community proposal for GET /api/account/usage with a JSON schema — this is the response format that _parse_cloud_usage() in providers/ollama.py was built to consume.

Current Behaviour

  1. The provider probes https://ollama.com/api/account/usage
  2. The endpoint returns 404
  3. _fetch_cloud_endpoint() returns None on 404 (line 509)
  4. _fetch_cloud_usage() sets cloud_info["status"] = "no_usage_endpoint" silently
  5. No "Cloud Session" or "Cloud Weekly" windows are created
  6. No error or informational message is shown to the user — the data is simply absent

The user sees local Ollama data (Models Available, Models Loaded, VRAM, RAM) but has no indication that cloud usage monitoring is configured but non-functional.

Research: Why Scraping Is Not Viable

The only known way to access cloud usage data today is scraping ollama.com/settings:

  • Requires browser session cookies (__Secure-session, aid), not API keys
  • Subject to Cloudflare challenges (cf_clearance)
  • HTML structure is undocumented and fragile
  • Incompatible with clawmeter's security model (no plaintext cookie storage, credential chain expects API keys or keyring)

This approach is unsuitable for a production tool.

What Should Change

Short-term: Improve silent-failure UX

When cloud_enabled = true and the endpoint returns 404, the monitor should display something visible — e.g. a "Cloud: awaiting API" informational row or a note in the provider panel — so users understand why the data is missing.

Medium-term: Probe additional endpoints

ollama/ollama#12532 originally suggested usage data via /api/me. Worth probing alongside /api/account/usage in case Ollama ships the data at a different path.

Long-term: Activate when upstream ships

_parse_cloud_usage() is already implemented and tested (tests/providers/test_ollama_cloud.py). When Ollama publishes a usage API, clawmeter needs only a URL update.

Affected Code

  • src/clawmeter/providers/ollama.py_fetch_cloud_usage() (line 332), _fetch_cloud_endpoint() 404 handling (line 509)
  • src/clawmeter/formatters/monitor_fmt.py — no representation of "configured but unavailable" cloud state
  • tests/providers/test_ollama_cloud.py — existing tests cover the happy path; no test for the UX when endpoint is absent

Labels

Upstream dependency, Ollama provider, UX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions