feat: add Mistral as a first-class model provider - #618
Open
Xavier Pestel (xavierpestel-ai) wants to merge 3 commits into
Open
feat: add Mistral as a first-class model provider#618Xavier Pestel (xavierpestel-ai) wants to merge 3 commits into
Xavier Pestel (xavierpestel-ai) wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 227dae9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Adds Mistral (https://api.mistral.ai/v1) as a selectable provider in the onboarding wizard and provider registry, alongside the existing OpenAI- compatible providers (Fireworks, Baseten, Nebius, NVIDIA NIM). Users can now pick 'Mistral' during 'openwiki --init', paste a MISTRAL_API_KEY, and choose from preset models (Mistral Medium, Large, Small, Codestral, Ministral 8B/3B, Mistral Nemo) or paste any Mistral model ID. The provider uses the shared ChatOpenAI transport with the Mistral base URL, so no new SDK dependency is required. MISTRAL_BASE_URL follows the same override convention as FIREWORKS_BASE_URL / BASETEN_BASE_URL / NVIDIA_BASE_URL for self-hosted or proxied gateways, and MISTRAL_API_KEY is added to the diagnostic redaction list so it can never leak into error output. - src/config/constants.ts: new env keys, provider type entry, selectable list entry, PROVIDER_CONFIGS entry with default model presets, and MISTRAL_API_KEY fallback in resolveConfiguredProvider. - src/config/env.ts: MANAGED_ENV_KEYS + base URL diagnostic warnings. - src/platform/diagnostics.ts: redact MISTRAL_API_KEY values. - src/setup/credentials/steps.ts: getProviderArticle returns 'a' for 'a Mistral ...'. - README.md: new row in the provider table, bumped provider count, and MISTRAL_BASE_URL added to the alternative-base-URLs section. - Tests: mistral cases in constants / env-behavior / steps / redaction.
Xavier Pestel (xavierpestel-ai)
force-pushed
the
feat/mistral-provider
branch
from
August 8, 2026 12:20
2d58f93 to
5ffcb63
Compare
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.
What
Adds Mistral (
https://api.mistral.ai/v1) as a first-class model provider in the onboarding wizard and provider registry, alongside the existing OpenAI-compatible providers (Fireworks, Baseten, Nebius, NVIDIA NIM).Users can now pick
Mistralduringopenwiki --init, paste aMISTRAL_API_KEY, and choose from preset models (Mistral Medium, Large, Small, Codestral, Ministral 8B/3B, Mistral Nemo) or paste any Mistral model ID.Why
Mistral is one of the few major inference providers still reached through the generic
openai-compatiblepath (which requires the user to know and type the base URL by hand). Promoting it to a first-class provider means:openai-compatible+ hand-typedhttps://api.mistral.ai/v1.mistral-medium-latest), following the same convention as Fireworks / Nebius / Baseten / NVIDIA NIM.MISTRAL_API_KEYrecognised byresolveConfiguredProviderso a bare key auto-selects the provider without needingOPENWIKI_PROVIDER=mistral.MISTRAL_API_KEYadded to the diagnostic redaction list so it can never leak into error output.MISTRAL_BASE_URLfollows the same override convention asFIREWORKS_BASE_URL/BASETEN_BASE_URL/NVIDIA_BASE_URLfor self-hosted or proxied gateways.The Mistral API is OpenAI-compatible, so this reuses the existing
ChatOpenAItransport with a Mistral base URL. No new SDK dependency is introduced.The README already invites this kind of contribution:
And
CONTRIBUTING.mdcites the exact analogue as the canonical example of a well-scoped PR:How it was tested
pnpm run format— clean, all files unchanged.pnpm run lint— clean.pnpm test— 138 files / 2042 tests passing (baseline was 2039; +3 new tests exercise the Mistral provider).New test coverage mirrors the patterns used for the other OpenAI-compatible providers:
test/config/constants.test.ts:isValidProvider("mistral"),resolveConfiguredProvider({ MISTRAL_API_KEY }), default and env-override base URLs, whitespace-only override falls back to default,getDefaultModelId("mistral").test/config/env-behavior.test.ts:MISTRAL_BASE_URLsurfaced verbatim in diagnostics (non-secret).test/setup/credentials/steps.test.ts:mistralfollows the standardprovider → api-key → model → langsmithstep flow.test/agent/redaction.test.ts:MISTRAL_API_KEYvalues are redacted in diagnostic output.Scope
One PR, one change: adds the Mistral provider. No unrelated refactors, no dependency changes, no other providers touched.
Changeset
.changeset/add-mistral-provider.md—minorbump,feat: add Mistral as a first-class model provider.