Skip to main content
Lesson 3 of 12 · Structured Output: JSON and Schemas

Supported Models and Compatibility

Lesson 3 of 12 Updated November 2, 2026 Developer
On this page
  1. Mistral Model Compatibility
  2. Core Models
  3. Choosing the Right Model
  4. The temperature Parameter
  5. Checking Compatibility Programmatically
  6. Key Takeaways

Mistral Model Compatibility

Not all Mistral models handle structured outputs the same way. Before you write a single line of code, verify that your target model supports your chosen approach. This thirty-second check saves you from encountering an incomprehensible API error at the end of development.

Here is the good news in one sentence: almost all Mistral models support structured outputs, both in JSON Mode and Custom Structured Outputs. The only exception, codestral-mamba, was retired by Mistral in June 2025.

Core Models

Here are the most commonly used models and their compatibility status (as of April 2026):

ModelCompatibilityTypical Use Case
mistral-large-latestFull support (JSON Mode + Custom)Complex tasks requiring reliable structured outputs
mistral-medium-latestFull supportBest performance/cost balance for production pipelines
mistral-small-latestFull supportSimple tasks (classification, basic entity extraction) on a limited budget
ministral-8b-latestFull supportLightweight extractions with minimal latency
ministral-3b-latestFull supportThe lightest option when speed trumps complexity
codestral-latestFull supportOptimized for code, but works for non-code tasks too
mistral-embedNot applicableEmbedding model; does not generate text

The general-purpose Large, Medium, and Small models cover most needs, while the Ministral family handles latency constraints.

Choosing the Right Model

During prototyping, use mistral-small-latest or ministral-8b-latest. They are fast, inexpensive, and more than sufficient to validate that your schema holds up and your prompt says what you think it says. Paying for the most powerful model only to discover a field was misnamed is a waste.

# Prototyping — lightweight model
response = client.chat.parse(
    model="ministral-8b-latest",
    messages=messages,
    response_format=MonSchema
)

Production changes the criteria. Multi-field extraction, nuanced sentiment analysis, or fine-grained classification justify mistral-large-latest. Conversely, a simple task processed at high volume still runs well on mistral-small-latest. Note the addition of temperature=0 here; we will cover that parameter in detail below.

# Production — powerful model
response = client.chat.parse(
    model="mistral-large-latest",
    messages=messages,
    response_format=MonSchema,
    temperature=0  # Maximum reproducibility
)

Finally, consider high-frequency pipelines where latency is the dominant constraint. If you are processing thousands of requests per minute—such as ticket classification or email triage—ministral-8b-latest offers the best latency-to-quality ratio. Capping maxTokens prevents the model from lingering on overly long responses.

// TypeScript — high-frequency pipeline
const response = await client.chat.parse({
  model: "ministral-8b-latest",
  messages,
  responseFormat: MonSchema,
  maxTokens: 128,  // Limit for speed
});

The temperature Parameter

One point deserves your attention: temperature influences output variability even in structured mode. At 0, the output is deterministic. This is the recommended setting for production and anywhere reproducibility matters—two runs on the same document must yield the same record. Between 0.1 and 0.3, you introduce slight variability, which is useful only if you want different phrasing in free-text fields like a summary. From 0.7 upward, variability becomes strong, and the model may produce inconsistent values. Avoid this with structured outputs.

Checking Compatibility Programmatically

In production, rather than relying on a static list, catch the error returned by the SDK when a model cannot fulfill the request:

from mistralai.client import Mistral
from mistralai.client.errors import SDKError

client = Mistral(api_key=api_key)

try:
    response = client.chat.parse(
        model=modele,  # identifier read from your configuration
        messages=[{"role": "user", "content": "Test"}],
        response_format=MonSchema
    )
except SDKError as e:
    print(f"Model not compatible: {e}")

This habit remains valuable over time. Mistral regularly releases new models, and structured output support has become a standard that new generations support systematically. Consult the official documentation for the current list before pinning an identifier in your configuration.

Key Takeaways

  • Current Mistral models support structured outputs; the historical exception, codestral-mamba, was retired in June 2025
  • Use temperature: 0 in production for reproducible outputs
  • Choose your model based on your needs: mistral-large for quality, ministral-8b for speed
  • Both approaches (JSON Mode and Custom) are supported by the same models