Skip to main content

Usage guide

Setup, environment variables, and Python/JavaScript/Go usage examples.

MistralAILLM

Text generation with Mistral’s models, using your own Mistral key. Good for multilingual conversational agents with tool calling. Authenticates with MISTRALAI_API_KEY from your environment, or an explicit api_key.

Fields

str
default:"UNSET"
Mistral model name, e.g. “mistral-small-latest” or “mistral-medium-latest”. Defaults to ‘mistral-small-latest’.
str
default:"UNSET"
Base URL of the Mistral API. Change it only when routing through a proxy or compatible endpoint. Defaults to ‘https://api.mistral.ai/v1’.
float
default:"UNSET"
Sampling temperature. Lower values give more focused, repeatable replies. Defaults to 0.7.
Literal['auto', 'required', 'none']
default:"UNSET"
How the model may call tools: “auto” lets it decide, “required” forces a tool call, “none” disables tools. Defaults to ‘auto’.
int | None
default:"UNSET"
Maximum number of tokens the model may generate per reply. Leave unset for no explicit limit. Defaults to None (not set).