feat(inference): add Mistral remote inference provider#6239
Open
NishchayMahor wants to merge 1 commit into
Open
feat(inference): add Mistral remote inference provider#6239NishchayMahor wants to merge 1 commit into
NishchayMahor wants to merge 1 commit into
Conversation
Adds a remote inference adapter for Mistral AI (remote::mistral). Mistral exposes an OpenAI-compatible chat completions and embeddings API, so the adapter extends OpenAIMixin pointed at https://api.mistral.ai/v1, keyed by MISTRAL_API_KEY. Registers the provider, adds unit tests, and regenerates the provider docs. Signed-off-by: Nishchay Mahor <nishchaymahor@gmail.com>
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 does this PR do?
Adds a remote inference provider for Mistral AI (
remote::mistral). Mistral is a major frontier lab that wasn't yet in the inference lineup — this lets users run Mistral chat models (e.g.mistral-large-latest,mistral-small-latest,codestral-latest) and themistral-embedembedding model through the standard inference API.Mistral exposes an OpenAI-compatible chat-completions and embeddings API, so the adapter extends the shared
OpenAIMixinpointed athttps://api.mistral.ai/v1, authenticated viaMISTRAL_API_KEY(or themistral_api_keyprovider-data header). No new pip dependency is required.Changes
providers/remote/inference/mistral/— adapter (MistralInferenceAdapter), config (MistralImplConfig+ provider-data validator), andget_adapter_impl.remote::mistralinproviders/registry/inference.py.tests/unit/providers/inference/test_mistral_config.py.docs/.../inference/remote_mistral.mdx) viascripts/provider_codegen.py.Test Plan
pytest tests/unit/providers/inference/test_mistral_config.py→ 5 passed (default/custom/env base URL, sample run config, provider-data + embedding metadata).remote::mistral) and imports cleanly.mypyandruffclean on the new module; docs codegen produces the expected page.Usage: