← All posts

Why Mistral

A France-based frontier-model lab, plugged into OpenCode. What makes it a credible EU alternative to Claude/GPT/Gemini for authoring code, and where the trade-offs are.


The third leg of johnie.eu's stack is the model that writes the code. If the code lives on Codeberg and runs on bunny.net but the authoring model sits with a US lab, the EU story breaks at build time. I wanted no US LLM provider in the build pipeline.

That answer turned out to be Mistral AI, driven from the terminal through OpenCode.

Mistral, briefly

Mistral

Mistral AI is a Paris-based frontier-model lab founded in 2023 by former DeepMind and Meta researchers. They ship a hosted API (La Plateforme), a chat product (Le Chat), and a model lineup that spans general-purpose (mistral-large, mistral-medium) and code (Devstral). The company matters here for two reasons: it is European, and it has a real open-weights track. Models like Mistral 7B, Mixtral 8x7B, and Devstral ship under Apache 2.0 on Hugging Face, which means there is still an exit if the hosted API stops being the right answer.

Why over Claude, ChatGPT, Gemini, or Copilot

Claude and ChatGPT still lead on the hardest coding tasks; Gemini is in the same conversation. The case for Mistral is simpler: it is good enough for what I ship from this site, and the jurisdiction is right.

In rough order of how much they moved the needle:

  • Jurisdiction. Anthropic, OpenAI, Google, and Microsoft (the parent of GitHub Copilot) are all US-incorporated companies subject to the CLOUD Act. Every prompt and every snippet of code you send their way is reachable by US authorities regardless of which region the API endpoint claims. Mistral is a French société par actions simplifiée operating under French and EU law, including the EU AI Act and GDPR. For a project whose point is "what does an honestly-EU stack look like?", that's structural, not cosmetic.
  • Open weights as a fallback. Devstral, Mistral's code-focused model family, ships with weights you can download. If La Plateforme ever turned into something I didn't want to use, I could run Devstral locally via Ollama or vLLM on a Hetzner GPU box and my workflow would keep functioning. No equivalent escape hatch exists with Claude, GPT, or Gemini.
  • Training-data position. Mistral's terms for La Plateforme are clear that paid API inputs are not used to train models by default. The US labs have all moved in this direction too, but Mistral's position has been consistent from the start, not a response to enterprise pressure.
  • No existing US-vendor lock-in to perpetuate. Choosing Claude or GPT for personal tooling makes the US AI duopoly a bit stronger. Choosing Mistral sends a euro of paid usage to the European lab, the open-weights program, and the European AI ecosystem the European Alternatives directory keeps trying to surface.

If you do not care about jurisdiction, these points will not move you on their own. For this site, together, they were enough.

How I use it: OpenCode plus the Mistral API

I use Mistral through OpenCode, an open-source terminal coding agent from the team behind SST. OpenCode is provider-neutral, so the workflow stays the same whether you point it at Mistral, Anthropic, OpenAI, Google, xAI, DeepSeek, or a local Ollama model.

The setup is short: get a token from La Plateforme, run opencode auth login, choose Mistral, paste the token. After that it is the usual CLI agent loop: file reads and writes, shell commands, and git operations. For day-to-day work on this site, that is enough.

I like the combination because both halves stay open. OpenCode is open-source and provider-agnostic. Mistral ships open weights. If one side stops being the right fit, I still have a path out.

Mistral also ships its own CLI, mistral-vibe, which works well. I stayed with OpenCode because provider-neutrality matters more to me than first-party polish.

What runs where

Mistral is not part of this site's runtime. Visiting johnie.eu does not call a model. There is no chat widget, no completion endpoint, and no per-request inference. Mistral only shows up when I am writing code, which means the only person sending data to that API is me.

Trade-offs, honestly

  • Capability gap on the hardest tasks. Anthropic and OpenAI still win more often on long, messy coding loops. SWE-bench Verified and the Aider leaderboard are the public scoreboards worth checking before you decide the gap is small enough for your work.
  • Smaller integration ecosystem. Cursor, Copilot, Windsurf, and most "AI IDE" products default to Anthropic or OpenAI. You can usually point them at Mistral with some wiring, but the documentation and examples assume US providers. OpenCode is the cleanest exception I've found; it treats Mistral as a first-class option, not a configuration footnote.
  • OpenCode is younger than Claude Code or Codex CLI. Rough edges still show.
  • Smaller context windows. Devstral Medium tops out at 128k tokens; Claude Sonnet runs 200k–1M and GPT-5 sits at 200k+. Fine for normal agent loops, tight if you paste in a whole monorepo.
  • Most docs assume a US provider. You still spend time translating examples.

Closing the EU loop on the model

The pattern matches the bunny.net and Codeberg posts: a US default, a credible EU alternative, and a few trade-offs you have to accept. In this case the trade-off is model quality on the hardest tasks. For a personal site and a small set of side projects, the gap is small enough that the jurisdiction is worth it.

What I got

The code that runs johnie.eu is authored through a French model, driven by an open-source CLI, with an open-weights fallback if I ever need it. The site itself never calls a model.

If you use Claude Code or Copilot and want to know whether the European version is real yet, it is. The honest test is one real PR end-to-end — pick a task you'd normally hand to Claude Code, run it through OpenCode pointed at Mistral, and see what falls out.