Models

Atlas with Codestral 22B (Ollama): 32K Context and a License Gate in 2026

Updated 6 min read

Codestral 22B (Ollama) is Mistral AI's dedicated code model: 13GB of weights, a context window of 32K tokens (32,768), and fluency across a very wide spread of languages. Inside Atlas it slots neatly onto a 16GB card between the 14B and 32B tiers. Pricing is Free (self-hosted), non-commercial license, and that license is the one thing to check before you deploy it. It is a legal gate, not a technical one.

What is the Codestral 22B license restriction?

Codestral 22B (Ollama) ships under a Mistral non-commercial license, so it is not a drop-in for commercial production work. Pricing reads Free (self-hosted), non-commercial license, and that second clause is a legal gate, not a technical one. Read the terms before you standardize on it.

Codestral 22B is the one model in this lineup where the blocking question is not memory. The weights download and run exactly like any other Ollama tag, and nothing in the runtime will stop you. What stops you is the license. Before wiring codestral:22b into a work machine, read the Mistral non-commercial license terms and confirm your use case qualifies. That is step two of the setup for a reason. If the answer is no, the technical merits of the model are irrelevant and you should be looking elsewhere.

What is Codestral 22B best at inside Atlas?

Codestral 22B (Ollama) has very broad language coverage, which shows on infrastructure code, Terraform, SQL, and shell, where code models often thin out. At 13GB with a 32K token (32,768) window, it handles the polyglot edges of a repository that a Python-heavy model fumbles.

Infrastructure code is the underserved case in most code models, and Codestral 22B is unusually fluent there. Terraform, SQL, and shell all show up constantly in real repositories and rarely dominate a training mix, so a model that handles them is worth noticing. Inside Atlas that breadth pairs with tree-sitter AST indexing and hybrid semantic plus keyword retrieval fused by reciprocal rank fusion, so the agent can find the right block of Terraform and Codestral 22B can actually edit it. Set model to ollama/codestral:22b, verify with atlas models ollama, and favorite it in the /models dialog.

How much VRAM does Codestral 22B need?

Codestral 22B (Ollama) is 13GB of weights and roughly 15GB to serve, which slots neatly onto a 16GB card between the 14B and 32B tiers. Pull it with ollama pull codestral:22b, which is aliased to :latest.

The 16GB tier is the sweet spot Codestral 22B occupies. Below it, 14B models leave capability on the table for anyone with a 16GB card. Above it, 32B models demand 24GB. At roughly 15GB to serve, Codestral 22B fills the gap almost exactly. Register codestral:22b in the atlas.json ollama models map with limit.context 32768 and limit.output 8192, which gives the model room to emit a substantial diff. Run the codebase index on Ollama embeddings so the whole pipeline, embed, retrieve, generate, diff, executes locally.

Is a 32K context enough for agentic coding?

Codestral 22B (Ollama) offers 32K tokens (32,768), double the 16K of the older CodeLlama and DeepSeek Coder lines at a comparable footprint. For most Atlas sessions that is enough headroom to carry a plan, retrieved code, and a tool transcript without constant compaction.

Doubling the window from 16K to 32K tokens (32,768) is the difference between an agent that compacts every few turns and one that mostly does not. Codestral 22B gets that at 13GB, which is competitive with the older lines it replaces. It is not a long-context model, though: 32K is a working budget, not an unlimited one, so retrieval discipline still matters. Let Atlas fetch tree-sitter declarations rather than whole files. Note also that Mistral's own devstral is the newer agentic-coding model from the same lab, with a 128K window at a similar size.

When should you pick a different model than Codestral 22B?

Pick a different model than Codestral 22B (Ollama) if your work is commercial, because the Mistral non-commercial license blocks it. Mistral's own devstral is the newer agentic-coding model from the same lab, with a 128K window at a similar size, so that is the natural comparison.

