Use MiniMax in Cline and Roo Code (VS Code)

Configure Cline or Roo Code to run MiniMax-M2.7 and MiniMax-M3 through YiduoChan's OpenAI-compatible API, with the exact base URL, model IDs, context window and per-token prices the extensions need for accurate cost tracking.

Cline and Roo Code are VS Code extensions that run an agentic coding loop: they read files, propose edits, run terminal commands and iterate on the results. Both can send requests to any OpenAI-compatible endpoint, so they work with MiniMax models through YiduoChan without a plugin or wrapper. This guide walks through the configuration for each extension, gives the exact model IDs and per-token prices to enter so the in-editor cost display matches your bill, and covers the settings that matter for long agentic sessions.

What you need

SettingValue
API providerOpenAI Compatible
Base URLhttps://yiduochan.com/v1
API keyYour key from the YiduoChan console (sent as Authorization: Bearer <API key>)
Model IDMiniMax-M2.7, MiniMax-M2.7-highspeed or MiniMax-M3

Before touching the extension settings, confirm the key works from a terminal. If this call returns a completion, any remaining problem is in the extension configuration, not the account.

curl https://yiduochan.com/v1/chat/completions \
  -H "Authorization: Bearer $YIDUOCHAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-M2.7",
    "messages": [{"role": "user", "content": "Reply with OK."}]
  }'

To list the model IDs the endpoint accepts:

curl https://yiduochan.com/v1/models \
  -H "Authorization: Bearer $YIDUOCHAN_API_KEY"

Model IDs and prices

Enter the IDs exactly as shown. Prices are USD per 1M tokens and are the same numbers YiduoChan bills against, so entering them in the extension gives you a cost estimate that tracks the console.

Model IDInputOutputCache readCache writeNotes
MiniMax-M2.7$0.30$1.20$0.06$0.375Default choice for agentic coding
MiniMax-M2.7-highspeed$0.60$2.40$0.06$0.375Same quality as M2.7, lower latency
MiniMax-M3 (prompts up to 512K tokens)$0.30$1.20$0.061,048,576-token context
MiniMax-M3 (prompts 512K to 1M tokens)$0.60$2.40$0.12Applies once a single prompt exceeds 512K tokens

Cline and Roo Code accept one input price and one output price per model. For MiniMax-M3, enter the up-to-512K tier. If a task grows a prompt past 512K tokens, the extension's estimate will undercount that request; the console usage log always shows the actual charge. Details on each model are on the MiniMax-M2.7 and MiniMax-M3 pages, and the current price list is at /pricing.

Set up Cline

  1. Open the Cline panel in the VS Code sidebar and click the settings gear.
  2. Set API Provider to OpenAI Compatible.
  3. Set Base URL to https://yiduochan.com/v1. Do not append /chat/completions; Cline adds the path itself.
  4. Paste your key into the API Key field.
  5. Set Model ID to MiniMax-M2.7 (or one of the other IDs above).
  6. Expand the model configuration section and fill in the context window, output limit and prices from the table in the next section.
  7. Save, then send a short task such as "list the files in this workspace" to confirm the extension receives a response and shows a non-zero cost.

Cline can use different providers for Plan mode and Act mode. A practical split is MiniMax-M3 for Plan, where reading a large slice of the repository in one pass is useful, and MiniMax-M2.7 for Act, where each turn is smaller and the standard price applies to more of the traffic. If you keep one model for both, MiniMax-M2.7 is the sensible default.

Cline model configuration values

FieldMiniMax-M2.7MiniMax-M2.7-highspeedMiniMax-M3
Context Window SizeExtension defaultExtension default1048576
Max Output TokensExtension defaultExtension defaultExtension default
Input Price / 1M tokens0.300.600.30
Output Price / 1M tokens1.202.401.20
Cache Reads Price / 1M tokens0.060.060.06
Cache Writes Price / 1M tokens0.3750.375Leave empty
Supports ImagesOffOffOff

The context window value only tells the extension when to start truncating or condensing conversation history; it does not change what the API accepts. For MiniMax-M2.7 and MiniMax-M2.7-highspeed, leave the extension default; the model details are on the MiniMax-M2.7 page. For MiniMax-M3 the published window is 1,048,576 tokens, so enter that exact figure. Field labels differ slightly between Cline releases; if your version does not show cache price fields, skip them and the estimate will count cached input at the full input price.

