Mistral Medium 3.5 is our first flagship merged model. It is a dense 128B model with a 256k context window, handling instruction-following, reasoning,
and coding in a single set of weights. Mistral Medium 3.5 replaces its predecessor Mistral Medium 3.1 and Magistral in Le Chat. It also replaces Devstral 2 in our
coding agent Vibe. Concretely, expect better performance for instruct, reasoning and coding tasks in a new unified model in comparison with our previous released models.
Reasoning effort is configurable per request, so the same model can answer a quick chat reply or work through a complex agentic run. We trained the vision encoder from
scratch to handle variable image sizes and aspect ratios.
[!Note]
To speed up local inference using vLLM or SGLang, check out our released EAGLE model.
[!Warning]
The Transformers config originally had an incorrect entry that caused long-context performance degradation. This has been fixed in this commit. GGUFs generated using the Transformers config prior to this commit are also affected. Please use the correct config for best performance.
Key Features
Mistral Medium 3.5 includes the following architectural choices:
Dense 128B parameters.
256k context length.
Multimodal input: Accepts both text and image input, with text output.
Instruct and Reasoning functionalities with function calls (reasoning effort configurable per request).
Mistral Medium 3.5 offers the following capabilities:
Reasoning Mode: Toggle between fast instant reply mode and reasoning mode, boosting performance with test-time compute when requested.
Vision: Analyzes images and provides insights based on visual content, in addition to text.
Multilingual: Supports dozens of languages, including English, French, Spanish, German, Italian, Portuguese, Dutch, Chinese, Japanese, Korean, and Arabic.
System Prompt: Strong adherence and support for system prompts.
Agentic: Best-in-class agentic capabilities with native function calling and JSON output.
Large Context Window: Supports a 256k context window.
We release this model under a Modified MIT License: Open-source license for both commercial and non-commercial use with exceptions for companies with large revenue.
Recommended Settings
Reasoning Effort:
'none' → Do not use reasoning
'high' → Use reasoning (recommended for complex prompts and agentic usage)
Use reasoning_effort="high" for complex tasks and agentic coding.
Temperature: 0.7 for reasoning_effort="high". Temp between 0.0 and 0.7 for reasoning_effort="none" depending on the task.
Generally, lower means answer that are more to the point and higher allows the model to be more creative. It is a good practice to try different values in order to
improve the model performance to meet your demands.
Top p: 0.95 for reasoning_effort="high". You can try different values but staying close should achieve best performance. Leave it to None (or 1.0) for reasoning_effort="none".
Benchmarks
Agentic Benchmarks
Mistral Medium 3.5 supersedes all our previous coding models, namely Devstral, across all benchmarks. It scores 91.4% on τ³-Telecom and 77.6% on SWE-Bench Verified. Due to its stronger agentic capabilities, Mistral Medium 3.5 replaces Devstral 2 in our coding agent, Vibe CLI.
Mistral agentic benchmark
Mistral agentic benchmark SWE-bench
Mistral agentic vs competiting models benchmark
Instruction Following, Reasoning, and Coding Benchmarks
We compared Mistral Medium 3.5 with competing models on instruction following, reasoning (math), and coding benchmarks. Thanks to its unified capabilities, it achieves strong results across all these tasks and Mistral Medium 3.5 is now powering Le Chat.
instruct reasoning and agentic benchmark
Usage
You can find Mistral Medium 3.5 support on multiple libraries for inference and fine-tuning.
We here thank every contributors and maintainers that helped us making it happen.
Mistral Medium 3.5 can be selected by starting vibe. If it is the first time you launch vibe, it will:
Create a default configuration file at ~/.vibe/config.toml.
Prompt you to enter your API key if it's not already configured.
Save your API key to ~/.vibe/.env for future use.
Now select mistral-medium-3.5 and start building !
Local server
If instead of pinging the Mistral API, you want to use a local vLLM server, you can do the following:
Spin up a vllm server as explained in Usage - vllm
Add the model configuration in ~/.vibe/config.toml:
toml
1display_name="Mistral Medium 3.5 (local vLLM)"2description="Mistral Medium 3.5 mode using local vLLM"3safety="neutral"45active_model="mistral-medium-3.5"# Make sure this is the only active_model entry6[[providers]]7name="vllm"8api_base="http://<your-host-url>:8000/v1"9api_key_env_var=""10backend="generic"11api_style="reasoning"1213[[models]]14name="mistralai/Mistral-Medium-3.5-128B"15provider="vllm"16alias="mistral-medium-3.5"17thinking="high"18temperature=0.719auto_compact_threshold=1680002021[tools.bash]22default_timeout=1200
Notes:
Make sure to overwrite <your-host-url> with your server's url.
Other inference backends are also supported. Please look at Mistral Vibe repo for more info.
Then restart vibe and "tab-shift" to "mistral-medium-3.5" mode.
Give it a try on some coding agentic tasks and start building some cool stuff !
[!Note]
For optimal performance, we recommend using the Mistral AI API if local serving is subpar.
[!Warning]
Make sure that frameworks relying on the Transformers configuration, including GGUF files, are up to date with the fixes introduced in this commit. Otherwise, you will experience subpar performance, especially in long-context sessions.
Mistral Medium 3.5 can follow your instructions to the letter.
python
1from datetime import datetime, timedelta
23from huggingface_hub import hf_hub_download
4from openai import OpenAI
56# Modify OpenAI's API key and API base to use vLLM's API server.7openai_api_key ="EMPTY"8openai_api_base ="http://localhost:8000/v1"910REASONING_EFFORT ="none"# Toggle reasoning with 'high'.1112match REASONING_EFFORT:13case"none":14 TEMP =0.115 TOP_P =None16case"high":17 TEMP =0.718 TOP_P =0.9519case_:20raise ValueError("Only REASONING_EFFORT in ['none', 'high'] are supported.")2122client = OpenAI(23 api_key=openai_api_key,24 base_url=openai_api_base,25)2627models = client.models.list()28model = models.data[0].id293031defload_system_prompt(repo_id:str, filename:str)->str:32 file_path = hf_hub_download(repo_id=repo_id, filename=filename)33withopen(file_path,"r")asfile:34 system_prompt =file.read()35 today = datetime.today().strftime("%Y-%m-%d")36 yesterday =(datetime.today()- timedelta(days=1)).strftime("%Y-%m-%d")37 model_name = repo_id.split("/")[-1]38return system_prompt.format(name=model_name, today=today, yesterday=yesterday)394041SYSTEM_PROMPT = load_system_prompt(model,"SYSTEM_PROMPT.txt")4243messages =[44{"role":"system","content": SYSTEM_PROMPT},45{46"role":"user",47"content":"Write me a sentence where every word starts with the next letter in the alphabet - start with 'a' and end with 'z'.",48},49]5051response = client.chat.completions.create(52 model=model,53 messages=messages,54 reasoning_effort=REASONING_EFFORT,55 temperature=TEMP,56 top_p=TOP_P,57)5859print("==============================================================")60print(f"Request with {REASONING_EFFORT=}, {TEMP=} and {TOP_P=}.")61print("==============================================================")62print("REASONING")63print("~~~~~~~~~")64print(response.choices[0].message.reasoning)65print("==============================================================")66print("CONTENT")67print("~~~~~~~")68print(response.choices[0].message.content)
Tool Call
Let's solve some equations thanks to our simple Python calculator tool.
python
1import json
2from datetime import datetime, timedelta
34from openai import OpenAI
5from huggingface_hub import hf_hub_download
67# Modify OpenAI's API key and API base to use vLLM's API server.8openai_api_key ="EMPTY"9openai_api_base ="http://localhost:8000/v1"1011REASONING_EFFORT ="none"# Toggle reasoning with 'high'.1213match REASONING_EFFORT:14case"none":15 TEMP =0.116 TOP_P =None17case"high":18 TEMP =0.719 TOP_P =0.9520case_:21raise ValueError("Only REASONING_EFFORT in ['none', 'high'] are supported.")2223client = OpenAI(24 api_key=openai_api_key,25 base_url=openai_api_base,26)2728models = client.models.list()29model = models.data[0].id303132defload_system_prompt(repo_id:str, filename:str)->str:33 file_path = hf_hub_download(repo_id=repo_id, filename=filename)34withopen(file_path,"r")asfile:35 system_prompt =file.read()36 today = datetime.today().strftime("%Y-%m-%d")37 yesterday =(datetime.today()- timedelta(days=1)).strftime("%Y-%m-%d")38 model_name = repo_id.split("/")[-1]39return system_prompt.format(name=model_name, today=today, yesterday=yesterday)404142SYSTEM_PROMPT = load_system_prompt(model,"SYSTEM_PROMPT.txt")4344image_url ="https://math-coaching.com/img/fiche/46/expressions-mathematiques.jpg"454647defmy_calculator(expression:str)->str:48returnstr(eval(expression))495051tools =[52{53"type":"function",54"function":{55"name":"my_calculator",56"description":"A calculator that can evaluate a mathematical expression.",57"parameters":{58"type":"object",59"properties":{60"expression":{61"type":"string",62"description":"The mathematical expression to evaluate.",63},64},65"required":["expression"],66},67},68},69{70"type":"function",71"function":{72"name":"rewrite",73"description":"Rewrite a given text for improved clarity",74"parameters":{75"type":"object",76"properties":{77"text":{78"type":"string",79"description":"The input text to rewrite",80}81},82},83},84},85]8687messages =[88{"role":"system","content": SYSTEM_PROMPT},89{90"role":"user",91"content":[92{93"type":"text",94"text":"Thanks to your calculator, compute the results for the equations that involve numbers displayed in the image.",95},96{97"type":"image_url",98"image_url":{99"url": image_url,100},101},102],103},104]105106response = client.chat.completions.create(107 model=model,108 messages=messages,109 tools=tools,110 tool_choice="auto",111 reasoning_effort=REASONING_EFFORT,112 temperature=TEMP,113 top_p=TOP_P,114)115116tool_calls = response.choices[0].message.tool_calls
117118results =[]119for tool_call in tool_calls:120 function_name = tool_call.function.name
121 function_args = tool_call.function.arguments
122if function_name =="my_calculator":123 result = my_calculator(**json.loads(function_args))124 results.append(result)125126messages.append({"role":"assistant","tool_calls": tool_calls})127for tool_call, result inzip(tool_calls, results):128 messages.append(129{130"role":"tool",131"tool_call_id": tool_call.id,132"name": tool_call.function.name,133"content": result,134}135)136137138response = client.chat.completions.create(139 model=model,140 messages=messages,141 reasoning_effort=REASONING_EFFORT,142 temperature=TEMP,143 top_p=TOP_P,144)145146print("==============================================================")147print(f"Request with {REASONING_EFFORT=}, {TEMP=} and {TOP_P=}.")148print("==============================================================")149print("REASONING")150print("~~~~~~~~~")151print(response.choices[0].message.reasoning)152print("==============================================================")153print("CONTENT")154print("~~~~~~~")155print(response.choices[0].message.content)
Vision Reasoning
Let's see if the Mistral Medium 3.5 knows when to pick a fight !
python
1from datetime import datetime, timedelta
23from openai import OpenAI
4from huggingface_hub import hf_hub_download
56# Modify OpenAI's API key and API base to use vLLM's API server.7openai_api_key ="EMPTY"8openai_api_base ="http://localhost:8000/v1"910REASONING_EFFORT ="high"# Remove reasoning with 'none'.1112match REASONING_EFFORT:13case"none":14 TEMP =0.115 TOP_P =None16case"high":17 TEMP =0.718 TOP_P =0.9519case_:20raise ValueError("Only REASONING_EFFORT in ['none', 'high'] are supported.")2122client = OpenAI(23 api_key=openai_api_key,24 base_url=openai_api_base,25)2627models = client.models.list()28model = models.data[0].id293031defload_system_prompt(repo_id:str, filename:str)->str:32 file_path = hf_hub_download(repo_id=repo_id, filename=filename)33withopen(file_path,"r")asfile:34 system_prompt =file.read()35 today = datetime.today().strftime("%Y-%m-%d")36 yesterday =(datetime.today()- timedelta(days=1)).strftime("%Y-%m-%d")37 model_name = repo_id.split("/")[-1]38return system_prompt.format(name=model_name, today=today, yesterday=yesterday)394041SYSTEM_PROMPT = load_system_prompt(model,"SYSTEM_PROMPT.txt")42image_url ="https://static.wikia.nocookie.net/essentialsdocs/images/7/70/Battle.png/revision/latest?cb=20220523172438"4344messages =[45{"role":"system","content": SYSTEM_PROMPT},46{47"role":"user",48"content":[49{50"type":"text",51"text":"What action do you think I should take in this situation? List all the possible actions and explain why you think they are good or bad.",52},53{"type":"image_url","image_url":{"url": image_url}},54],55},56]575859response = client.chat.completions.create(60 model=model,61 messages=messages,62 reasoning_effort=REASONING_EFFORT,63 temperature=TEMP,64 top_p=TOP_P,65)6667print("==============================================================")68print(f"Request with {REASONING_EFFORT=}, {TEMP=} and {TOP_P=}.")69print("==============================================================")70print("REASONING")71print("~~~~~~~~~")72print(response.choices[0].message.reasoning)73print("==============================================================")74print("CONTENT")75print("~~~~~~~")76print(response.choices[0].message.content)
SGLang
Serve Mistral Medium 3.5 with the SGLang library for production-ready inference.
[!Note]
To speed up local inference using SGLang, check out our released EAGLE model.
Installation
Day-zero support ships in dedicated docker tags:
docker pull lmsysorg/sglang:dev-mistral-medium-3.5 # H100 / H200 (Hopper, CUDA 12.9)
docker pull lmsysorg/sglang:dev-cu13-mistral-medium-3.5 # B200 / B300 (Blackwell, CUDA 13.0)
1import torch
2from transformers import AutoProcessor, Mistral3ForConditionalGeneration
345REASONING_EFFORT ="high"# Remove reasoning with 'none'.67match REASONING_EFFORT:8case"none":9 TEMP =0.110 TOP_P =1.011case"high":12 TEMP =0.713 TOP_P =0.9514case_:15raise ValueError("Only REASONING_EFFORT in ['none', 'high'] are supported.")1617model_id ="mistralai/Mistral-Medium-3.5-128B"1819processor = AutoProcessor.from_pretrained(model_id)20model = Mistral3ForConditionalGeneration.from_pretrained(21 model_id, device_map="auto"22)2324image_url ="https://static.wikia.nocookie.net/essentialsdocs/images/7/70/Battle.png/revision/latest?cb=20220523172438"2526messages =[27{28"role":"user",29"content":[30{31"type":"text",32"text":"What action do you think I should take in this situation? List all the possible actions and explain why you think they are good or bad.",33},34{"type":"image_url","image_url":{"url": image_url}},35],36},37]383940inputs = processor.apply_chat_template(messages, return_tensors="pt", tokenize=True, return_dict=True, reasoning_effort=REASONING_EFFORT)41inputs = inputs.to(model.device)4243output = model.generate(44**inputs,45 max_new_tokens=1024,46 do_sample=True,47 temperature=TEMP,48 top_p=TOP_P,49)[0]5051# Setting `skip_special_tokens=False` to visualize reasoning trace between [THINK] [/THINK] tags.52decoded_output = processor.decode(output[len(inputs["input_ids"][0]):], skip_special_tokens=False)53print(decoded_output)
You must not use this model in a manner that infringes, misappropriates, or otherwise violates any third party’s rights, including intellectual property rights.