Skip to content
OTFotf
All posts

MiniMax M3: million-token context just got cheap — here's how to put it in your agent

D
DaveAuthor
6 min read
MiniMax M3: million-token context just got cheap — here's how to put it in your agent

MiniMax teased the M3, and the headline is one most of us have been waiting for: million-token context that is actually cheap to run. The architecture behind it — sparse attention done right — is a genuinely hard problem, and MiniMax says M3 is built to make ultra-long-context agent deployment economically viable. If you write code with an agent, this is good news. Full stop.

Agentic coding is expensive for one specific reason: the agent re-reads a huge context every single turn. Prefill and decode over a long window is where the bill comes from. M3 attacks exactly that — and early reports priced it to match, with list pricing circulating at announcement time. Treat all launch pricing as provisional: check the current price sheet before budgeting, because pre-release numbers move.

Let us give credit, show you how to wire the M-series into your agent, and then talk about the part that does not change when the model does.

a clay developer happily plugging a glowing model chip into a laptop, warm celebratory moo

MiniMax earned this one

This is not a lab dropping a benchmark and vanishing. The M-series has a track record. The open-source MiniMax-M2 is a compact Mixture-of-Experts model — 230 billion total parameters with 10 billion active — explicitly "built for Max coding and agentic workflows," with the team claiming top open-source standing on general intelligence composites and strong showings on terminal and SWE-style coding evaluations (MiniMax-M2 on GitHub). That is not a toy.

The detail that should earn your trust: MiniMax pulled efficient attention from M2 because it was not production-ready yet, and reintroduced a sparse-attention design only now, in M3, with a custom sub-quadratic framework the company says yields up to 15.6 times faster decoding at million-token context (VentureBeat). Shipping a hard optimization, pulling it when it is not good enough, then shipping it again when it is — that is engineering discipline, not a hype cycle. Respect it.

Takeaway: the team has shipped cheap, open, capable models before. M3 is the next step on a real line, not a cold start.

What sparse attention actually buys you

The new piece is MiniMax Sparse Attention. Instead of attending densely across the entire context every turn, a lightweight index branch first selects which past key-value blocks matter, and sparse attention runs only on those (VentureBeat). It operates on real, uncompressed key-value data rather than a compressed latent space — less information thrown away, in principle.

Why you care: that is the difference between "1M context exists on the spec sheet" and "1M context is affordable to actually use on every turn of an agent loop."

MiniMax's own figures put decoding at up to 15.6 times faster at a 1,000,000-token context versus the predecessor. Those are vendor speed numbers, not independent benchmarks — and quality retention at long context is the thing to watch as independent evaluations land. But the direction is unambiguous: long context is getting cheap.

Takeaway: sparse attention is aimed squarely at the agentic, whole-codebase regime — the exact place token cost dominates your bill.

11 production screens. Login and database wired.

The SaaS Dashboard Kit includes login, a database, and a working dashboard. Live demo at saas.otf-kit.dev.

See the live demo

How to put it in your agent

Here is the part most write-ups skip. MiniMax keeps one access surface across model generations, so you can wire up the workflow now — rehearse on the shipping M2 line today, and swap a single string when M3 access opens.

Claude Code (Anthropic-compatible endpoint):

export ANTHROPIC_BASE_URL="https://api.minimax.io/anthropic"
export ANTHROPIC_AUTH_TOKEN="<your MiniMax key>"
export ANTHROPIC_MODEL="MiniMax-M2"          # -> "MiniMax-M3" when access opens
export ANTHROPIC_SMALL_FAST_MODEL="MiniMax-M2"
claude

Cursor, Codex, and Cline (OpenAI-compatible): point the tool's custom base URL at MiniMax's OpenAI endpoint with your key and the current M-series model id.

OpenRouter — one key, every tool:

# base URL: https://openrouter.ai/api/v1
# model id follows the minimax publisher namespace; confirm the current id in OpenRouter's catalog

Self-host: the M2 weights are open-source via the project's GitHub release (MiniMax-M2 on GitHub), deployable with standard serving stacks such as vLLM or SGLang.

The whole point of that stable surface: when M3 lands on the API, switching is one model-string change — no new wiring, no rewrite. Set the workflow up today, flip the string when you are happy with independent quality numbers.

Takeaway: you do not have to wait to prepare — the integration is a one-line swap away.

The part that does not change

Here is where it gets honest. The cost of tokens keeps falling — M3 is the latest proof, and it will not be the last. But the cost of an agent that cannot read your codebase does not move at all. A faster, cheaper model still ships confident garbage into a repo it does not understand: it invents folder structures, picks a different state library than the three you already use, re-derives your auth flow from scratch because nobody told it how this project works.

a clay developer standing confidently next to a tall stack of neatly organized glowing cod

That is the gap a cheaper model does not close. It is the gap context closes — a readable codebase, AI config files that encode your conventions, and task prompts that say "here is how we add a feature." Start with an agent-readable repository structure, encode the rules in Cursor rules for Next.js, and run sessions with tested agent prompts. That layer is model-agnostic by design. It works the same whether the engine underneath is M3, Sonnet, or GPT.

OTF kits are exactly that layer: production-grade full-stack code plus the AI config and deploy scripts that turn any capable model into a teammate that ships to production — not a slot machine you keep re-pulling. M3 makes the tokens cheap. The kit is the part that makes them land — browse them at OTF templates.

Takeaway: bring whatever model is cheapest this month. The context is the durable asset.

Try it

Cheaper million-token context is a real tailwind for every builder — go use it. Wire the current M-series model into your agent today, watch the independent quality benchmarks as M3 access widens, and swap the model string when you are happy. The model layer is becoming a commodity, and that is a gift: what differentiates your output is not which engine you rented this week. It is whether the codebase you point it at is one an agent can read, extend, and ship. Get that part right and every model release — M3 included — just makes you faster.

Sources


Originally published at otf-kit.dev — full-stack kits your AI coding agent can actually ship to production. See the kits →

ai-toolsagentsarchitecture
OTF SaaS Dashboard Kit

Ship the product, not the setup.

  • 11 production screens — auth, team, analytics, and settings
  • Login and a real database are wired in
  • AI configs pre-tuned so your agent extends instead of regenerates
Need more than components?

Full-stack kits.
Pay once, own the code.

SaaS Dashboard and Fitness include authentication and a database. Arcade is browse-first with a local demo session and no backend sign-in by default. Booking is in Preview; Marketplace is coming soon and not currently sold. The Bundle includes the three live kits.

Everything Bundle — $149See full pricing

Get the free AI configs pack

AI configs in every kit: CLAUDE.md, .cursorrules and task prompts. Drop them in and your AI tool instantly understands your project.

No spam. Unsubscribe any time.

Prefer the free SDK? Star it on GitHub →