# Atlas with Devstral Medium (2507): Agent-Trained Frontier Coding in 2026

> Devstral Medium (2507) reads 128,000 tokens and writes 128,000 tokens at $0.40 / 1M input tokens, with agent-first training on OpenHands, Cline, and Aider.

Devstral Medium (2507) is the bigger half of Mistral's July 2025 Devstral release: the same agent-first training as Devstral Small, the same 128,000 token symmetric limits, but a larger model behind it at $0.40 / 1M input tokens and $2.00 / 1M output tokens. Inside Atlas it plans multi-step tool sequences rather than one-shotting a file, which is what repo-level work actually needs. The catch is that the Medium weights are not open, so there is no self-hosted escape hatch.

## Key takeaways

- Devstral Medium (2507) is the larger half of Mistral's July 2025 Devstral release, priced at $0.40 / 1M input tokens and $2.00 / 1M output tokens.
- Agent-trained on OpenHands, Cline, and Aider, so it plans multi-step tool sequences rather than one-shotting a file.
- 128,000 tokens of context and 128,000 tokens of output, enough to read a service and rewrite it in the same turn.
- 4x the input price of Devstral Small, but it closes most of the gap to general frontier models on repo-level tasks.
- The Medium weights are not open, so unlike Devstral Small there is no self-hosted escape hatch.

## What makes Devstral Medium (2507) different from a general frontier model?

Devstral Medium (2507) is agent-trained on real coding scaffolds (OpenHands, Cline, Aider), so it plans multi-step tool sequences rather than one-shotting a file. At $0.40 / 1M input tokens it is 4x the input price of Devstral Small but closes most of the gap to general frontier models on repo-level tasks.

The behavioral difference shows up in the first three turns of an Atlas session. A general frontier model tends to guess at a fix and write it. Devstral Medium (2507) tends to look first: read the caller, read the test, then edit. That sequencing is what agent training buys, and it maps directly onto how Atlas works, since Atlas computes a unified diff for every file edit and surfaces it for approval before writing. A model that has internalised the tool loop produces diffs you approve rather than diffs you argue with.

## How much does Devstral Medium (2507) cost to run in Atlas?

Devstral Medium (2507) costs $0.40 / 1M input tokens and $2.00 / 1M output tokens. The output rate is 6x Devstral Small's $0.30, and that is felt on long agentic runs with many write turns, so the output side is where an Atlas bill on Devstral Medium actually grows.

Input at $0.40 / 1M input tokens is not the problem. Output at $2.00 / 1M output tokens is, because agentic sessions write a lot: patches, retries, and explanations of patches. The lever Atlas gives you is the two-slot config. Pin `"model": "mistral/devstral-medium-2507"` and `"small_model": "mistral/devstral-small-2507"` so subagents run on the cheap Devstral at $0.30 / Mtok output while the Medium model handles the turns that matter. Atlas fans out work to subagents that can run in the foreground or in parallel background sessions, and every one of those routed to Small is money not spent at $2.00.

## Can Devstral Medium (2507) read a service and rewrite it in the same turn?

Yes. Devstral Medium (2507) carries 128,000 tokens of context and 128,000 tokens of output, which is enough to read a service and rewrite it in the same turn. The symmetric budget means a large patch is not clipped halfway through the diff.

Symmetry is the practical feature. Atlas can load a service, its interface, and its tests into the 128,000 token input window, and Devstral Medium (2507) can return the whole rewrite without hitting a wall on the output side. To make that window count, feed it precisely: Atlas indexes code by AST declarations using tree-sitter, not blind line windows, so what lands in context is real declarations, not arbitrary slices around a grep hit. A 128,000 token window filled with the right declarations beats a larger window filled with noise, and it costs less at $0.40 / 1M input tokens.

## Why does Devstral Medium (2507) have no self-hosting option?

Unlike Devstral Small, the Devstral Medium (2507) weights are not open, so there is no self-hosted escape hatch. Teams that need to keep source on their own hardware have to stay on Devstral Small, which ships Apache 2.0 weights, or accept the API dependency.

