Skip to content

Add Mistral provider support#638

Open
stamsam wants to merge 3 commits intosteipete:mainfrom
stamsam:codex/mistral-provider
Open

Add Mistral provider support#638
stamsam wants to merge 3 commits intosteipete:mainfrom
stamsam:codex/mistral-provider

Conversation

@stamsam
Copy link
Copy Markdown

@stamsam stamsam commented Apr 2, 2026

Summary

Adds Mistral as a new provider in CodexBar with a hybrid fetch strategy:

  • web mode uses the Mistral AI Studio billing endpoint when a browser session is available
  • api mode falls back to MISTRAL_API_KEY for model discovery and API-only status
  • auto prefers web billing and falls back gracefully to the public API

What’s Included

  • New Mistral provider implementation and descriptor registration
  • Settings UI for usage source and optional API keys
  • Automatic browser-session import for AI Studio usage when available
  • API fallback when billing data is unavailable
  • Mistral icon/branding
  • CLI and widget wiring
  • Docs updates
  • Provider tests

Notes

Mistral’s documented public API does not currently expose the billing/usage totals needed for full quota cards, so real usage totals come from the logged-in AI Studio web session. The provider keeps API-key support for fallback and CLI use.

Verification

  • Built CodexBarCLI
  • Built CodexBar
  • Repackaged and tested the app UI
  • Confirmed API fallback mode
  • Confirmed web billing mode can connect and return live usage data

Screenshots

Live usage in the menu card and the Mistral settings flow:
Screenshot 2026-04-01 at 9 59 56 PM
Screenshot 2026-04-01 at 10 00 27 PM

@stamsam
Copy link
Copy Markdown
Author

stamsam commented Apr 2, 2026

** Tested both API fallback and AI Studio web usage flow locally.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67a2194b52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant