Skip to content

Add Mistral (Vibe CLI + Studio) as a provider #205

Closed as not planned
Closed as not planned

Description

@hyptos

Problem

Mistral is not among the supported providers, so users of the Mistral Vibe CLI and of Mistral Studio (the La Plateforme console at console.mistral.ai) cannot see their usage in the taskbar widget. Unlike the Claude Code and Codex CLIs, Vibe does not write a local usage file, so today the only way to check spend or remaining quota is to open the Studio dashboard in a browser.

Proposal

Treat Mistral as a new provider (key mistral) covering both surfaces:

  • Vibe CLI: the CLI (mistralai/mistral-vibe) authenticates with a Mistral API key stored in the OS keyring after vibe --setup, also readable from MISTRAL_API_KEY or %USERPROFILE%\.vibe\.env. The poller would use that same key against the Mistral API.
  • Studio / La Plateforme: read account state from the Mistral API (https://api.mistral.ai/v1):
    • GET /v1/billing/usage for monthly spend — the same data the Studio usage dashboard shows. Mistral bills in EUR on a calendar-month period (resets at midnight UTC on the 1st).
    • Rate-limit headers from GET /v1/models (x-ratelimit-*) for the remaining requests/tokens in the current window, which can drive the short-window row the way Claude/Codex 5h windows do.
    • Optionally, for Enterprise organizations, the Admin API (https://api.mistral.ai/v1/admin/..., x-api-key header), e.g. GET /v1/admin/analytics/vibe/usage/by_workspace for Vibe-specific daily token series, plus billing usage for Organization spend. An Admin API key would be a separate, optional credential.

The API key would be stored in the Windows Credential Manager, with MISTRAL_API_KEY kept as a fallback, so the secret never ends up in settings.json. On first run with Vibe installed, the monitor could offer to reuse the key Vibe already stores in the OS keyring.

Currency note: Mistral reports EUR while other providers report USD, so the widget should show the provider's native currency (EUR) instead of silently converting.

Scope

Provider descriptor and poller (src/providers.rs, src/poller/mistral.rs), the settings panel entry, translations for the 14 bundled locales, a Mistral row in the bundled themes, and the provider-setup table in the README.

Alternatives considered

  • Reading a local usage file written by the Vibe CLI: Vibe does not write one today, so polling the API is the only reliable source.
  • Scraping the Studio console: it is a SPA behind session cookies, too fragile compared to the API.

Activity

  1. hyptos commented on Nov 3, 2026

    @hyptos
    Author

    Implemented in #206 (feat/205/mistral-provider): new mistral provider polling api.mistral.ai — rate-limit headers from /v1/models for the short window, calendar-month EUR spend from /v1/billing/usage vs monthly_budget from /v1/billing/subscription for the 30d row. Key from MISTRAL_API_KEY or the mistral:vibe-api-key Windows credential.

  2. hyptos commented on Nov 4, 2026

    @hyptos
    Author

    Closed along with #206, see the explanation there: Mistral does not expose usage data to standard API keys.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions