Skip to main content
Lesson 14 of 14 · Codestral and Coding Agents: From Devstral to Vibe Code

Choosing Your Coding Tool at Mistral

Lesson 14 of 14 Updated November 2, 2026 Developer
On this page
  1. The decision tree
  2. Comparison table
  3. Real‑world scenarios
  4. Mistakes to avoid
  5. Course recap
  6. Key takeaways
  7. Test your knowledge

Lesson rewritten November 2, 2026. This lesson previously compared Codestral to Devstral 2, which was removed from the API on July 31, 2026. Your choices now are Codestral for completion, general-purpose models or Vibe Code for agentic work, and Devstral Small 2 for local hosting. Sources: Codestral, Codestral Embed, Mistral Small 4 · Using offline models (Vibe).

The decision tree

You now know Mistral AI’s coding building blocks. The remaining question is which one to plug into a real project. The order of your questions matters: start with the ones that eliminate the most options, and stop at the first yes.

1. Do you want autocomplete in your editor? The answer is Codestral (codestral-2508) via the FIM endpoint: this is its home turf, with low latency and integrations like Continue.dev (Lessons 2 and 9).

2. Do you want to hand off an entire task across multiple files? Use an agent. For an off‑the‑shelf agent, Vibe Code (CLI, VS Code extension, or Vibe Code Web) provides the tools, the loop, and approvals, with Mistral Medium 3.5 as the built‑in model. For a custom agent, build on the API with Mistral Small 4, and benchmark Mistral Large 4 on your hardest cases (Lessons 6 and 8).

3. Must code never leave your infrastructure? Host an open model: Devstral Small 2 or Mistral Small 4, the two models Vibe’s documentation recommends for local use, served by vLLM and connected to Vibe (Lesson 13). Codestral has no published open weights.

4. Are you searching a codebase by meaning? That’s the job of Codestral Embed (codestral-embed-2505), the code‑specialized embeddings model (Lesson 11).

5. Are you generating a targeted function or module? Codestral via the chat endpoint works for quick generation; a generalist like Small 4 takes over when you need to reason over more context or iterate.

Comparison table

CriterionCodestralAgents (Small 4, Large 4, Vibe Code)Devstral Small 2 (local)Codestral Embed
Identifiercodestral-2508mistral-small-2603, mistral-large-4-0; Medium 3.5 in Vibemistralai/Devstral-Small-2-24B-Instruct-2512codestral-embed-2505
StatusGASmall 4 GA, Large 4 Public Preview, Medium 3.5 deprecatedRemoved from API, open weightsGA
SpecialtyCompletion, FIM, generationMulti‑file agentic tasksOffline coding agentSemantic search in code
FIM endpointYesNoNoNo
Tool callingYesYesYes (with suitable vLLM options)No
Context128,000 tokens256,000 (Small 4) to 1,000,000 (Large 4)256,000 tokens (depends on your server)8,000 tokens
Price (per million tokens)$0.30 input, $0.90 outputSmall 4: $0.15 / $0.60; Large 4: $0.70 / $2.10Your hardware cost$0.15 input

Two rows settle almost every team debate: “FIM endpoint” for autocomplete, and each model’s status so you know what will still be around in six months. Prices and statuses as of November 2, 2026.

Real‑world scenarios

A solo Python developer combines rather than chooses: Codestral via Continue.dev for type‑ahead autocomplete, and Vibe Code in the terminal to “fix this bug across five files and add the tests.”

A team under confidentiality constraints serves Devstral Small 2 or Mistral Small 4 on its own GPUs, connects Vibe to it, and turns off telemetry and updates. The pitch to a security committee is one sentence: no line of code leaves the building.

A continuous integration pipeline chains the pieces from Lesson 12: Codestral Embed finds the relevant files, Codestral generates the code, a generalist performs the review; or vibe --prompt runs an agentic task without interaction.

A data scientist in Jupyter only needs Codestral, for cell completion and generating visualizations.

Mistakes to avoid

The most common mistake is handing autocomplete to an agent: too slow, and no FIM. The mirror error is asking a completion model to handle a multi‑file task without an agentic loop to orchestrate it. Third mistake: skipping Codestral Embed, because a generation pipeline will still run, just with mediocre results due to missing relevant context. Fourth mistake, increasingly common in 2026: keeping removed identifiers (devstral-2512, devstral-small-latest) or deprecated ones without a migration date in your code. Pin dated identifiers, and check the model table before every update.

Course recap

This course took you from completion to agentic work: Codestral, its FIM mode and API; coding agents, their cycle (understand, plan, execute, verify), tool calling, and multi‑turn loops; evaluation with SWE‑bench and on your own tickets; Vibe Code and its three surfaces; Codestral Embed and semantic search; editor integrations; automated pipelines; and local hosting of Devstral Small 2 with vLLM.

Key takeaways

  • Codestral for autocomplete (FIM) and targeted generation
  • Vibe Code or an API agent (Small 4, Large 4) for multi‑file tasks
  • Devstral Small 2 or Small 4 locally when code must not leave your environment
  • Codestral Embed for semantic search in code
  • Check each model’s status: Devstral is removed from the API, Medium 3.5 is deprecated

Test your knowledge

1. What is Fill‑In‑The‑Middle (FIM)?

Answer: Completion in the middle of code: you provide the prefix and suffix, and Codestral fills the gap. This is the natural mode for editor autocomplete, served by the FIM endpoint.

2. Devstral 2 is removed from the API: what replaces it?

Answer: The designated replacement is Mistral Medium 3.5, the model built into Vibe Code, but it is itself deprecated (removal on April 30, 2027). For an API agent, start with Mistral Small 4 and benchmark Large 4; locally, Devstral Small 2 remains recommended.

3. How do you use Codestral in your IDE?

Answer: Through integrations: Continue.dev for VS Code and JetBrains, Tabnine, Jupyter AI, and others. Codestral completion appears as you type, inside your existing tools.

4. What is Codestral Embed for?

Answer: Code‑specialized embeddings: semantic search across a codebase and similarity detection. It’s the retrieval piece of automated coding pipelines.

5. How do you connect Vibe to a model you host yourself?

Answer: By declaring an OpenAI‑compatible provider (or the built‑in llamacpp provider) and a model preset in config.toml, then selecting it with active_model or /model. For offline use, also disable telemetry and update checks.