Codestral (latest)

MistralMCP Tool Call
mistral/codestral-latestOpen Weights

Mistral code model for completions, refactors, and developer IDE workflows

Benchmark Pricing$0.30 / 1M in$0.90 / 1M out$0.03 cache read
Context: 256,000 tokens•Max Output: 4,096 tokens•Knowledge: 2024-10•Released: 2024-05-29

TECHNICAL SPECIFICATIONS

Context Window256,000256K tokens
Max Output4,0964.1K tokens
LicenseOpen SourceSelf-hostable
Input Modalities
Text
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ Codestral (latest) natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 256,000 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

STANDARDIZED BENCHMARKS & EVALS

Aider Polyglotpercent correct
11.1

API CALL INVOCATION EXAMPLE

// Example: Calling Codestral (latest) via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.MISTRAL_API_KEY,
});

const response = await client.chat.completions.create({
  model: "mistral/codestral-latest",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

4 providers
Mistralcodestral-latest
$0.30 / $0.90$0.03 cache
Vercel AI Gatewaymistral/codestral
$0.30 / $0.90$0.03 cache
Eden AImistral/codestral-latest
$0.30 / $0.90$0.03 cache
Merge Gatewaymistral/codestral-latest
$0.30 / $0.90

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.03 / 1M tokens, saving up to 90% on repetitive MCP tool definitions and system instructions.