Set up Roo Code

Roo Code uses configuration profiles, so you can save one profile per MiniMax model and switch between them, or bind different profiles to its Code, Architect, Ask and Debug modes.

  1. Open the Roo Code panel and click the settings gear, then the Providers tab.
  2. Create a new configuration profile (for example yiduochan-m2.7) so the settings do not overwrite an existing provider.
  3. Set API Provider to OpenAI Compatible.
  4. Set Base URL to https://yiduochan.com/v1.
  5. Paste the key into API Key.
  6. In the Model field, type MiniMax-M2.7. Roo Code may offer a dropdown populated from /v1/models; typing the ID manually works regardless.
  7. Open the model settings below the model field and enter the context window, prices and cache prices using the same values as the Cline table above. If a prompt caching toggle is shown, enable it.
  8. Leave image support and computer use disabled; these are text models.
  9. Save and run a small task to confirm the cost readout updates.

Repeat the profile for MiniMax-M3 with a context window of 1048576 if you want a profile for very large codebases. Because the profile stores the price fields, the per-task cost shown in the Roo Code task header will use the correct rate whichever profile is active.

Prompt caching and what the cost display means

An agentic loop resends the system prompt, tool definitions and the whole conversation on every turn, so most input tokens in a session are repeats of earlier turns. Cached input is where the cost difference shows up: for MiniMax-M2.7 a cache read is billed at $0.06 per 1M tokens against $0.30 for uncached input, one fifth of the standard rate, while a cache write is $0.375. For MiniMax-M3 the cache read price is $0.06 up to 512K tokens and $0.12 from 512K to 1M.

Cline and Roo Code compute their cost figure locally from the token counts reported in each response's usage object, multiplied by the prices you entered. When the usage object reports cached tokens, the extension applies the cache read price to them; when it does not, every input token is priced at the standard input rate and the estimate is higher than the actual charge. Treat the in-editor number as a running estimate and the YiduoChan console usage log as the billing record. Failed requests are never charged, whatever the extension displays.

Recommended settings for agentic coding

Troubleshooting

If a problem persists after these checks, email [email protected] with the request time and the model ID.

Using Claude Code instead?

If your editor of choice is Claude Code rather than a VS Code extension, the setup is different: it uses the Anthropic-compatible Messages endpoint at /v1/messages, configured with ANTHROPIC_BASE_URL=https://yiduochan.com, ANTHROPIC_AUTH_TOKEN=<API key> and ANTHROPIC_MODEL=MiniMax-M2.7 or MiniMax-M3. The full walkthrough, including the optional ANTHROPIC_DEFAULT_HAIKU_MODEL=MiniMax-M2.7-highspeed setting and the note that count_tokens is not available, is in the Claude Code guide. An overview of every MiniMax model available through YiduoChan is on the MiniMax overview page.

FAQ

Does Cline support MiniMax models?

Yes. Select the OpenAI Compatible provider, set the base URL to https://yiduochan.com/v1, paste your YiduoChan API key and enter MiniMax-M2.7 or MiniMax-M3 as the model ID; no plugin is required.

What model ID do I enter in Roo Code for MiniMax M2.7?

Exactly MiniMax-M2.7. The other accepted IDs are MiniMax-M2.7-highspeed and MiniMax-M3.

What context window should I set for MiniMax-M3 in Cline or Roo Code?

Enter 1048576, the model's published 1M-token context. For MiniMax-M2.7 leave the extension default; the setting only controls when the extension condenses history.

Why does Cline or Roo Code show $0.00 cost for MiniMax?

The price fields are empty; the extensions do not fetch prices from the endpoint. Enter $0.30 input and $1.20 output per 1M tokens for MiniMax-M2.7 and the estimate will track your bill.

Does prompt caching reduce MiniMax costs in Cline and Roo Code?

Cache reads are billed at $0.06 per 1M tokens for MiniMax-M2.7, one fifth of the $0.30 input rate, and the YiduoChan console usage log shows the actual charge for each request.

Can I use MiniMax with Claude Code instead of a VS Code extension?

Yes. Claude Code uses the Anthropic-compatible endpoint with ANTHROPIC_BASE_URL=https://yiduochan.com and ANTHROPIC_MODEL=MiniMax-M2.7; see the Claude Code guide at /minimax/claude-code/.

Sign up and get an API key See full model pricing