Use MiniMax M2.5 in Claude Code: Agentic Coding Guide
By
Novita AI
/ April 2, 2026 / LLM / 7 minutes of reading
Claude Code needs a powerful coding model to unlock its full agentic potential — and MiniMax M2.5 delivers exactly that. Scoring 80.2% on SWE-Bench Verified and 76.3% on BrowseComp, this model brings state-of-the-art agentic coding and tool-calling capabilities at just $0.3 per million input tokens through Novita AI’s API.
This guide shows you exactly how to integrate MiniMax M2.5 into Claude Code using Novita AI as your API provider to help you choose the right workflow.
Quick Answer: MiniMax M2.5 in Claude Code gives you 80.2% SWE-Bench success at $0.3/$1.2 per million tokens (input/output) via Novita AI — making it one of the most cost-effective agentic coding setups available.
MiniMax M2.5 isn’t just another coding model — it’s specifically optimized for agentic workflows. Here’s what makes it the ideal match for Claude Code:
Trained with reinforcement learning across hundreds of thousands of complex real-world environments, M2.5 achieves breakthrough results in autonomous coding tasks. 80.2% on SWE-Bench Verified places it among the top models for resolving real GitHub issues, while 51.3% on Multi-SWE-Bench demonstrates its ability to handle complex, multi-file refactoring.
Benchmark
Score
What It Measures
SWE-Bench Verified
80.2%
Real GitHub issue resolution
Multi-SWE-Bench
51.3%
Complex multi-file tasks
BrowseComp
76.3%
Web browsing & tool use
2. Extreme Speed for Agentic Tasks
M2.5 completes SWE-Bench evaluations 37% faster than M2.1, matching Claude Opus 4.6’s speed. This efficient reasoning means your Claude Code workflows complete faster, with less waiting between agent actions.
3. Cost-Effective at Scale
At $0.3 per million input tokens, M2.5 delivers frontier model performance at mid-tier pricing. Running continuously at 100 tokens per second costs just $1 per hour — making it practical for long-running agentic tasks that would be prohibitively expensive with premium models.
4. Rich Tool-Calling and Search Integration
The model’s 76.3% BrowseComp score demonstrates sophisticated tool-use capabilities. In Claude Code, this translates to reliable terminal operations, file system navigation, and API integrations without constant retry loops.
5. Multilingual Coding Excellence
M2.5 shows especially strong performance in multilingual programming tasks, making it ideal for polyglot codebases where you need Python, JavaScript, TypeScript, Rust, and Go support in a single workflow.
6. Real-Time Agentic Feedback Loop
Claude Code’s interactive environment benefits from M2.5’s efficient task decomposition. The model breaks complex requests into logical steps, executes them sequentially, and adapts based on runtime feedback — exactly what you need for debugging and iterative development.
Claude Code is Anthropic’s official CLI and desktop tool for agentic coding. Unlike traditional IDEs, it runs autonomous coding agents that can read files, execute commands, browse documentation, and write code across your entire project. By configuring custom model endpoints, you can replace the default Claude models with alternatives like MiniMax M2.5 for cost optimization or specialized tasks.
Key capabilities: Terminal automation, multi-file refactoring, real-time error debugging, API integrations, and autonomous task execution with human-in-the-loop approval.
How to Use MiniMax M2.5 in Claude Code
Prerequisites
Claude Code CLI or desktop app installed (get it from claude.com/claude-code)
Novita AI account with API key (free tier available at novita.ai)
Basic terminal/command line knowledge
Step 1: Get Your Novita AI API Key
Novita AI provides Anthropic-compatible endpoints for MiniMax M2.5, making integration straightforward:
Windows requires Git for Windows. Install it first if you don’t have it.
Step 3: Configure Claude Code Environment Variables
Claude Code uses environment variables to route requests to custom model endpoints. Set these four variables before starting Claude Code:
For macOS/Linux:
# Set the Anthropic SDK compatible API endpoint provided by Novita.
export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<Novita API Key>"
# Set the model provided by Novita.
export ANTHROPIC_MODEL="minimax/minimax-m2.5"
export ANTHROPIC_SMALL_FAST_MODEL="minimax/minimax-m2.5"
Pro Tip: Set both ANTHROPIC_MODEL and ANTHROPIC_SMALL_FAST_MODEL to “minimax/minimax-m2.5” to ensure all operations use the same model for consistency.
Step 4: Start Claude Code
Next, navigate to your project directory and start Claude Code. Claude Code will analyze the current project directory and use it as the working context. You will see the Claude Code prompt inside a new interactive session.
cd <your-project-directory>
claude .
Test with a simple coding task to confirm the model responds correctly. You should see faster response times and notice the $0.30/$1.20 per million token pricing in your Novita AI usage dashboard.
Step 5: Optimize for Agentic Workflows
MiniMax M2.5 excels at multi-step tasks. To get the best results in Claude Code:
Enable context management: M2.5’s 196,608 token context window handles large codebases — let it read multiple files before making changes
Use explicit task decomposition: Ask for step-by-step plans before execution (e.g., “First analyze the codebase, then propose changes, then implement”)
Leverage tool-calling: M2.5’s strong tool-use capabilities mean you can chain terminal commands, file operations, and API calls in a single workflow
Approve iterations: Claude Code’s human-in-the-loop mode pairs well with M2.5’s efficient reasoning — review each step before proceeding
Use Git with Claude Code: Claude Code makes Git operations conversational and you can also prompt for more complex Git operations.
Cost Analysis: Running MiniMax M2.5 in Claude Code
Pricing via Novita AI:
Token Type
Price per 1M Tokens
Typical Use Case
Input
$0.30
Reading code, context, prompts
Output
$1.2
Generated code, responses
Example cost scenarios for typical Claude Code workflows:
Small refactor (5 files, 200 line changes): $0.03-0.05
Hour of continuous coding at 100 tokens/sec: $0.27-0.33
Cost Advantage: At $0.3/$1.2 per million tokens, MiniMax M2.5 costs roughly 40% less than premium alternatives while delivering comparable SWE-Bench performance — making it ideal for high-volume agentic workflows.
Real-World Use Cases of MiniMax M2.5 + Claude Code
1. Multi-File Refactoring
M2.5’s 51.3% Multi-SWE-Bench score means it can handle complex refactors across dozens of files. Claude Code provides the interactive environment for approving each change before committing.
2. Bug Investigation and Fixes
The model’s efficient reasoning breaks down debugging into logical steps: reproduce the bug, identify the root cause, propose a fix, test the solution. Claude Code’s terminal integration lets it run tests and verify fixes in real-time.
M2.5’s 76.3% BrowseComp score demonstrates strong web/API interaction skills. Use it to scaffold new API clients, add authentication, implement rate limiting, and write integration tests.
4. Documentation Generation
The model reads your entire codebase context (up to 196K tokens) and generates comprehensive docs. Claude Code’s file operations let it update README files, docstrings, and API documentation in-place.
5. Framework Migration
Migrating from React to Vue, or Express to Fastify? M2.5’s multilingual coding strength and systematic approach handles these large-scale conversions efficiently, with Claude Code providing step-by-step approval gates.
If you’re building agentic coding workflows and need strong SWE-Bench performance without premium pricing, MiniMax M2.5 via Novita AI in Claude Code is your optimal setup. Set four environment variables, and you’re running autonomous coding agents at $0.3 per continuous hour.
Can I use MiniMax M2.5 in other coding tools besides Claude Code?
Yes — Novita AI’s Anthropic-compatible endpoint works with any tool that accepts custom API endpoints, including Cursor, Continue, and Trae.
How does MiniMax M2.5 compare to Claude Sonnet for coding in Claude Code?
M2.5 achieves 80.2% on SWE-Bench at $0.3/$1.2 per million tokens, while Claude Sonnet 4 scores higher but costs significantly more — M2.5 offers better cost-performance for high-volume workflows.
Does MiniMax M2.5 support function calling for tool use in Claude Code?
Yes — the model’s 76.3% BrowseComp score demonstrates sophisticated tool-calling capabilities, fully compatible with Claude Code’s terminal and file system tools.
Novita AI is the AI & agent cloud platform helping developers and startups build, deploy, and scale models and agentic applications with high performance, reliability, and cost efficiency.