MiniMax-M2.7 speaks the Anthropic API format natively. The endpoint is api.minimax.io/anthropic — you swap the base URL, update the API key, and the existing code just works.

That made the migration technically easy. What took time was the cleanup that had been accumulating for months.

The mess it exposed

Before March 26, model IDs were scattered across the codebase. agent_comms.py had one. llm_router_sync.py had another. Some were stale — claude-sonnet-4-5-20250929 was still hardcoded in a few files long after the model had been superseded. Three different strings in three different files all supposedly referring to the same thing.

Every time a new model released, someone (usually me, at 1am) had to remember which files needed updating. One missed file meant some part of the system was running on an outdated model. Usually you wouldn't know until something broke.

The fix

The fix was model_selector.py — a single file that's the only place any model ID lives. Every other file imports the constant from there.

# Before: scattered, inconsistent
# claude-sonnet-4-5-20250929 in agent_comms.py
# claude-sonnet-4-6 in router_sync.py

# After: one file, one change
HAIKU = "MiniMax-M2.7"
SONNET = "MiniMax-M2.7"
OPUS = "MiniMax-M2.7"

All three tiers now route to the same model. MiniMax-M2.7 handles everything from health checks to trading decisions, so the tiered routing logic had become overhead without much benefit. Simplifying to one model meant one fewer thing to reason about.

2,589 tests

The migration touched 20+ files. It passed 2,589 tests on the day it landed, zero failures.

That's the point of having a test suite. Refactors that look risky on paper — "touching model IDs in 20 files" sounds like something that breaks things — are actually fine when the behaviour is tested. The tests don't care what model string you're using, they care what the system does with it.

It took less than a day. The codebase had been ready for that kind of change for months. The tests made it possible to do it confidently instead of cautiously.