feat(providers): add Mistral AI provider

Register Mistral as a first-class provider with LiteLLM routing,
MISTRAL_API_KEY env var, and https://api.mistral.ai/v1 default base.

Includes schema field, registry entry, and tests.
This commit is contained in:
Matt von Rohr
2026-03-16 08:13:43 +01:00
committed by Xubin Ren
parent 9d5e511a6e
commit 7878340031
3 changed files with 40 additions and 0 deletions

View File

@@ -399,6 +399,23 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
strip_model_prefix=False,
model_overrides=(),
),
# Mistral AI: OpenAI-compatible API at api.mistral.ai/v1.
ProviderSpec(
name="mistral",
keywords=("mistral",),
env_key="MISTRAL_API_KEY",
display_name="Mistral",
litellm_prefix="mistral", # mistral-large-latest → mistral/mistral-large-latest
skip_prefixes=("mistral/",), # avoid double-prefix
env_extras=(),
is_gateway=False,
is_local=False,
detect_by_key_prefix="",
detect_by_base_keyword="",
default_api_base="https://api.mistral.ai/v1",
strip_model_prefix=False,
model_overrides=(),
),
# === Local deployment (matched by config key, NOT by api_base) =========
# vLLM / any OpenAI-compatible local server.
# Detected when config key is "vllm" (provider_name="vllm").