This is the honest cost of moving up the Devstral tier. Devstral Small (2507) can be pulled locally, audited, and archived. Devstral Medium (2507) cannot. For a team under a data residency or air-gap requirement, that closes the question regardless of how good the model is. Atlas softens the dependency where it can: Atlas can build its code index with local Ollama embeddings, keeping code off third-party servers, so at least the retrieval layer stays in-house even when generation does not. But the model calls themselves go to Mistral, and that has to be acceptable before you pin Devstral Medium (2507).

## When should an Atlas user pick Devstral Small over Devstral Medium (2507)?

Pick Devstral Small over Devstral Medium (2507) for long agentic sessions with many write turns, because $2.00 / 1M output tokens is 6x Devstral Small's output rate. Pick Devstral Small too when open weights matter, since Devstral Medium (2507) has no self-hosted option.

Devstral Medium (2507) earns its price on hard repo-level tasks: multi-step tool sequences, cross-file changes, and work where a wrong plan is expensive. It does not earn its price on a stream of small scoped edits, which Devstral Small handles at a fraction of the output cost. The workflow that gets the best of both: let Atlas's plan agent scope the work on Devstral Medium (2507), then hand the plan to the build agent to keep expensive output tokens focused. Atlas drafts a plan in a read-only plan agent and asks before switching to a build agent, so that split is native, not a hack.

## Setup

1. Export MISTRAL_API_KEY before launching Atlas.
2. Confirm devstral-medium-2507 with `atlas models mistral`.
3. Pin `"model": "mistral/devstral-medium-2507"` and `"small_model": "mistral/devstral-small-2507"` so subagents run on the cheap Devstral.
4. Let Atlas's plan agent scope the work first, then hand the plan to the build agent to keep expensive output tokens focused.
5. Review each unified diff before approving: at $2.00 / 1M output tokens, a rejected patch is the costliest turn in the session.

## FAQ

### how much does devstral medium 2507 cost

Devstral Medium (2507) costs $0.40 / 1M input tokens and $2.00 / 1M output tokens. The output rate is 6x Devstral Small's, which is felt on long agentic runs with many write turns.

### what is the context window of devstral medium 2507

Devstral Medium (2507) has 128,000 tokens of context and 128,000 tokens of output, enough for Atlas to read a service and rewrite it in the same turn without the patch being clipped.

### is devstral medium open weights

No. Unlike Devstral Small, the Devstral Medium (2507) weights are not open, so there is no self-hosted escape hatch. Teams that need local inference should stay on Devstral Small, which ships Apache 2.0 weights.

### how do I configure devstral medium 2507 in atlas

Export MISTRAL_API_KEY, confirm devstral-medium-2507 with `atlas models mistral`, then pin `"model": "mistral/devstral-medium-2507"` and `"small_model": "mistral/devstral-small-2507"` in atlas.json so subagents run on the cheap Devstral.

### devstral medium vs devstral small for a coding agent

Devstral Medium (2507) is 4x the input price of Devstral Small but closes most of the gap to general frontier models on repo-level tasks. Devstral Small is the better pick for long sessions of small edits and for anyone who needs open weights.

### is devstral medium better than a general frontier model for repos

Devstral Medium (2507) is trained agent-first on real coding scaffolds like OpenHands, Cline, and Aider, so it plans multi-step tool sequences instead of one-shotting a file. On repo-level tasks it closes most of the gap to general frontier models.

### how do I keep devstral medium output costs down in atlas

Let Atlas's plan agent scope the work first, then hand the plan to the build agent, and route subagents to `"small_model": "mistral/devstral-small-2507"`. That keeps the $2.00 / 1M output tokens rate focused on turns that actually write code.

---

Canonical HTML: https://runatlas.sh/resources/models/devstral-medium-2507
Source of truth: aeo_pages row `/resources/models/devstral-medium-2507` (segment: Models) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
