Skip to content

Muse Spark usage #1250

Open
Open

Description

@andresantonioriveros

Provider Name

Muse Spark (Meta)

Provider Website

https://dev.meta.ai/

What usage data does this provider expose?

  • Local metering, always available: session transcripts with token usage (input/output/cache), prompt and session counts, per-day and per-model breakdowns.
  • Subscribed accounts: 5-hour session + 7-day weekly usage percents with reset times, plus tier name, via an authenticated key-endpoint probe. Subscribed without a usage snapshot yet: tier name only.
  • Pay-as-you-go: local metering only.

Will you build the provider?

Yes, I will submit a PR

Additional Context

Reference implementation: omacom/omarchy#10610.

  • Local sources: native muse transcripts at $XDG_DATA_HOME/muse/sessions (fallback ~/.local/share/muse/sessions, date-sharded YYYY/MM/DD/<id>/session.jsonl, retained_frame wrappers with children[].record_json payloads, model_completed events carry usage) plus opencode rows (providerID == "meta", or "muse-spark" in modelID on the opencode provider). XDG layout verified on macOS — not Application Support.
  • Subscription probe: POST the Muse key endpoint with the saved OAuth token (~/.config/muse/auth.json → providers.meta.access_token, Bearer, memory only, never persisted). Read subs_usage.window and subs_usage.weekly (used_percent, resets_at epoch) plus subs_tier_name.
  • States: is_subs_active=false with no subs_usage = pay-as-you-go, not an error. 401/403 = sign-in expired. Transport failure → retry with backoff. Cache the probe ~60s; don't refetch per UI refresh.

Activity

  1. andresantonioriveros commented on Sep 12, 2026

    @andresantonioriveros
    Author

    Could this be retagged as provider? It was filed under the wrong template

  2. lajczi commented on Sep 12, 2026

    @lajczi

    hi @robinebers, can you please assign @lassejlv so he can work on this as per https://x.com/lassejv/status/2098471000056713548

  3. tomck commented on Sep 18, 2026

    @tomck

    I have also been working on this with Muse Code. Not trying to, like, swoop in or anything, I literally just got to where I was happy making a pull request as it's fully feature complete, and through a lot of work I was able to find the secret endpoint that doesn't count as inference and doesn't rely on the browser cookies/GraphQL. I've been dogfooding it for about a week and can confirm, works great. I've also been concurrently working on this for the openusage.sh project: #janekbaraniewski/openusage#359

    I would like to be assigned to this so #1273 can be imported. (I knew it would be auto-closed, just wanted to get the text written up.)

    I can rewrite the commit messages but a lot of it was testing, so it's work-in-the-open, but I would be happy to squash and rewrite my own commit for the full provider.

    Because I have used muse code too much I also find these edge cases, like 99% usage (or 1% left) when it's false. Even the official website shows the incorrect information. Now there's a warning.

    Image Image
  4. kaminskypavel commented on Sep 20, 2026

    @kaminskypavel

    this looks promising. any chance to get the pr merged 🙏?

  5. github-actions commented on Oct 21, 2026

    @github-actions

    This issue has been inactive for 30 days. It will be closed in 3 days unless there is new activity. If this is still relevant, please comment.

  6. kaminskypavel commented on Oct 21, 2026

    @kaminskypavel
  7. JorgeRojas2712 commented on Oct 23, 2026

    @JorgeRojas2712

    This is still missing in 0.7.15. There are two community implementations with tests and live verification ready: #1248 and #1273. Could a maintainer approve this issue and assign one of the authors so a PR can be reopened and reviewed? The inactivity bot is about to close this, but the provider is still relevant.

  8. anagstef commented on Oct 25, 2026

    @anagstef

    Hi! Small update since the earlier attempts: Muse Code now has muse usage --json, which gives the session and weekly usage directly. That should make this much simpler to add.

  9. tomck commented on Oct 25, 2026

    @tomck

    It seems that @robinebers stance is that it won't be supported, see #1078.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions