Devstral 2
Mistral AI's 123B dense open-weight software engineering agent model with a 256K context window, built to explore large repositories, orchestrate multi-file edits, and autonomously resolve failing tests.
What you can do
- Codebase exploration and dependency tracking
- Multi-file bug fixing and legacy modernization
- CLI tool execution and test-failure recovery
Input & output
- Input
- Repository files, terminal logs, and task prompts
- Output
- Multi-file code patches and tool calls
Try a prompt like this
Diagnose the async session errors triggered after upgrading this Python service to SQLAlchemy 2.0, map affected repository files, and generate a multi-file migration patch.
Things to know
Text-only dense 123B checkpoint released under a Modified MIT license; self-hosting requires ~246 GB VRAM in BF16 (~70–130 GB in INT4/FP8 across multi-GPU nodes). Review autonomous patches and tests before merging.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
mistralai/Devstral-2-123B-Instruct-2512
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="mistralai/Devstral-2-123B-Instruct-2512",
messages=[{"role": "user", "content": "Diagnose the async session errors triggered after upgrading this Python service to SQLAlchemy 2.0, map affected repository files, and generate a multi-file migration patch."}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide