
Mistral AI has published mistralai/Leanstral-2603 on Hugging Face under an Apache 2.0 license, introducing what the company describes as the first open-source code agent built specifically for the Lean 4 proof assistant. Released within the Mistral Small 4 family, the model—also labeled Leanstral 119B A6B—targets formal mathematical verification and software specification workflows rather than general-purpose code completion alone.
Core announcement and formal verification scope
According to the official Hugging Face model card published November 24, 2026, Leanstral 119B A6B is tailored for proof engineering scenarios in Lean 4, a formal proof assistant used to express advanced mathematical structures such as perfectoid spaces as well as software specifications including properties of Rust code fragments. Rather than acting purely as a standalone text generator, the release is positioned as a proof agent capable of iterative reasoning, system prompt adherence, and external tool invocation.
In its release documentation, Mistral AI characterizes Leanstral as offering speed-optimized performance and cost efficiency compared with closed-source alternatives, though the model card excerpt itself does not present independent benchmark tables or third-party evaluation scores. As a result, practitioners assessing accuracy on theorem proving or repository-scale formalization must rely on direct testing against target Lean 4 codebases rather than published comparative metrics.
Mixture-of-Experts architecture and technical specifications
Under the hood, Leanstral-2603 uses a sparse Mixture-of-Experts (MoE) design comprising 128 total experts with 4 experts activated per token. Out of 119 billion total parameters, 6.5 billion parameters are active during each forward pass, allowing the model to balance a large parameter footprint with lower per-token compute requirements than a dense model of equivalent size.
The model supports a maximum context window of 256,000 tokens, though Mistral recommends operating at or below 200,000 tokens in practice. Beyond text, Leanstral accepts image inputs alongside text prompts to produce text outputs, enabling vision-assisted workflows where diagrams, handwritten derivations, or visual artifacts accompany formal queries. Multilingual coverage spans 11 listed languages: English, French, Spanish, German, Italian, Portuguese, Dutch, Chinese, Japanese, Korean, and Arabic.
For inference control, Mistral specifies a recommended sampling temperature of 1.0 and exposes a configurable reasoning_effort parameter. Setting reasoning_effort to none bypasses explicit reasoning tokens for faster responses, whereas setting it to high enables extended reasoning traces recommended for complex proof tasks. In its reference Python client example using the OpenAI-compatible SDK, Mistral pairs temperature=1.0 and reasoning_effort="high" with a 32,000-token output limit and reads both message.content and message.reasoning.
Mistral Vibe workflows and vLLM server integration
To bring the agent into day-to-day Lean 4 development, Mistral integrates Leanstral directly with Mistral Vibe (version 2.5.0 or newer, installable via uv pip install mistral-vibe --upgrade). Running the /leanstall command inside Vibe registers leanstral as an additional model, installs the associated LEAD.md system prompt, and enables Leanstral as a subagent. Developers can then cycle modes with tab+shift to enter a dedicated lean mode and run tasks against Lean projects such as PrimeNumberTheoremAnd.
For teams preferring local or self-hosted inference over the Mistral AI API, the model card recommends production deployment via nightly builds of vllm (which bundle mistral_common 1.11.0 or higher) or a prebuilt Docker image. Mistral's reference launch command configures vllm serve mistralai/Leanstral-2603 with --max-model-len 200000, --tensor-parallel-size 4, the FLASH_ATTN_MLA attention backend, --tool-call-parser mistral, --enable-auto-tool-choice, and --reasoning-parser mistral.
Developers connecting Mistral Vibe to a local vLLM endpoint can define a custom ~/.vibe/agents/lean.toml profile pointing to port 8000, configured with reasoning_field_name = "reasoning_content", thinking = "high", an auto-compaction threshold of 168,000 tokens, and a 1,200-second bash tool timeout. In programmatic pipelines, tool calling allows the model to invoke functions such as lean_run_code to compile and evaluate Lean 4 inductive types and state transitions rather than guessing compiler outcomes.
Serving caveats, hardware footprint, and licensing boundaries
Despite publishing open weights under the permissive Apache 2.0 license—allowing both commercial and non-commercial deployment—Mistral includes a notable operational caveat in its deployment guide. Specifically, the company advises users to fall back to the Mistral AI API if local serving produces subpar results, signaling that tokenizer, reasoning-parser, or tool-call alignment in self-hosted stacks may still be sensitive to exact runtime versions.
Ecosystem support outside vLLM remains incomplete at launch. According to the model card, integration with Hugging Face transformers (requiring installation from the main branch) and SGLang are both listed as work in progress pending pull requests. Furthermore, although sparse activation limits per-token compute to 6.5 billion parameters, hosting all 119 billion parameters across 128 experts at 200,000-token context lengths still demands substantial multi-GPU memory, reflected in Mistral's four-way tensor-parallel vLLM configuration.
For formal methods researchers, Rust verification engineers, and AI infrastructure teams, Leanstral-2603 marks a concrete step toward inspectable, agentic theorem-proving models. Its real-world utility will depend on how reliably local vLLM deployments match hosted API behavior and how effectively the model handles full-project Lean 4 dependencies beyond isolated proof snippets.
Automated Vertex AI (gemini-4-hydrogen) primary-source report; reviewed 2026-11-24.