Codestral 22B has two exits. The first is legal: the non-commercial license means it is not a drop-in for commercial production work, and no technical strength overcomes that. The second is architectural: devstral is newer, built for agentic coding, and carries a 128K window at a similar size, which is four times the 32K tokens (32,768) Codestral 22B gives you. If neither exit applies, Codestral 22B remains a strong 16GB-tier choice with unusually broad language coverage. Atlas lets you switch the active model and provider on the fly with favorites and recents, so keep the alternative registered.

Setup

  1. 01Pull it: ollama pull codestral:22b (13GB, aliased to :latest).
  2. 02Read the Mistral non-commercial license terms and confirm your use case qualifies before wiring it into a work machine.
  3. 03Add codestral:22b to the ollama models map in atlas.json with limit.context 32768 and limit.output 8192.
  4. 04Set model to ollama/codestral:22b, verify with atlas models ollama, and favorite it in the /models dialog.
  5. 05Run the codebase index on Ollama embeddings so the entire pipeline (embed, retrieve, generate, diff) executes locally.

Frequently asked questions

can i use codestral 22b commercially
Codestral 22B ships under a Mistral non-commercial license, so it is not a drop-in for commercial production work. Read the license terms and confirm your use case qualifies before wiring it into a work machine.
how to run codestral 22b with atlas
Run ollama pull codestral:22b (13GB, aliased to :latest), add codestral:22b to the ollama models map in atlas.json with limit.context 32768 and limit.output 8192, then set model to ollama/codestral:22b and verify with atlas models ollama.
how much vram does codestral 22b need
Roughly 15GB to serve against 13GB of weights, which slots neatly onto a 16GB card between the 14B and 32B tiers.
what is the context window of codestral 22b
Codestral 22B (Ollama) has a 32K token (32,768) context window, double the 16K of the older CodeLlama and DeepSeek Coder lines at a comparable footprint.
codestral vs devstral for coding agents
Mistral's devstral is the newer agentic-coding model from the same lab, with a 128K window at a similar size. Codestral 22B gives 32K tokens (32,768) and carries a non-commercial license.
best local model for terraform and sql
Codestral 22B (Ollama) has very broad language coverage, which shows on infrastructure code such as Terraform, SQL, and shell, where code models often thin out.
is codestral 22b free
Pricing is Free (self-hosted), non-commercial license. There is no per-token cost, but the license restricts commercial production use.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Atlas for Laravel in 2026

Atlas is a terminal-native AI coding agent for Laravel in 2026. Run it in a Laravel app with an artisan file, add a controller or Pest test, and review the diff.

Atlas for Astro: Islands, Content Collections, and Zero JS by Default in 2026

Atlas is a terminal-native AI coding agent for Astro in 2026. It reads astro.config.mjs, src/pages, and content collection schemas, drops needless client:load directives, and runs astro check.

Self-Review Your Working Diff Before Committing with Atlas (2026 Workflow)

How to self-review your working diff before committing with Atlas in 2026: bash produces the diff, read checks each file, grep finds leftovers, session revert undoes bad edits.

Atlas for TypeScript in 2026

In 2026, TypeScript developers leverage Atlas, the terminal-native AI coding agent, to enhance productivity. Atlas understands your types, ensures code quality, and offers robust safety features.

Atlas vs Codebuff: Terminal AI Coding Agents in 2026

Atlas and Codebuff are terminal AI coding agents for 2026. Compare Atlas's terminal-native TUI, permission-gated tools, and diff review with Codebuff's multi-agent system and flexible pricing.

Atlas for COBOL: Copybooks, PIC Clauses, and GnuCOBOL in 2026

Atlas is a terminal-native AI coding agent for COBOL in 2026. It reads your divisions and copybooks, explains a paragraph before touching it, and compiles with cobc under GnuCOBOL.

Atlas for Go in 2026

Atlas, the terminal-native AI coding agent, empowers Go developers in 2026 with intelligent code understanding, safe refactoring, and robust testing capabilities.

Atlas for Gin in 2026

Atlas is a terminal-native AI coding agent for Gin in 2026. It reads router groups and binding tags, then runs go test ./... -race behind a permission prompt.

Browse this resource hub