Skip to content

feat(inference): add Mistral remote inference provider#6239

Open
NishchayMahor wants to merge 1 commit into
ogx-ai:mainfrom
NishchayMahor:feat/mistral-inference-provider
Open

feat(inference): add Mistral remote inference provider#6239
NishchayMahor wants to merge 1 commit into
ogx-ai:mainfrom
NishchayMahor:feat/mistral-inference-provider

Conversation

@NishchayMahor

Copy link
Copy Markdown

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 the mistral-embed embedding model through the standard inference API.

Mistral exposes an OpenAI-compatible chat-completions and embeddings API, so the adapter extends the shared OpenAIMixin pointed at https://api.mistral.ai/v1, authenticated via MISTRAL_API_KEY (or the mistral_api_key provider-data header). No new pip dependency is required.

Changes

  • providers/remote/inference/mistral/ — adapter (MistralInferenceAdapter), config (MistralImplConfig + provider-data validator), and get_adapter_impl.
  • Registered remote::mistral in providers/registry/inference.py.
  • Unit tests in tests/unit/providers/inference/test_mistral_config.py.
  • Regenerated provider docs (docs/.../inference/remote_mistral.mdx) via scripts/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).
  • Provider resolves from the registry (remote::mistral) and imports cleanly.
  • mypy and ruff clean on the new module; docs codegen produces the expected page.

Usage:

providers:
  inference:
  - provider_id: mistral
    provider_type: remote::mistral
    config:
      api_key: ${env.MISTRAL_API_KEY}

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>
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