site: Qwen and MiniMax provider pages in en, zh and ja
Two more provider guides beside DeepSeek, Kimi and GLM, at
/docs/{,zh/,ja/}{qwen,minimax}, linked from each agent guide's
"By provider" line, the sitemap and llms.txt.
Facts come from source: the six Qwen presets (qwen, qwen-cn,
qwen-token-plan, bailian-token-plan, qwencloud, qwencloud-token-plan)
and their endpoints and key kinds in presets.go, alibabaPlanModels,
dashScope()'s non-streaming rule in gateway.go, alwaysThinks and
effortInOutputConfig in anthropic.go, MiniMax's inline <think> in
chat.go, readMiniMaxPlan's windows in planquota.go, and the Qwen Code
and MiniMax Code agents in internal/agent.
Run: mote-run sh -c 'cd site && node --test worker.test.mjs
install.test.mjs': 69 pass, 0 fail. JSON-LD of the six pages parses.
Not tried: a real Qwen or MiniMax key through the pages' commands.
This commit is contained in:
@@ -251,7 +251,7 @@ magpie claude codex/gpt-5.5</pre></div>
|
||||
</ul>
|
||||
<p>The routing modes are in <a href="/docs/start#routing">Get started</a>.</p>
|
||||
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a></p>
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a> · <a href="/docs/qwen">Qwen</a> · <a href="/docs/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">FAQ</a></h2>
|
||||
<h3>Do I set <code>ANTHROPIC_BASE_URL</code> myself?</h3>
|
||||
|
||||
@@ -251,7 +251,7 @@ magpie codex claude/…</pre></div>
|
||||
</ul>
|
||||
<p>The routing modes are in <a href="/docs/start#routing">Get started</a>.</p>
|
||||
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a></p>
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a> · <a href="/docs/qwen">Qwen</a> · <a href="/docs/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">FAQ</a></h2>
|
||||
<h3>Do I write <code>[model_providers]</code> myself?</h3>
|
||||
|
||||
@@ -235,7 +235,7 @@ magpie gemini model codex/gpt-5.5</pre></div>
|
||||
</ul>
|
||||
<p>The routing modes and rules are in <a href="/docs/start#routing">Get started</a>.</p>
|
||||
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a></p>
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a> · <a href="/docs/qwen">Qwen</a> · <a href="/docs/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">FAQ</a></h2>
|
||||
<h3>Can Gemini CLI use models that aren’t Gemini?</h3>
|
||||
|
||||
@@ -251,7 +251,7 @@ magpie claude codex/gpt-5.5</pre></div>
|
||||
</ul>
|
||||
<p>ルーティングモードは<a href="/docs/ja/start#routing">はじめに</a>で説明しています。</p>
|
||||
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a></p>
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a> · <a href="/docs/ja/qwen">Qwen</a> · <a href="/docs/ja/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">よくある質問</a></h2>
|
||||
<h3><code>ANTHROPIC_BASE_URL</code> は自分で設定しますか?</h3>
|
||||
|
||||
@@ -251,7 +251,7 @@ magpie codex claude/…</pre></div>
|
||||
</ul>
|
||||
<p>ルーティングモードは<a href="/docs/ja/start#routing">はじめに</a>で説明しています。</p>
|
||||
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a></p>
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a> · <a href="/docs/ja/qwen">Qwen</a> · <a href="/docs/ja/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">よくある質問</a></h2>
|
||||
<h3><code>[model_providers]</code> は自分で書きますか?</h3>
|
||||
|
||||
@@ -235,7 +235,7 @@ magpie gemini model codex/gpt-5.5</pre></div>
|
||||
</ul>
|
||||
<p>ルーティングモードとルールは<a href="/docs/ja/start#routing">はじめに</a>で説明しています。</p>
|
||||
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a></p>
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a> · <a href="/docs/ja/qwen">Qwen</a> · <a href="/docs/ja/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">よくある質問</a></h2>
|
||||
<h3>Gemini CLI で Gemini 以外のモデルを使えますか?</h3>
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
<!doctype html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MiniMax と Coding Plan を Claude Code・Codex・Gemini CLI・OpenCode で使う · magpie</title>
|
||||
<meta name="description" content="magpie で MiniMax M3・M2.7 を Claude Code・Codex・Gemini CLI・OpenCode から使う方法:従量課金と Coding Plan のキー、国際版と中国版のエンドポイント、インターリーブ思考、M3.1 Flash の推論レベル、Coding Plan の使用量ウィンドウ。">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
(() => {
|
||||
let mode = "system";
|
||||
try { mode = localStorage.getItem("theme") || "system"; } catch {}
|
||||
const q = matchMedia("(prefers-color-scheme: dark)");
|
||||
const apply = () => {
|
||||
const t = mode === "system" ? (q.matches ? "dark" : "light") : mode;
|
||||
document.documentElement.dataset.theme = t;
|
||||
document.querySelector('meta[name="theme-color"]').content = t === "dark" ? "#0b0b0c" : "#fafafa";
|
||||
document.querySelectorAll("button.theme").forEach((b) => { b.dataset.mode = mode; b.title = "Theme: " + mode; });
|
||||
};
|
||||
q.addEventListener("change", () => mode === "system" && apply());
|
||||
window.setTheme = (m) => { mode = m; try { m === "system" ? localStorage.removeItem("theme") : localStorage.setItem("theme", m); } catch {} apply(); };
|
||||
window.themeMode = () => mode;
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/minimax">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/minimax">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/minimax">
|
||||
<link rel="alternate" hreflang="x-default" href="https://usemagpie.ai/docs/minimax">
|
||||
<link rel="canonical" href="https://usemagpie.ai/docs/ja/minimax">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:site_name" content="magpie">
|
||||
<meta property="og:title" content="MiniMax と Coding Plan を Claude Code・Codex・Gemini CLI・OpenCode で使う">
|
||||
<meta property="og:description" content="magpie で MiniMax M3・M2.7 を Claude Code・Codex・Gemini CLI・OpenCode から使う方法:従量課金と Coding Plan のキー、国際版と中国版のエンドポイント、インターリーブ思考、M3.1 Flash の推論レベル、Coding Plan の使用量ウィンドウ。">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/ja/minimax">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "TechArticle",
|
||||
"headline": "MiniMax と Coding Plan を Claude Code・Codex・Gemini CLI・OpenCode で使う",
|
||||
"description": "magpie で MiniMax M3・M2.7 を Claude Code・Codex・Gemini CLI・OpenCode から使う方法:従量課金と Coding Plan のキー、国際版と中国版のエンドポイント、インターリーブ思考、M3.1 Flash の推論レベル、Coding Plan の使用量ウィンドウ。",
|
||||
"inLanguage": "ja",
|
||||
"url": "https://usemagpie.ai/docs/ja/minimax",
|
||||
"about": {
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "magpie",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "macOS, Windows, Linux"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "magpie",
|
||||
"url": "https://usemagpie.ai/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Claude Code で MiniMax M2.7 や M3 を使うには?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "magpie に MiniMax のキーを追加し(プロバイダ → プロバイダを追加 → MiniMax か MiniMax (China))、Claude Code の行で MiniMax-M3 などのモデルを選ぶか、magpie claude minimax/MiniMax-M3 を実行します。magpie が Claude Code の settings.json を書き、リクエストを MiniMax の Anthropic エンドポイント https://api.minimax.io/anthropic に渡します。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "MiniMax Coding Plan はどう使いますか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Coding Plan のキー(sk-cp-…)を、購入したサイトの MiniMax プリセットに従量課金のキーと同じように追加します。magpie は MiniMax がそのキーについて返す情報で両者を見分け、Coding Plan のキーの行に使用量ウィンドウを表示します。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Codex で MiniMax を使えますか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "使えます。MiniMax は Chat Completions と Anthropic Messages を提供し、Responses は提供していないので、magpie が Codex のリクエストと MiniMax の返答を変換します。Codex の行で選ぶか magpie codex minimax/MiniMax-M3 を実行すると、Codex の /model に並びます。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "MiniMax Code で他のモデルを使えますか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "使えます。MiniMax Code は magpie がつなぐエージェントの一つなので、エージェント タブのその行で、追加したどのモデルでも選べます。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "MiniMax の思考が本文に出るのはなぜ?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "MiniMax の Chat API はモデルの思考を返答本文の <think> タグに入れて返します。magpie はそれを取り出して思考としてツールに渡し、次のターンからは MiniMax が求める位置に戻します。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "MiniMax のキーを複数使えますか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "使えます。すべて MiniMax プロバイダに追加してそれぞれにチェックを入れます。magpie はリクエストを分散し、Coding Plan のキーはウィンドウで重みづけして、使い切ったキーはリセットまで休ませます。"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav><div class="wrap">
|
||||
<a class="brand" href="/ja/"><img class="bird" src="/img/magpie-small.svg" alt="">magpie <small>ドキュメント</small></a>
|
||||
<div class="links">
|
||||
<a href="/ja/">ホーム</a>
|
||||
<a href="/docs/ja/start">はじめに</a>
|
||||
<a href="/docs/ja/intent">インテントルーティング</a>
|
||||
<a href="/docs/ja/plugins">プラグイン</a>
|
||||
<a class="toc-only" href="/docs/ja/remote">リモート magpie</a>
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a class="toc-only" href="/docs/ja/library">ライブラリ</a>
|
||||
<a class="toc-only" href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/codex-models">Codex で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/subscriptions">サブスクを任意のエージェントで</a>
|
||||
<a class="toc-only" href="/docs/ja/local-models">ローカルモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/opencode-models">OpenCode で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/alternatives">CC Switch・CCR との比較</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
</div>
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="言語" title="言語" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/minimax" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/minimax" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/minimax" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="Discord の magpie" title="Discord に参加"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
<a class="icon-btn" href="https://github.com/yetone/magpie" aria-label="GitHub の magpie" title="GitHub のソースコード"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg></a>
|
||||
<button class="icon-btn theme" type="button" aria-label="Theme" title="Theme: system"><svg class="i-system" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1.75" y="2.75" width="12.5" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11.25V14"/></svg><svg class="i-light" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg><svg class="i-dark" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M13.5 9.5A5.5 5.5 0 0 1 6.5 2.5a5.5 5.5 0 1 0 7 7Z"/></svg></button>
|
||||
<a class="btn small" href="/#get">ダウンロード</a>
|
||||
</div></nav>
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>このページ</p>
|
||||
<a href="#add">追加する</a>
|
||||
<a href="#endpoints">プランとエンドポイント</a>
|
||||
<a href="#agents">ツールごとの使い方</a>
|
||||
<a href="#thinking">思考</a>
|
||||
<a href="#usage">残高と使用量</a>
|
||||
<a href="#faq">よくある質問</a>
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">ドキュメント · プロバイダ</p>
|
||||
<h1>MiniMax と Coding Plan を Claude Code・Codex・Gemini CLI・OpenCode で使う</h1>
|
||||
<p class="lede">MiniMax は OpenAI 互換の Chat API と Anthropic 互換の API を、国際版と中国版のサイトで、従量課金と Coding Plan のどちらのキーにも提供しています。キーを magpie に一度追加すれば、Claude Code・Codex・Gemini CLI・OpenCode などつないだすべてのツールが、magpie のゲートウェイ <code>127.0.0.1:3425</code> 経由で <code>MiniMax-M3</code> や <code>MiniMax-M2.7</code> などのモデルを使えます。</p>
|
||||
|
||||
<h2 id="add"><a class="anchor" href="#add">MiniMax を追加する</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>キーを取得</b><a href="https://platform.minimax.io/user-center/basic-information/interface-key">platform.minimax.io</a> で作ります(中国版は <a href="https://platform.minimaxi.com/user-center/basic-information/interface-key">platform.minimaxi.com</a>)。Coding Plan のキーは <code>sk-cp-</code> で始まります。</li>
|
||||
<li><b>プロバイダを追加</b>magpie の <span class="ui">プロバイダ</span> で <span class="ui">+ プロバイダを追加</span> を押し、MiniMax か MiniMax (China) を選んでキーを貼り付け、保存します。従量課金のキーも Coding Plan のキーも同じ手順です。</li>
|
||||
<li><b>ツールで選ぶ</b><span class="ui">エージェント</span> タブで、ツールの行の MiniMax モデルを選びます。</li>
|
||||
</ol>
|
||||
<div class="code"><span class="lang">ターミナル</span><button class="copy" data-copy="ex-add">コピー</button><pre id="ex-add">magpie provider add minimax sk-… # platform.minimax.io
|
||||
magpie provider add minimax-cn sk-cp-… # Coding Plan、platform.minimaxi.com</pre></div>
|
||||
|
||||
<h2 id="endpoints"><a class="anchor" href="#endpoints">プランとエンドポイント</a></h2>
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>プリセット</th><th>サイト</th><th>Chat Completions</th><th>Anthropic Messages</th></tr>
|
||||
<tr><td>MiniMax <span class="ui">minimax</span></td><td>platform.minimax.io(国際)</td><td><code>https://api.minimax.io/v1</code></td><td><code>https://api.minimax.io/anthropic</code></td></tr>
|
||||
<tr><td>MiniMax (China) <span class="ui">minimax-cn</span></td><td>platform.minimaxi.com(中国)</td><td><code>https://api.minimaxi.com/v1</code></td><td><code>https://api.minimaxi.com/anthropic</code></td></tr>
|
||||
</table></div>
|
||||
<p>Coding Plan も従量課金と同じエンドポイントを使い、どちらで課金されるかはキーで決まります。国際版と中国版は別のアカウントなので、キーはそれぞれのサイトのプリセットに入れます。</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">ツールごとの使い方</a></h2>
|
||||
<p><span class="ui">エージェント</span> タブで各ツールの行のモデルをクリックして選ぶか、ターミナルで選びます。各ガイドに、magpie がそのツールの設定に何を書くか、どう元に戻すかがあります。</p>
|
||||
<div class="code"><span class="lang">ターミナル</span><button class="copy" data-copy="ex-agents">コピー</button><pre id="ex-agents">magpie claude minimax/MiniMax-M3
|
||||
magpie codex minimax/MiniMax-M3
|
||||
magpie gemini model minimax/MiniMax-M2.7
|
||||
magpie opencode minimax/MiniMax-M3</pre></div>
|
||||
<ul>
|
||||
<li><b>Claude Code</b> は Anthropic Messages を話し、MiniMax の Anthropic エンドポイントも同じなので、リクエストはそのまま渡されます。opus・sonnet・haiku の各ティアは、個別に指定しない限り選んだモデルで動きます。<a href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>。</li>
|
||||
<li><b>Codex</b> が話すのは OpenAI Responses だけです。MiniMax は Chat Completions と Anthropic Messages を提供し、Responses は提供していないので、magpie がリクエストと返答を変換します。ストリーミングとツール呼び出しもそのままです。モデルは推論レベル付きで Codex の <code>/model</code> に並びます。<a href="/docs/ja/codex-models">Codex で他のモデル</a>。</li>
|
||||
<li><b>Gemini CLI</b> は Gemini の API を話します。magpie がゲートウェイに向けて変換します。<a href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>。</li>
|
||||
<li><b>OpenCode</b> には、magpie が <code>opencode.json</code> にモデルを推論バリアントと価格つきで書きます。<a href="/docs/ja/opencode-models">OpenCode で他のモデル</a>。</li>
|
||||
</ul>
|
||||
<p>MiniMax Code も magpie がつなぐエージェントの一つで、その行では MiniMax のモデルも他社のモデルも選べます。</p>
|
||||
|
||||
<h2 id="thinking"><a class="anchor" href="#thinking">思考と推論レベル</a></h2>
|
||||
<ul>
|
||||
<li><b>インターリーブ思考。</b>MiniMax の Chat API はモデルの思考を返答本文の <code><think></code> タグに入れて返し、次のターン以降もそこに戻すよう求めます。magpie はそれを思考としてツールに渡し、MiniMax が求める位置に戻します。</li>
|
||||
<li><b>推論レベル。</b><code>MiniMax-M3.1-Flash</code> とそのプレビューは low から max までの思考レベルを持ちます。magpie は MiniMax Code と同じように、ツールが求めるレベルを <code>output_config.effort</code> で送るので、トークン予算に置き換わって失われることはありません。</li>
|
||||
<li><b>常に思考するモデル。</b><code>MiniMax-M3.1-Flash-Preview</code> は思考をオフにできません。ツールがオフを求めたとき、magpie は思考をオンのまま聞き直すので、ツールにはエラーではなく返答が届きます。</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="usage"><a class="anchor" href="#usage">Coding Plan のウィンドウと使用量</a></h2>
|
||||
<ul>
|
||||
<li><b>Coding Plan のウィンドウ。</b>Coding Plan のキーの行に、MiniMax から読んだ各ウィンドウ(ローリングのものと週単位のもの)の残りが表示されます。モデルは汎用の枠を使い、動画など別に数える枠は 4 / 5 のように回数で表示されます。従量課金のキーにはウィンドウもカードもありません。</li>
|
||||
<li><b>ルーティング。</b>Coding Plan のキーが複数あるとき、magpie はウィンドウで重みづけし、ウィンドウを使い切ったキーはリセットまで休ませます。</li>
|
||||
<li><b>使用量。</b><span class="ui">使用量</span> タブは、magpie を通った各ツールとモデルのトークン、キャッシュヒット、費用を数えます。</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">よくある質問</a></h2>
|
||||
<h3>Claude Code で MiniMax M2.7 や M3 を使うには?</h3>
|
||||
<p>magpie に MiniMax のキーを追加し(プロバイダ → プロバイダを追加 → MiniMax か MiniMax (China))、Claude Code の行で <code>MiniMax-M3</code> などのモデルを選ぶか、<code>magpie claude minimax/MiniMax-M3</code> を実行します。magpie が Claude Code の <code>settings.json</code> を書き、リクエストを MiniMax の Anthropic エンドポイント <code>https://api.minimax.io/anthropic</code> に渡します。</p>
|
||||
<h3>MiniMax Coding Plan はどう使いますか?</h3>
|
||||
<p>Coding Plan のキー(<code>sk-cp-…</code>)を、購入したサイトの MiniMax プリセットに従量課金のキーと同じように追加します。magpie は MiniMax がそのキーについて返す情報で両者を見分け、Coding Plan のキーの行に使用量ウィンドウを表示します。</p>
|
||||
<h3>Codex で MiniMax を使えますか?</h3>
|
||||
<p>使えます。MiniMax は Chat Completions と Anthropic Messages を提供し、Responses は提供していないので、magpie が Codex のリクエストと MiniMax の返答を変換します。Codex の行で選ぶか <code>magpie codex minimax/MiniMax-M3</code> を実行すると、Codex の <code>/model</code> に並びます。</p>
|
||||
<h3>MiniMax Code で他のモデルを使えますか?</h3>
|
||||
<p>使えます。MiniMax Code は magpie がつなぐエージェントの一つなので、エージェント タブのその行で、追加したどのモデルでも選べます。</p>
|
||||
<h3>MiniMax の思考が本文に出るのはなぜ?</h3>
|
||||
<p>MiniMax の Chat API はモデルの思考を返答本文の <code><think></code> タグに入れて返します。magpie はそれを取り出して思考としてツールに渡し、次のターンからは MiniMax が求める位置に戻します。</p>
|
||||
<h3>MiniMax のキーを複数使えますか?</h3>
|
||||
<p>使えます。すべて MiniMax プロバイダに追加してそれぞれにチェックを入れます。magpie はリクエストを分散し、Coding Plan のキーはウィンドウで重みづけして、使い切ったキーはリセットまで休ませます。</p>
|
||||
|
||||
<p style="margin-top:48px">ツールごとのガイド:<a href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>、<a href="/docs/ja/codex-models">Codex で他のモデル</a>、<a href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>、<a href="/docs/ja/opencode-models">OpenCode で他のモデル</a>。困ったときは <a href="https://discord.gg/vGSnD3ZKQF">Discord</a> で質問してください。</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap">
|
||||
<span>© 2026 magpie · MIT</span>
|
||||
<div class="links">
|
||||
<a href="/ja/">ホーム</a>
|
||||
<a href="/docs/ja/intent">インテントルーティング</a>
|
||||
<a href="/docs/ja/plugins">プラグイン</a>
|
||||
<a href="/docs/ja/remote">リモート magpie</a>
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/library">ライブラリ</a>
|
||||
<a href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>
|
||||
<a href="/docs/ja/codex-models">Codex で他のモデル</a>
|
||||
<a href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>
|
||||
<a href="/docs/ja/subscriptions">サブスクを任意のエージェントで</a>
|
||||
<a href="/docs/ja/local-models">ローカルモデル</a>
|
||||
<a href="/docs/ja/opencode-models">OpenCode で他のモデル</a>
|
||||
<a href="/docs/ja/alternatives">CC Switch・CCR との比較</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="/docs/ja/contributors">コントリビューター</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const next = { system: "light", light: "dark", dark: "system" };
|
||||
document.querySelectorAll("button.theme").forEach((b) => {
|
||||
b.dataset.mode = themeMode();
|
||||
b.title = "Theme: " + themeMode();
|
||||
b.addEventListener("click", () => setTheme(next[themeMode()]));
|
||||
});
|
||||
|
||||
document.querySelectorAll(".copy").forEach((b) => b.addEventListener("click", async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(document.getElementById(b.dataset.copy).textContent);
|
||||
b.textContent = "コピーしました"; setTimeout(() => (b.textContent = "コピー"), 1400);
|
||||
} catch {}
|
||||
}));
|
||||
})();
|
||||
</script>
|
||||
<script src="/docs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -239,7 +239,7 @@ magpie visible opencode all # すべてに戻す</pre></div>
|
||||
<div class="code"><span class="lang">ターミナル</span><button class="copy" data-copy="ex-oc-back">コピー</button><pre id="ex-oc-back">magpie opencode default</pre></div>
|
||||
<p>magpie を使う前の <code>model</code> と <code>small_model</code> が戻り、<code>magpie</code> プロバイダがファイルから取り除かれます。</p>
|
||||
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a></p>
|
||||
<p><b>プロバイダ別:</b><a href="/docs/ja/deepseek">DeepSeek</a> · <a href="/docs/ja/kimi">Kimi と Kimi Code</a> · <a href="/docs/ja/glm">GLM Coding Plan</a> · <a href="/docs/ja/qwen">Qwen</a> · <a href="/docs/ja/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">よくある質問</a></h2>
|
||||
<h3>OpenCode で DeepSeek を使うには?</h3>
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
<!doctype html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Qwen を Claude Code・Codex・Gemini CLI・OpenCode で使う · magpie</title>
|
||||
<meta name="description" content="magpie で Qwen を Claude Code・Codex・Gemini CLI・OpenCode から使う方法:Alibaba Cloud Model Studio(DashScope)と百炼のキー、Qwen と百炼の Token Plan、Qwen Cloud のリージョン、キーごとのエンドポイント、思考の扱い。">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
(() => {
|
||||
let mode = "system";
|
||||
try { mode = localStorage.getItem("theme") || "system"; } catch {}
|
||||
const q = matchMedia("(prefers-color-scheme: dark)");
|
||||
const apply = () => {
|
||||
const t = mode === "system" ? (q.matches ? "dark" : "light") : mode;
|
||||
document.documentElement.dataset.theme = t;
|
||||
document.querySelector('meta[name="theme-color"]').content = t === "dark" ? "#0b0b0c" : "#fafafa";
|
||||
document.querySelectorAll("button.theme").forEach((b) => { b.dataset.mode = mode; b.title = "Theme: " + mode; });
|
||||
};
|
||||
q.addEventListener("change", () => mode === "system" && apply());
|
||||
window.setTheme = (m) => { mode = m; try { m === "system" ? localStorage.removeItem("theme") : localStorage.setItem("theme", m); } catch {} apply(); };
|
||||
window.themeMode = () => mode;
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/qwen">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/qwen">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/qwen">
|
||||
<link rel="alternate" hreflang="x-default" href="https://usemagpie.ai/docs/qwen">
|
||||
<link rel="canonical" href="https://usemagpie.ai/docs/ja/qwen">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:site_name" content="magpie">
|
||||
<meta property="og:title" content="Qwen を Claude Code・Codex・Gemini CLI・OpenCode で使う">
|
||||
<meta property="og:description" content="magpie で Qwen を Claude Code・Codex・Gemini CLI・OpenCode から使う方法:Alibaba Cloud Model Studio(DashScope)と百炼のキー、Qwen と百炼の Token Plan、Qwen Cloud のリージョン、キーごとのエンドポイント、思考の扱い。">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/ja/qwen">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "TechArticle",
|
||||
"headline": "Qwen を Claude Code・Codex・Gemini CLI・OpenCode で使う",
|
||||
"description": "magpie で Qwen を Claude Code・Codex・Gemini CLI・OpenCode から使う方法:Alibaba Cloud Model Studio(DashScope)と百炼のキー、Qwen と百炼の Token Plan、Qwen Cloud のリージョン、キーごとのエンドポイント、思考の扱い。",
|
||||
"inLanguage": "ja",
|
||||
"url": "https://usemagpie.ai/docs/ja/qwen",
|
||||
"about": {
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "magpie",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "macOS, Windows, Linux"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "magpie",
|
||||
"url": "https://usemagpie.ai/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Claude Code で Qwen を使うには?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "magpie にキーを追加し(プロバイダ → プロバイダを追加 → キーを作ったサイトの Qwen プリセット)、Claude Code の行で qwen3.8-max などの Qwen モデルを選ぶか、magpie claude qwen/qwen3.8-max を実行します。magpie が Claude Code の settings.json を書き、リクエストを DashScope の Anthropic エンドポイントに渡します。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Codex で Qwen(Qwen3 Coder も)を使えますか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "使えます。magpie は DashScope がそのキーに出すモデルを Coder モデルも含めて一覧にし、Codex はどれでも使えます。Codex の Responses リクエストを magpie が Chat Completions に変換し、返答も戻します。Codex の行で選ぶか magpie codex qwen/qwen3.8-max を実行すると、Codex の /model に並びます。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "キーはどのプリセットに入れればいいですか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "キーを作ったサイトのプリセットです。Token Plan のキー(sk-sp-…)はそのプランのホストでしか使えず、Qwen Cloud の従量課金キー(sk-ws-…)は自分のリージョンでしか使えないので、別のプリセットに入れると 401 で断られます。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Qwen Code で他のモデルを使えますか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "使えます。Qwen Code は magpie がつなぐエージェントの一つなので、エージェント タブのその行で、追加したどのモデルでも選べます。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Token Plan の残りクレジットは表示されますか?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "されません。どちらの Token Plan にもクレジットを読む API がなく、Alibaba のコンソールのサブスクリプションページに表示されます。magpie の使用量タブは、各ツールが使ったトークンを数えます。"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav><div class="wrap">
|
||||
<a class="brand" href="/ja/"><img class="bird" src="/img/magpie-small.svg" alt="">magpie <small>ドキュメント</small></a>
|
||||
<div class="links">
|
||||
<a href="/ja/">ホーム</a>
|
||||
<a href="/docs/ja/start">はじめに</a>
|
||||
<a href="/docs/ja/intent">インテントルーティング</a>
|
||||
<a href="/docs/ja/plugins">プラグイン</a>
|
||||
<a class="toc-only" href="/docs/ja/remote">リモート magpie</a>
|
||||
<a class="toc-only" href="/docs/ja/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/ja/privacy">プライバシー</a>
|
||||
<a class="toc-only" href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a class="toc-only" href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a class="toc-only" href="/docs/ja/library">ライブラリ</a>
|
||||
<a class="toc-only" href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/codex-models">Codex で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/subscriptions">サブスクを任意のエージェントで</a>
|
||||
<a class="toc-only" href="/docs/ja/local-models">ローカルモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/opencode-models">OpenCode で他のモデル</a>
|
||||
<a class="toc-only" href="/docs/ja/alternatives">CC Switch・CCR との比較</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
</div>
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="言語" title="言語" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/qwen" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/qwen" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/qwen" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="Discord の magpie" title="Discord に参加"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
<a class="icon-btn" href="https://github.com/yetone/magpie" aria-label="GitHub の magpie" title="GitHub のソースコード"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg></a>
|
||||
<button class="icon-btn theme" type="button" aria-label="Theme" title="Theme: system"><svg class="i-system" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1.75" y="2.75" width="12.5" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11.25V14"/></svg><svg class="i-light" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg><svg class="i-dark" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M13.5 9.5A5.5 5.5 0 0 1 6.5 2.5a5.5 5.5 0 1 0 7 7Z"/></svg></button>
|
||||
<a class="btn small" href="/#get">ダウンロード</a>
|
||||
</div></nav>
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>このページ</p>
|
||||
<a href="#add">追加する</a>
|
||||
<a href="#endpoints">プランとエンドポイント</a>
|
||||
<a href="#agents">ツールごとの使い方</a>
|
||||
<a href="#thinking">思考</a>
|
||||
<a href="#usage">残高と使用量</a>
|
||||
<a href="#faq">よくある質問</a>
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">ドキュメント · プロバイダ</p>
|
||||
<h1>Qwen を Claude Code・Codex・Gemini CLI・OpenCode で使う</h1>
|
||||
<p class="lede">Alibaba は Qwen を DashScope で提供しています。Alibaba Cloud Model Studio、百炼、Qwen Cloud があり、従量課金と Token Plan があります。どれも OpenAI Chat Completions と Anthropic Messages を話します。キーを magpie に一度追加すれば、Claude Code・Codex・Gemini CLI・OpenCode などつないだすべてのツールが、magpie のゲートウェイ <code>127.0.0.1:3425</code> 経由で Qwen を使えます。</p>
|
||||
|
||||
<h2 id="add"><a class="anchor" href="#add">Qwen を追加する</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>キーを取得</b>従量課金は <a href="https://modelstudio.console.alibabacloud.com/?tab=playground#/api-key">Model Studio</a>(国際版)か <a href="https://bailian.console.aliyun.com/?tab=model#/api-key">百炼</a>(中国)で作ります。Token Plan のキーはそれぞれのプランのページで作ります。</li>
|
||||
<li><b>プロバイダを追加</b>magpie の <span class="ui">プロバイダ</span> で <span class="ui">+ プロバイダを追加</span> を押し、キーを作ったサイトの Qwen プリセット(下の表)を選んでキーを貼り付け、保存します。magpie がエンドポイントに提供モデルを問い合わせます。</li>
|
||||
<li><b>ツールで選ぶ</b><span class="ui">エージェント</span> タブで、ツールの行の <code>qwen3.8-max</code> などの Qwen モデルを選びます。</li>
|
||||
</ol>
|
||||
<div class="code"><span class="lang">ターミナル</span><button class="copy" data-copy="ex-add">コピー</button><pre id="ex-add">magpie provider add qwen sk-… # Model Studio(国際版)
|
||||
magpie provider add qwen-cn sk-… # 百炼(中国)
|
||||
magpie provider add qwen-token-plan sk-sp-… # Qwen Token Plan
|
||||
magpie provider add qwencloud sk-ws-… region=us-east-1</pre></div>
|
||||
<div class="callout"><b>キーは自分のホストでしか使えません。</b>Token Plan のキー(<code>sk-sp-…</code>)は従量課金のエンドポイントでも他の Token Plan でも断られ、Qwen Cloud のキーは自分のリージョンの外では断られます。401 が返ったら、キーを作ったサイトのプリセットに入れたか確かめてください。</div>
|
||||
|
||||
<h2 id="endpoints"><a class="anchor" href="#endpoints">プランとエンドポイント</a></h2>
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>プリセット</th><th>プランとキー</th><th>エンドポイント(Chat Completions、Anthropic Messages)</th></tr>
|
||||
<tr><td>Qwen <span class="ui">qwen</span></td><td>従量課金、国際版(Model Studio)</td><td><code>https://dashscope-intl.aliyuncs.com/compatible-mode/v1</code><br><code>https://dashscope-intl.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen (China) <span class="ui">qwen-cn</span></td><td>従量課金、中国(百炼)</td><td><code>https://dashscope.aliyuncs.com/compatible-mode/v1</code><br><code>https://dashscope.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Token Plan <span class="ui">qwen-token-plan</span></td><td>サブスクリプション、<code>sk-sp-</code></td><td><code>https://token-plan.maas.qianwenaiapi.com/compatible-mode/v1</code><br><code>https://token-plan.maas.qianwenaiapi.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Bailian Token Plan <span class="ui">bailian-token-plan</span></td><td>サブスクリプション、<code>sk-sp-</code></td><td><code>https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1</code><br><code>https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Cloud <span class="ui">qwencloud</span></td><td>従量課金、<code>sk-ws-</code>、6 リージョン、既定はシンガポール</td><td><code>https://{region}.maas.qwencloudapi.com/compatible-mode/v1</code><br><code>https://{region}.maas.qwencloudapi.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Cloud Token Plan <span class="ui">qwencloud-token-plan</span></td><td>サブスクリプション、<code>sk-sp-</code>、シンガポールのみ</td><td><code>https://token-plan.maas.qwencloudapi.com/compatible-mode/v1</code><br><code>https://token-plan.maas.qwencloudapi.com/apps/anthropic</code></td></tr>
|
||||
</table></div>
|
||||
<p>Token Plan のホストがモデル一覧を返さないとき、magpie はプラン概要にあるテキストモデル(auto, qwen3.8-max, qwen3.8-flash, qwen3.7-max, qwen3.7-plus, qwen3.6-flash、それにプランに含まれる DeepSeek と GLM のモデル)を出します。百炼 Token Plan は、<a href="/docs/ja/intent">意図ルーティング</a>でターンを振り分ける判定モデルも提供しています。</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">ツールごとの使い方</a></h2>
|
||||
<p><span class="ui">エージェント</span> タブで各ツールの行のモデルをクリックして選ぶか、ターミナルで選びます。各ガイドに、magpie がそのツールの設定に何を書くか、どう元に戻すかがあります。</p>
|
||||
<div class="code"><span class="lang">ターミナル</span><button class="copy" data-copy="ex-agents">コピー</button><pre id="ex-agents">magpie claude qwen/qwen3.8-max
|
||||
magpie codex qwen/qwen3.8-max
|
||||
magpie gemini model qwen/qwen3.7-plus
|
||||
magpie opencode qwen/qwen3.8-max</pre></div>
|
||||
<ul>
|
||||
<li><b>Claude Code</b> は Anthropic Messages を話し、Qwen の Anthropic エンドポイントも同じなので、リクエストはそのまま渡されます。opus・sonnet・haiku の各ティアは、個別に指定しない限り選んだモデルで動きます。<a href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>。</li>
|
||||
<li><b>Codex</b> が話すのは OpenAI Responses だけです。DashScope は Chat Completions と Anthropic Messages を提供し、Responses は提供していないので、magpie がリクエストと返答を変換します。ストリーミングとツール呼び出しもそのままです。モデルは推論レベル付きで Codex の <code>/model</code> に並びます。<a href="/docs/ja/codex-models">Codex で他のモデル</a>。</li>
|
||||
<li><b>Gemini CLI</b> は Gemini の API を話します。magpie がゲートウェイに向けて変換します。<a href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>。</li>
|
||||
<li><b>OpenCode</b> には、magpie が <code>opencode.json</code> にモデルを推論バリアントと価格つきで書きます。<a href="/docs/ja/opencode-models">OpenCode で他のモデル</a>。</li>
|
||||
</ul>
|
||||
<p>Qwen Code も magpie がつなぐエージェントの一つで、その行では Qwen のモデルも他社のモデルも選べます。</p>
|
||||
|
||||
<h2 id="thinking"><a class="anchor" href="#thinking">思考と画像</a></h2>
|
||||
<ul>
|
||||
<li><b>ストリーミングしない返答。</b>思考する Qwen モデルは DashScope ではストリーミングでしか返答せず、返答をまとめて求めるリクエストは断られます。ツールやルーティンググループの分類器がまとめた返答を求めたとき、magpie は DashScope にストリーミングで求め、思考を含めた返答全体をツールに渡します。</li>
|
||||
<li><b>常に思考するモデル。</b>DashScope の <code>glm-5.3</code> のように、思考をオフにできないモデルがあります。ツールがオフを求めてモデルが断ったとき、magpie は思考をオンのまま聞き直します。</li>
|
||||
<li><b>画像。</b>Qwen-Image と <code>wan2.7-image</code> モデルは DashScope 自身の画像 API で描きます。6 つのプリセットのどれでも使えます。magpie の <span class="ui">設定 → 画像</span> で選びます。サイズは <code>幅x高さ</code> で、最大 2048×2048 です。</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="usage"><a class="anchor" href="#usage">残高と使用量</a></h2>
|
||||
<p>magpie は Qwen の残高やプランのカードを表示しません。DashScope にはキーの残高を読む API がなく、どちらの Token Plan にもクレジットを読む API がないためです(クレジットは Alibaba のコンソールのサブスクリプションページにあります)。<span class="ui">使用量</span> タブは、magpie を通った各ツールとモデルのトークン、キャッシュヒット、費用を数えます。</p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">よくある質問</a></h2>
|
||||
<h3>Claude Code で Qwen を使うには?</h3>
|
||||
<p>magpie にキーを追加し(プロバイダ → プロバイダを追加 → キーを作ったサイトの Qwen プリセット)、Claude Code の行で <code>qwen3.8-max</code> などの Qwen モデルを選ぶか、<code>magpie claude qwen/qwen3.8-max</code> を実行します。magpie が Claude Code の <code>settings.json</code> を書き、リクエストを DashScope の Anthropic エンドポイントに渡します。</p>
|
||||
<h3>Codex で Qwen(Qwen3 Coder も)を使えますか?</h3>
|
||||
<p>使えます。magpie は DashScope がそのキーに出すモデルを Coder モデルも含めて一覧にし、Codex はどれでも使えます。Codex の Responses リクエストを magpie が Chat Completions に変換し、返答も戻します。Codex の行で選ぶか <code>magpie codex qwen/qwen3.8-max</code> を実行すると、Codex の <code>/model</code> に並びます。</p>
|
||||
<h3>キーはどのプリセットに入れればいいですか?</h3>
|
||||
<p>キーを作ったサイトのプリセットです。Token Plan のキー(<code>sk-sp-…</code>)はそのプランのホストでしか使えず、Qwen Cloud の従量課金キー(<code>sk-ws-…</code>)は自分のリージョンでしか使えないので、別のプリセットに入れると 401 で断られます。</p>
|
||||
<h3>Qwen Code で他のモデルを使えますか?</h3>
|
||||
<p>使えます。Qwen Code は magpie がつなぐエージェントの一つなので、エージェント タブのその行で、追加したどのモデルでも選べます。</p>
|
||||
<h3>Token Plan の残りクレジットは表示されますか?</h3>
|
||||
<p>されません。どちらの Token Plan にもクレジットを読む API がなく、Alibaba のコンソールのサブスクリプションページに表示されます。magpie の使用量タブは、各ツールが使ったトークンを数えます。</p>
|
||||
|
||||
<p style="margin-top:48px">ツールごとのガイド:<a href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>、<a href="/docs/ja/codex-models">Codex で他のモデル</a>、<a href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>、<a href="/docs/ja/opencode-models">OpenCode で他のモデル</a>。困ったときは <a href="https://discord.gg/vGSnD3ZKQF">Discord</a> で質問してください。</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap">
|
||||
<span>© 2026 magpie · MIT</span>
|
||||
<div class="links">
|
||||
<a href="/ja/">ホーム</a>
|
||||
<a href="/docs/ja/intent">インテントルーティング</a>
|
||||
<a href="/docs/ja/plugins">プラグイン</a>
|
||||
<a href="/docs/ja/remote">リモート magpie</a>
|
||||
<a href="/docs/ja/docker">Docker</a>
|
||||
<a href="/docs/ja/privacy">プライバシー</a>
|
||||
<a href="/docs/ja/masking">プライバシーマスキング</a>
|
||||
<a href="/docs/ja/mcp-router">MCP ルーター</a>
|
||||
<a href="/docs/ja/library">ライブラリ</a>
|
||||
<a href="/docs/ja/claude-code-models">Claude Code で他のモデル</a>
|
||||
<a href="/docs/ja/codex-models">Codex で他のモデル</a>
|
||||
<a href="/docs/ja/gemini-cli-models">Gemini CLI で他のモデル</a>
|
||||
<a href="/docs/ja/subscriptions">サブスクを任意のエージェントで</a>
|
||||
<a href="/docs/ja/local-models">ローカルモデル</a>
|
||||
<a href="/docs/ja/opencode-models">OpenCode で他のモデル</a>
|
||||
<a href="/docs/ja/alternatives">CC Switch・CCR との比較</a>
|
||||
<a href="/docs/ja/import">magpie に追加</a>
|
||||
<a href="/docs/integrate">アプリ連携</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="/docs/ja/contributors">コントリビューター</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">リリース</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const next = { system: "light", light: "dark", dark: "system" };
|
||||
document.querySelectorAll("button.theme").forEach((b) => {
|
||||
b.dataset.mode = themeMode();
|
||||
b.title = "Theme: " + themeMode();
|
||||
b.addEventListener("click", () => setTheme(next[themeMode()]));
|
||||
});
|
||||
|
||||
document.querySelectorAll(".copy").forEach((b) => b.addEventListener("click", async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(document.getElementById(b.dataset.copy).textContent);
|
||||
b.textContent = "コピーしました"; setTimeout(() => (b.textContent = "コピー"), 1400);
|
||||
} catch {}
|
||||
}));
|
||||
})();
|
||||
</script>
|
||||
<script src="/docs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,287 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MiniMax and the MiniMax Coding Plan in Claude Code, Codex, Gemini CLI and OpenCode · magpie</title>
|
||||
<meta name="description" content="Use MiniMax M3 and M2.7 in Claude Code, Codex, Gemini CLI and OpenCode with magpie: a pay-as-you-go or Coding Plan key, the global and China endpoints, interleaved thinking, effort for M3.1 Flash, and the Coding Plan's usage windows.">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
(() => {
|
||||
let mode = "system";
|
||||
try { mode = localStorage.getItem("theme") || "system"; } catch {}
|
||||
const q = matchMedia("(prefers-color-scheme: dark)");
|
||||
const apply = () => {
|
||||
const t = mode === "system" ? (q.matches ? "dark" : "light") : mode;
|
||||
document.documentElement.dataset.theme = t;
|
||||
document.querySelector('meta[name="theme-color"]').content = t === "dark" ? "#0b0b0c" : "#fafafa";
|
||||
document.querySelectorAll("button.theme").forEach((b) => { b.dataset.mode = mode; b.title = "Theme: " + mode; });
|
||||
};
|
||||
q.addEventListener("change", () => mode === "system" && apply());
|
||||
window.setTheme = (m) => { mode = m; try { m === "system" ? localStorage.removeItem("theme") : localStorage.setItem("theme", m); } catch {} apply(); };
|
||||
window.themeMode = () => mode;
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/minimax">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/minimax">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/minimax">
|
||||
<link rel="alternate" hreflang="x-default" href="https://usemagpie.ai/docs/minimax">
|
||||
<link rel="canonical" href="https://usemagpie.ai/docs/minimax">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:site_name" content="magpie">
|
||||
<meta property="og:title" content="MiniMax and the MiniMax Coding Plan in Claude Code, Codex, Gemini CLI and OpenCode">
|
||||
<meta property="og:description" content="Use MiniMax M3 and M2.7 in Claude Code, Codex, Gemini CLI and OpenCode with magpie: a pay-as-you-go or Coding Plan key, the global and China endpoints, interleaved thinking, effort for M3.1 Flash, and the Coding Plan's usage windows.">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/minimax">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "TechArticle",
|
||||
"headline": "MiniMax and the MiniMax Coding Plan in Claude Code, Codex, Gemini CLI and OpenCode",
|
||||
"description": "Use MiniMax M3 and M2.7 in Claude Code, Codex, Gemini CLI and OpenCode with magpie: a pay-as-you-go or Coding Plan key, the global and China endpoints, interleaved thinking, effort for M3.1 Flash, and the Coding Plan's usage windows.",
|
||||
"inLanguage": "en",
|
||||
"url": "https://usemagpie.ai/docs/minimax",
|
||||
"about": {
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "magpie",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "macOS, Windows, Linux"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "magpie",
|
||||
"url": "https://usemagpie.ai/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "How do I use MiniMax M2.7 or M3 in Claude Code?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Add your MiniMax key in magpie (Providers, Add provider, MiniMax or MiniMax (China)), then pick a model such as MiniMax-M3 on Claude Code’s row, or run magpie claude minimax/MiniMax-M3. magpie writes Claude Code’s settings.json and passes its requests to MiniMax’s Anthropic endpoint, https://api.minimax.io/anthropic."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "How do I use the MiniMax Coding Plan?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Add the Coding Plan key (sk-cp-…) to the MiniMax preset of the site you bought it on, the same as a pay-as-you-go key. magpie tells the two apart by what MiniMax says about the key, and shows a Coding Plan key’s usage windows on its row."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Can Codex use MiniMax?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. MiniMax serves Chat Completions and Anthropic Messages but not Responses, so magpie translates Codex’s requests and MiniMax’s replies. Pick the model on Codex’s row or run magpie codex minimax/MiniMax-M3; it shows in Codex’s /model list."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Can MiniMax Code use other models?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. MiniMax Code is one of the agents magpie connects, so its row in the Agents tab takes any model you have added, MiniMax’s or another vendor’s."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Why does MiniMax’s thinking show up in the text?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "MiniMax’s Chat API puts a model’s thinking in the reply text between <think> tags. magpie takes it out and gives it to the agent as thinking, then puts it back on the next turns, where MiniMax wants it."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Can I use several MiniMax keys?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. Add them all to the MiniMax provider and tick each one. magpie spreads requests over them, and weighs and rests Coding Plan keys by their windows, so a key that has used up its window sits out until it resets."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav><div class="wrap">
|
||||
<a class="brand" href="/"><img class="bird" src="/img/magpie-small.svg" alt="">magpie <small>Docs</small></a>
|
||||
<div class="links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/docs/start">Get started</a>
|
||||
<a href="/docs/intent">Intent routing</a>
|
||||
<a href="/docs/plugins">Plugins</a>
|
||||
<a class="toc-only" href="/docs/remote">Remote magpie</a>
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a class="toc-only" href="/docs/library">Library</a>
|
||||
<a class="toc-only" href="/docs/claude-code-models">Models in Claude Code</a>
|
||||
<a class="toc-only" href="/docs/codex-models">Models in Codex</a>
|
||||
<a class="toc-only" href="/docs/gemini-cli-models">Models in Gemini CLI</a>
|
||||
<a class="toc-only" href="/docs/subscriptions">Subscriptions in any agent</a>
|
||||
<a class="toc-only" href="/docs/local-models">Local models</a>
|
||||
<a class="toc-only" href="/docs/opencode-models">Models in OpenCode</a>
|
||||
<a class="toc-only" href="/docs/alternatives">magpie vs CC Switch vs CCR</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
</div>
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="Language" title="Language" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/minimax" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/minimax" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/minimax" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="magpie on Discord" title="Join us on Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
<a class="icon-btn" href="https://github.com/yetone/magpie" aria-label="magpie on GitHub" title="Source on GitHub"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg></a>
|
||||
<button class="icon-btn theme" type="button" aria-label="Theme" title="Theme: system"><svg class="i-system" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1.75" y="2.75" width="12.5" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11.25V14"/></svg><svg class="i-light" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg><svg class="i-dark" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M13.5 9.5A5.5 5.5 0 0 1 6.5 2.5a5.5 5.5 0 1 0 7 7Z"/></svg></button>
|
||||
<a class="btn small" href="/#get">Download</a>
|
||||
</div></nav>
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>On this page</p>
|
||||
<a href="#add">Add it</a>
|
||||
<a href="#endpoints">Plans and endpoints</a>
|
||||
<a href="#agents">In each agent</a>
|
||||
<a href="#thinking">Thinking</a>
|
||||
<a href="#usage">Balance and usage</a>
|
||||
<a href="#faq">FAQ</a>
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">Docs · Provider</p>
|
||||
<h1>MiniMax and the MiniMax Coding Plan in Claude Code, Codex, Gemini CLI and OpenCode</h1>
|
||||
<p class="lede">MiniMax serves an OpenAI-compatible Chat API and an Anthropic-compatible one, on a global site and a China site, for pay-as-you-go keys and Coding Plan keys alike. Add your key to magpie once, and Claude Code, Codex, Gemini CLI, OpenCode and every other agent you connect can use models such as <code>MiniMax-M3</code> and <code>MiniMax-M2.7</code> through magpie’s gateway at <code>127.0.0.1:3425</code>.</p>
|
||||
|
||||
<h2 id="add"><a class="anchor" href="#add">Add MiniMax</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>Get a key</b>Create one at <a href="https://platform.minimax.io/user-center/basic-information/interface-key">platform.minimax.io</a>, or <a href="https://platform.minimaxi.com/user-center/basic-information/interface-key">platform.minimaxi.com</a> for the China site. A Coding Plan key starts with <code>sk-cp-</code>.</li>
|
||||
<li><b>Add the provider</b>In magpie’s <span class="ui">Providers</span> tab, press <span class="ui">+ Add provider</span>, pick MiniMax or MiniMax (China), paste the key and save. A pay-as-you-go key and a Coding Plan key go in the same way.</li>
|
||||
<li><b>Pick it for an agent</b>In the <span class="ui">Agents</span> tab, click the model on the agent’s row and choose a MiniMax model.</li>
|
||||
</ol>
|
||||
<div class="code"><span class="lang">Terminal</span><button class="copy" data-copy="ex-add">Copy</button><pre id="ex-add">magpie provider add minimax sk-… # platform.minimax.io
|
||||
magpie provider add minimax-cn sk-cp-… # Coding Plan, platform.minimaxi.com</pre></div>
|
||||
|
||||
<h2 id="endpoints"><a class="anchor" href="#endpoints">Plans and endpoints</a></h2>
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>Preset</th><th>Site</th><th>Chat Completions</th><th>Anthropic Messages</th></tr>
|
||||
<tr><td>MiniMax <span class="ui">minimax</span></td><td>platform.minimax.io</td><td><code>https://api.minimax.io/v1</code></td><td><code>https://api.minimax.io/anthropic</code></td></tr>
|
||||
<tr><td>MiniMax (China) <span class="ui">minimax-cn</span></td><td>platform.minimaxi.com</td><td><code>https://api.minimaxi.com/v1</code></td><td><code>https://api.minimaxi.com/anthropic</code></td></tr>
|
||||
</table></div>
|
||||
<p>The Coding Plan uses the same endpoints as pay as you go; the key decides which one a request is billed to. A global key and a China key are different accounts, so each goes under its own site’s preset.</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">In each agent</a></h2>
|
||||
<p>Pick the model on an agent’s row in the <span class="ui">Agents</span> tab, or from a terminal. Each guide says what magpie writes in that agent’s config and how to switch back.</p>
|
||||
<div class="code"><span class="lang">Terminal</span><button class="copy" data-copy="ex-agents">Copy</button><pre id="ex-agents">magpie claude minimax/MiniMax-M3
|
||||
magpie codex minimax/MiniMax-M3
|
||||
magpie gemini model minimax/MiniMax-M2.7
|
||||
magpie opencode minimax/MiniMax-M3</pre></div>
|
||||
<ul>
|
||||
<li><b>Claude Code</b> speaks Anthropic Messages, and so does MiniMax’s Anthropic endpoint, so its requests are passed on as they are. Every tier (opus, sonnet, haiku) runs on the model you pick unless you give one its own. <a href="/docs/claude-code-models">Models in Claude Code</a>.</li>
|
||||
<li><b>Codex</b> speaks only OpenAI Responses. MiniMax serves Chat Completions and Anthropic Messages but not Responses, so magpie translates each request and the reply, streaming and tool calls included. The model shows in Codex’s <code>/model</code> with its reasoning efforts. <a href="/docs/codex-models">Models in Codex</a>.</li>
|
||||
<li><b>Gemini CLI</b> speaks Gemini’s API. magpie points it at its gateway and translates. <a href="/docs/gemini-cli-models">Models in Gemini CLI</a>.</li>
|
||||
<li><b>OpenCode</b> gets the model in <code>opencode.json</code>, with its reasoning variants and cost. <a href="/docs/opencode-models">Models in OpenCode</a>.</li>
|
||||
</ul>
|
||||
<p>MiniMax Code is one of the agents magpie connects too: its row takes MiniMax’s models or any other vendor’s.</p>
|
||||
|
||||
<h2 id="thinking"><a class="anchor" href="#thinking">Thinking and effort</a></h2>
|
||||
<ul>
|
||||
<li><b>Interleaved thinking.</b> MiniMax’s Chat API gives a model’s thinking in the reply text, between <code><think></code> tags, and wants it back there on later turns. magpie hands it to the agent as thinking and puts it back where MiniMax expects it.</li>
|
||||
<li><b>Effort.</b> <code>MiniMax-M3.1-Flash</code> and its preview think at levels from low to max. magpie sends the level an agent asks for in <code>output_config.effort</code>, as MiniMax Code does, so it isn’t lost to a token budget.</li>
|
||||
<li><b>Models that always think.</b> <code>MiniMax-M3.1-Flash-Preview</code> refuses to have thinking turned off. When an agent asks for it off, magpie asks again with thinking left on, so the agent gets an answer rather than the error.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="usage"><a class="anchor" href="#usage">Coding Plan windows and usage</a></h2>
|
||||
<ul>
|
||||
<li><b>Coding Plan windows.</b> A Coding Plan key’s row shows what is left of each window MiniMax reports, a rolling one and a weekly one, read from MiniMax. Models draw on the general bucket; a bucket metered apart, such as video, shows as a count, like 4 / 5. A pay-as-you-go key has no windows and no card.</li>
|
||||
<li><b>Routing.</b> With several Coding Plan keys, magpie weighs them by their windows and rests one that has used a window up until it resets.</li>
|
||||
<li><b>Usage.</b> The <span class="ui">Usage</span> tab counts tokens, cache hits and cost for each agent and model that went through magpie.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">FAQ</a></h2>
|
||||
<h3>How do I use MiniMax M2.7 or M3 in Claude Code?</h3>
|
||||
<p>Add your MiniMax key in magpie (Providers, Add provider, MiniMax or MiniMax (China)), then pick a model such as <code>MiniMax-M3</code> on Claude Code’s row, or run <code>magpie claude minimax/MiniMax-M3</code>. magpie writes Claude Code’s <code>settings.json</code> and passes its requests to MiniMax’s Anthropic endpoint, <code>https://api.minimax.io/anthropic</code>.</p>
|
||||
<h3>How do I use the MiniMax Coding Plan?</h3>
|
||||
<p>Add the Coding Plan key (<code>sk-cp-…</code>) to the MiniMax preset of the site you bought it on, the same as a pay-as-you-go key. magpie tells the two apart by what MiniMax says about the key, and shows a Coding Plan key’s usage windows on its row.</p>
|
||||
<h3>Can Codex use MiniMax?</h3>
|
||||
<p>Yes. MiniMax serves Chat Completions and Anthropic Messages but not Responses, so magpie translates Codex’s requests and MiniMax’s replies. Pick the model on Codex’s row or run <code>magpie codex minimax/MiniMax-M3</code>; it shows in Codex’s <code>/model</code> list.</p>
|
||||
<h3>Can MiniMax Code use other models?</h3>
|
||||
<p>Yes. MiniMax Code is one of the agents magpie connects, so its row in the Agents tab takes any model you have added, MiniMax’s or another vendor’s.</p>
|
||||
<h3>Why does MiniMax’s thinking show up in the text?</h3>
|
||||
<p>MiniMax’s Chat API puts a model’s thinking in the reply text between <code><think></code> tags. magpie takes it out and gives it to the agent as thinking, then puts it back on the next turns, where MiniMax wants it.</p>
|
||||
<h3>Can I use several MiniMax keys?</h3>
|
||||
<p>Yes. Add them all to the MiniMax provider and tick each one. magpie spreads requests over them, and weighs and rests Coding Plan keys by their windows, so a key that has used up its window sits out until it resets.</p>
|
||||
|
||||
<p style="margin-top:48px">Every agent: <a href="/docs/claude-code-models">Models in Claude Code</a>, <a href="/docs/codex-models">Models in Codex</a>, <a href="/docs/gemini-cli-models">Models in Gemini CLI</a>, <a href="/docs/opencode-models">Models in OpenCode</a>. Ask on <a href="https://discord.gg/vGSnD3ZKQF">Discord</a> if you get stuck.</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap">
|
||||
<span>© 2026 magpie · MIT</span>
|
||||
<div class="links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/docs/intent">Intent routing</a>
|
||||
<a href="/docs/plugins">Plugins</a>
|
||||
<a href="/docs/remote">Remote magpie</a>
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/library">Library</a>
|
||||
<a href="/docs/claude-code-models">Models in Claude Code</a>
|
||||
<a href="/docs/codex-models">Models in Codex</a>
|
||||
<a href="/docs/gemini-cli-models">Models in Gemini CLI</a>
|
||||
<a href="/docs/subscriptions">Subscriptions in any agent</a>
|
||||
<a href="/docs/local-models">Local models</a>
|
||||
<a href="/docs/opencode-models">Models in OpenCode</a>
|
||||
<a href="/docs/alternatives">magpie vs CC Switch vs CCR</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="/docs/contributors">Contributors</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const next = { system: "light", light: "dark", dark: "system" };
|
||||
document.querySelectorAll("button.theme").forEach((b) => {
|
||||
b.dataset.mode = themeMode();
|
||||
b.title = "Theme: " + themeMode();
|
||||
b.addEventListener("click", () => setTheme(next[themeMode()]));
|
||||
});
|
||||
|
||||
document.querySelectorAll(".copy").forEach((b) => b.addEventListener("click", async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(document.getElementById(b.dataset.copy).textContent);
|
||||
b.textContent = "Copied"; setTimeout(() => (b.textContent = "Copy"), 1400);
|
||||
} catch {}
|
||||
}));
|
||||
})();
|
||||
</script>
|
||||
<script src="/docs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -239,7 +239,7 @@ magpie visible opencode all # every model again</pre></div>
|
||||
<div class="code"><span class="lang">Terminal</span><button class="copy" data-copy="ex-oc-back">Copy</button><pre id="ex-oc-back">magpie opencode default</pre></div>
|
||||
<p>It puts back the <code>model</code> and <code>small_model</code> OpenCode had before magpie, and takes the <code>magpie</code> provider out of the file.</p>
|
||||
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a></p>
|
||||
<p><b>By provider:</b> <a href="/docs/deepseek">DeepSeek</a> · <a href="/docs/kimi">Kimi and Kimi Code</a> · <a href="/docs/glm">GLM Coding Plan</a> · <a href="/docs/qwen">Qwen</a> · <a href="/docs/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">FAQ</a></h2>
|
||||
<h3>How do I use DeepSeek in OpenCode?</h3>
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Qwen in Claude Code, Codex, Gemini CLI and OpenCode · magpie</title>
|
||||
<meta name="description" content="Use Qwen in Claude Code, Codex, Gemini CLI and OpenCode with magpie: Alibaba Cloud Model Studio (DashScope) and Bailian keys, the Qwen and Bailian Token Plans, Qwen Cloud's regions, which endpoint each key works on, and how thinking is handled.">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
(() => {
|
||||
let mode = "system";
|
||||
try { mode = localStorage.getItem("theme") || "system"; } catch {}
|
||||
const q = matchMedia("(prefers-color-scheme: dark)");
|
||||
const apply = () => {
|
||||
const t = mode === "system" ? (q.matches ? "dark" : "light") : mode;
|
||||
document.documentElement.dataset.theme = t;
|
||||
document.querySelector('meta[name="theme-color"]').content = t === "dark" ? "#0b0b0c" : "#fafafa";
|
||||
document.querySelectorAll("button.theme").forEach((b) => { b.dataset.mode = mode; b.title = "Theme: " + mode; });
|
||||
};
|
||||
q.addEventListener("change", () => mode === "system" && apply());
|
||||
window.setTheme = (m) => { mode = m; try { m === "system" ? localStorage.removeItem("theme") : localStorage.setItem("theme", m); } catch {} apply(); };
|
||||
window.themeMode = () => mode;
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/qwen">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/qwen">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/qwen">
|
||||
<link rel="alternate" hreflang="x-default" href="https://usemagpie.ai/docs/qwen">
|
||||
<link rel="canonical" href="https://usemagpie.ai/docs/qwen">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:site_name" content="magpie">
|
||||
<meta property="og:title" content="Qwen in Claude Code, Codex, Gemini CLI and OpenCode">
|
||||
<meta property="og:description" content="Use Qwen in Claude Code, Codex, Gemini CLI and OpenCode with magpie: Alibaba Cloud Model Studio (DashScope) and Bailian keys, the Qwen and Bailian Token Plans, Qwen Cloud's regions, which endpoint each key works on, and how thinking is handled.">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/qwen">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "TechArticle",
|
||||
"headline": "Qwen in Claude Code, Codex, Gemini CLI and OpenCode",
|
||||
"description": "Use Qwen in Claude Code, Codex, Gemini CLI and OpenCode with magpie: Alibaba Cloud Model Studio (DashScope) and Bailian keys, the Qwen and Bailian Token Plans, Qwen Cloud's regions, which endpoint each key works on, and how thinking is handled.",
|
||||
"inLanguage": "en",
|
||||
"url": "https://usemagpie.ai/docs/qwen",
|
||||
"about": {
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "magpie",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "macOS, Windows, Linux"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "magpie",
|
||||
"url": "https://usemagpie.ai/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "How do I use Qwen in Claude Code?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Add your key in magpie (Providers, Add provider, then the Qwen preset your key is from), then pick a Qwen model such as qwen3.8-max on Claude Code’s row, or run magpie claude qwen/qwen3.8-max. magpie writes Claude Code’s settings.json and passes its requests to DashScope’s Anthropic endpoint."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Can Codex use Qwen, Qwen3 Coder included?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. magpie lists the models DashScope gives your key, coder models included, and Codex can use any of them: magpie translates Codex’s Responses requests to Chat Completions and the replies back. Pick the model on Codex’s row or run magpie codex qwen/qwen3.8-max; it shows in Codex’s /model list."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Which preset do I pick for my key?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "The one whose site the key is from. A Token Plan key (sk-sp-…) works only on its own plan’s host, and a Qwen Cloud pay-as-you-go key (sk-ws-…) only in its own region, so a key added to another preset is turned away with 401."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Can Qwen Code use other models?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes. Qwen Code is one of the agents magpie connects, so its row in the Agents tab takes any model you have added, Qwen’s or another vendor’s."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Why does a Qwen request without streaming work in magpie?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "DashScope turns away a thinking Qwen model asked for one whole reply (enable_thinking must be false for non-streaming calls). magpie asks for it streamed and hands the agent the whole reply, thinking included."
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Does magpie show my Token Plan credits?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "No. Neither Token Plan has an API for its credits; the plan’s subscription page in Alibaba’s console shows them. magpie’s Usage tab still counts the tokens each agent spent."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav><div class="wrap">
|
||||
<a class="brand" href="/"><img class="bird" src="/img/magpie-small.svg" alt="">magpie <small>Docs</small></a>
|
||||
<div class="links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/docs/start">Get started</a>
|
||||
<a href="/docs/intent">Intent routing</a>
|
||||
<a href="/docs/plugins">Plugins</a>
|
||||
<a class="toc-only" href="/docs/remote">Remote magpie</a>
|
||||
<a class="toc-only" href="/docs/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/privacy">Privacy</a>
|
||||
<a class="toc-only" href="/docs/masking">Privacy masking</a>
|
||||
<a class="toc-only" href="/docs/mcp-router">MCP router</a>
|
||||
<a class="toc-only" href="/docs/library">Library</a>
|
||||
<a class="toc-only" href="/docs/claude-code-models">Models in Claude Code</a>
|
||||
<a class="toc-only" href="/docs/codex-models">Models in Codex</a>
|
||||
<a class="toc-only" href="/docs/gemini-cli-models">Models in Gemini CLI</a>
|
||||
<a class="toc-only" href="/docs/subscriptions">Subscriptions in any agent</a>
|
||||
<a class="toc-only" href="/docs/local-models">Local models</a>
|
||||
<a class="toc-only" href="/docs/opencode-models">Models in OpenCode</a>
|
||||
<a class="toc-only" href="/docs/alternatives">magpie vs CC Switch vs CCR</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
</div>
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="Language" title="Language" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/qwen" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/qwen" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/qwen" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="magpie on Discord" title="Join us on Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
<a class="icon-btn" href="https://github.com/yetone/magpie" aria-label="magpie on GitHub" title="Source on GitHub"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg></a>
|
||||
<button class="icon-btn theme" type="button" aria-label="Theme" title="Theme: system"><svg class="i-system" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1.75" y="2.75" width="12.5" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11.25V14"/></svg><svg class="i-light" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg><svg class="i-dark" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M13.5 9.5A5.5 5.5 0 0 1 6.5 2.5a5.5 5.5 0 1 0 7 7Z"/></svg></button>
|
||||
<a class="btn small" href="/#get">Download</a>
|
||||
</div></nav>
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>On this page</p>
|
||||
<a href="#add">Add it</a>
|
||||
<a href="#endpoints">Plans and endpoints</a>
|
||||
<a href="#agents">In each agent</a>
|
||||
<a href="#thinking">Thinking</a>
|
||||
<a href="#usage">Balance and usage</a>
|
||||
<a href="#faq">FAQ</a>
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">Docs · Provider</p>
|
||||
<h1>Qwen in Claude Code, Codex, Gemini CLI and OpenCode</h1>
|
||||
<p class="lede">Alibaba serves Qwen through DashScope, on Alibaba Cloud Model Studio, Bailian and Qwen Cloud, pay as you go or on a Token Plan. Every one of them speaks OpenAI Chat Completions and Anthropic Messages. Add your key to magpie once, and Claude Code, Codex, Gemini CLI, OpenCode and every other agent you connect can use Qwen through magpie’s gateway at <code>127.0.0.1:3425</code>.</p>
|
||||
|
||||
<h2 id="add"><a class="anchor" href="#add">Add Qwen</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>Get a key</b>Pay as you go: <a href="https://modelstudio.console.alibabacloud.com/?tab=playground#/api-key">Model Studio</a> (international) or <a href="https://bailian.console.aliyun.com/?tab=model#/api-key">Bailian</a> (China). A Token Plan’s key comes from its own plan page.</li>
|
||||
<li><b>Add the provider</b>In magpie’s <span class="ui">Providers</span> tab, press <span class="ui">+ Add provider</span>, pick the Qwen preset your key is from (the table below), paste the key and save. magpie asks the endpoint which models it serves.</li>
|
||||
<li><b>Pick it for an agent</b>In the <span class="ui">Agents</span> tab, click the model on the agent’s row and choose a Qwen model such as <code>qwen3.8-max</code>.</li>
|
||||
</ol>
|
||||
<div class="code"><span class="lang">Terminal</span><button class="copy" data-copy="ex-add">Copy</button><pre id="ex-add">magpie provider add qwen sk-… # Model Studio, international
|
||||
magpie provider add qwen-cn sk-… # Bailian, China
|
||||
magpie provider add bailian-token-plan sk-sp-… # Bailian Token Plan
|
||||
magpie provider add qwencloud sk-ws-… region=us-east-1</pre></div>
|
||||
<div class="callout"><b>Each key works on its own host only.</b> A Token Plan key (<code>sk-sp-…</code>) is refused by pay-as-you-go endpoints and by the other Token Plans, and a Qwen Cloud key is refused outside its region. If a request comes back 401, check that the key sits under the preset it was made for.</div>
|
||||
|
||||
<h2 id="endpoints"><a class="anchor" href="#endpoints">Plans and endpoints</a></h2>
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>Preset</th><th>Plan and key</th><th>Endpoints (Chat Completions, Anthropic Messages)</th></tr>
|
||||
<tr><td>Qwen <span class="ui">qwen</span></td><td>pay as you go, international (Model Studio)</td><td><code>https://dashscope-intl.aliyuncs.com/compatible-mode/v1</code><br><code>https://dashscope-intl.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen (China) <span class="ui">qwen-cn</span></td><td>pay as you go, China (Bailian)</td><td><code>https://dashscope.aliyuncs.com/compatible-mode/v1</code><br><code>https://dashscope.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Token Plan <span class="ui">qwen-token-plan</span></td><td>subscription, <code>sk-sp-</code></td><td><code>https://token-plan.maas.qianwenaiapi.com/compatible-mode/v1</code><br><code>https://token-plan.maas.qianwenaiapi.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Bailian Token Plan <span class="ui">bailian-token-plan</span></td><td>subscription, <code>sk-sp-</code></td><td><code>https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1</code><br><code>https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Cloud <span class="ui">qwencloud</span></td><td>pay as you go, <code>sk-ws-</code>, six regions, Singapore the default</td><td><code>https://{region}.maas.qwencloudapi.com/compatible-mode/v1</code><br><code>https://{region}.maas.qwencloudapi.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Cloud Token Plan <span class="ui">qwencloud-token-plan</span></td><td>subscription, <code>sk-sp-</code>, Singapore</td><td><code>https://token-plan.maas.qwencloudapi.com/compatible-mode/v1</code><br><code>https://token-plan.maas.qwencloudapi.com/apps/anthropic</code></td></tr>
|
||||
</table></div>
|
||||
<p>When a Token Plan’s host gives no model list, magpie offers the plan’s text models as its overview lists them: auto, qwen3.8-max, qwen3.8-flash, qwen3.7-max, qwen3.7-plus, qwen3.6-flash, and the DeepSeek and GLM models the plan includes. The Bailian Token Plan also serves a decision model that can classify turns for <a href="/docs/intent">intent routing</a>.</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">In each agent</a></h2>
|
||||
<p>Pick the model on an agent’s row in the <span class="ui">Agents</span> tab, or from a terminal. Each guide says what magpie writes in that agent’s config and how to switch back.</p>
|
||||
<div class="code"><span class="lang">Terminal</span><button class="copy" data-copy="ex-agents">Copy</button><pre id="ex-agents">magpie claude qwen/qwen3.8-max
|
||||
magpie codex qwen/qwen3.8-max
|
||||
magpie gemini model qwen/qwen3.7-plus
|
||||
magpie opencode qwen/qwen3.8-max</pre></div>
|
||||
<ul>
|
||||
<li><b>Claude Code</b> speaks Anthropic Messages, and so does Qwen’s Anthropic endpoint, so its requests are passed on as they are. Every tier (opus, sonnet, haiku) runs on the model you pick unless you give one its own. <a href="/docs/claude-code-models">Models in Claude Code</a>.</li>
|
||||
<li><b>Codex</b> speaks only OpenAI Responses. DashScope serves Chat Completions and Anthropic Messages but not Responses, so magpie translates each request and the reply, streaming and tool calls included. The model shows in Codex’s <code>/model</code> with its reasoning efforts. <a href="/docs/codex-models">Models in Codex</a>.</li>
|
||||
<li><b>Gemini CLI</b> speaks Gemini’s API. magpie points it at its gateway and translates. <a href="/docs/gemini-cli-models">Models in Gemini CLI</a>.</li>
|
||||
<li><b>OpenCode</b> gets the model in <code>opencode.json</code>, with its reasoning variants and cost. <a href="/docs/opencode-models">Models in OpenCode</a>.</li>
|
||||
</ul>
|
||||
<p>Qwen Code is one of the agents magpie connects too: its row takes Qwen’s models or any other vendor’s.</p>
|
||||
|
||||
<h2 id="thinking"><a class="anchor" href="#thinking">Thinking and images</a></h2>
|
||||
<ul>
|
||||
<li><b>Whole replies.</b> DashScope answers a thinking Qwen model only as a stream, and turns away a request for one whole reply. When an agent or a routing group’s classifier asks for one, magpie asks DashScope for a stream and gives the agent the whole reply, thinking included.</li>
|
||||
<li><b>Models that always think.</b> Some models on DashScope refuse to have thinking turned off, such as its <code>glm-5.3</code>. When an agent asks for it off and the model refuses, magpie asks again with thinking left on.</li>
|
||||
<li><b>Images.</b> The Qwen-Image and <code>wan2.7-image</code> models draw through DashScope’s own image API, on any of the six presets. Choose one in magpie’s <span class="ui">Settings → Images</span>. Give a size as <code>WIDTHxHEIGHT</code>, at most 2048×2048.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="usage"><a class="anchor" href="#usage">Balance and usage</a></h2>
|
||||
<p>magpie shows no balance or plan card for Qwen: DashScope has no API for a key’s balance, and neither Token Plan has one for its credits, which the plan’s subscription page in Alibaba’s console shows. The <span class="ui">Usage</span> tab counts tokens, cache hits and cost for each agent and model that went through magpie.</p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">FAQ</a></h2>
|
||||
<h3>How do I use Qwen in Claude Code?</h3>
|
||||
<p>Add your key in magpie (Providers, Add provider, then the Qwen preset your key is from), then pick a Qwen model such as <code>qwen3.8-max</code> on Claude Code’s row, or run <code>magpie claude qwen/qwen3.8-max</code>. magpie writes Claude Code’s <code>settings.json</code> and passes its requests to DashScope’s Anthropic endpoint.</p>
|
||||
<h3>Can Codex use Qwen, Qwen3 Coder included?</h3>
|
||||
<p>Yes. magpie lists the models DashScope gives your key, coder models included, and Codex can use any of them: magpie translates Codex’s Responses requests to Chat Completions and the replies back. Pick the model on Codex’s row or run <code>magpie codex qwen/qwen3.8-max</code>; it shows in Codex’s <code>/model</code> list.</p>
|
||||
<h3>Which preset do I pick for my key?</h3>
|
||||
<p>The one whose site the key is from. A Token Plan key (<code>sk-sp-…</code>) works only on its own plan’s host, and a Qwen Cloud pay-as-you-go key (<code>sk-ws-…</code>) only in its own region, so a key added to another preset is turned away with 401.</p>
|
||||
<h3>Can Qwen Code use other models?</h3>
|
||||
<p>Yes. Qwen Code is one of the agents magpie connects, so its row in the Agents tab takes any model you have added, Qwen’s or another vendor’s.</p>
|
||||
<h3>Why does a Qwen request without streaming work in magpie?</h3>
|
||||
<p>DashScope turns away a thinking Qwen model asked for one whole reply (<code>enable_thinking</code> must be false for non-streaming calls). magpie asks for it streamed and hands the agent the whole reply, thinking included.</p>
|
||||
<h3>Does magpie show my Token Plan credits?</h3>
|
||||
<p>No. Neither Token Plan has an API for its credits; the plan’s subscription page in Alibaba’s console shows them. magpie’s Usage tab still counts the tokens each agent spent.</p>
|
||||
|
||||
<p style="margin-top:48px">Every agent: <a href="/docs/claude-code-models">Models in Claude Code</a>, <a href="/docs/codex-models">Models in Codex</a>, <a href="/docs/gemini-cli-models">Models in Gemini CLI</a>, <a href="/docs/opencode-models">Models in OpenCode</a>. Ask on <a href="https://discord.gg/vGSnD3ZKQF">Discord</a> if you get stuck.</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap">
|
||||
<span>© 2026 magpie · MIT</span>
|
||||
<div class="links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/docs/intent">Intent routing</a>
|
||||
<a href="/docs/plugins">Plugins</a>
|
||||
<a href="/docs/remote">Remote magpie</a>
|
||||
<a href="/docs/docker">Docker</a>
|
||||
<a href="/docs/privacy">Privacy</a>
|
||||
<a href="/docs/masking">Privacy masking</a>
|
||||
<a href="/docs/mcp-router">MCP router</a>
|
||||
<a href="/docs/library">Library</a>
|
||||
<a href="/docs/claude-code-models">Models in Claude Code</a>
|
||||
<a href="/docs/codex-models">Models in Codex</a>
|
||||
<a href="/docs/gemini-cli-models">Models in Gemini CLI</a>
|
||||
<a href="/docs/subscriptions">Subscriptions in any agent</a>
|
||||
<a href="/docs/local-models">Local models</a>
|
||||
<a href="/docs/opencode-models">Models in OpenCode</a>
|
||||
<a href="/docs/alternatives">magpie vs CC Switch vs CCR</a>
|
||||
<a href="/docs/import">Add to magpie</a>
|
||||
<a href="/docs/integrate">Integrate</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="/docs/contributors">Contributors</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">Releases</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const next = { system: "light", light: "dark", dark: "system" };
|
||||
document.querySelectorAll("button.theme").forEach((b) => {
|
||||
b.dataset.mode = themeMode();
|
||||
b.title = "Theme: " + themeMode();
|
||||
b.addEventListener("click", () => setTheme(next[themeMode()]));
|
||||
});
|
||||
|
||||
document.querySelectorAll(".copy").forEach((b) => b.addEventListener("click", async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(document.getElementById(b.dataset.copy).textContent);
|
||||
b.textContent = "Copied"; setTimeout(() => (b.textContent = "Copy"), 1400);
|
||||
} catch {}
|
||||
}));
|
||||
})();
|
||||
</script>
|
||||
<script src="/docs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -251,7 +251,7 @@ magpie claude codex/gpt-5.5</pre></div>
|
||||
</ul>
|
||||
<p>各种路由方式见 <a href="/docs/zh/start#routing">快速上手</a>。</p>
|
||||
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a></p>
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a> · <a href="/docs/zh/qwen">通义千问</a> · <a href="/docs/zh/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">常见问题</a></h2>
|
||||
<h3>需要自己设置 <code>ANTHROPIC_BASE_URL</code> 吗?</h3>
|
||||
|
||||
@@ -251,7 +251,7 @@ magpie codex claude/…</pre></div>
|
||||
</ul>
|
||||
<p>各种路由方式见 <a href="/docs/zh/start#routing">快速上手</a>。</p>
|
||||
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a></p>
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a> · <a href="/docs/zh/qwen">通义千问</a> · <a href="/docs/zh/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">常见问题</a></h2>
|
||||
<h3>需要自己写 <code>[model_providers]</code> 吗?</h3>
|
||||
|
||||
@@ -235,7 +235,7 @@ magpie gemini model codex/gpt-5.5</pre></div>
|
||||
</ul>
|
||||
<p>路由方式和规则详见 <a href="/docs/zh/start#routing">快速上手</a>。</p>
|
||||
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a></p>
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a> · <a href="/docs/zh/qwen">通义千问</a> · <a href="/docs/zh/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">常见问题</a></h2>
|
||||
<h3>Gemini CLI 能用 Gemini 以外的模型吗?</h3>
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MiniMax 与编程套餐接入 Claude Code、Codex、Gemini CLI 和 OpenCode · magpie</title>
|
||||
<meta name="description" content="用 magpie 把 MiniMax M3 和 M2.7 接入 Claude Code、Codex、Gemini CLI 和 OpenCode:按量付费或编程套餐(Coding Plan)的 Key,国际和国内接口地址,交错思考,M3.1 Flash 的推理强度,以及编程套餐的用量窗口。">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
(() => {
|
||||
let mode = "system";
|
||||
try { mode = localStorage.getItem("theme") || "system"; } catch {}
|
||||
const q = matchMedia("(prefers-color-scheme: dark)");
|
||||
const apply = () => {
|
||||
const t = mode === "system" ? (q.matches ? "dark" : "light") : mode;
|
||||
document.documentElement.dataset.theme = t;
|
||||
document.querySelector('meta[name="theme-color"]').content = t === "dark" ? "#0b0b0c" : "#fafafa";
|
||||
document.querySelectorAll("button.theme").forEach((b) => { b.dataset.mode = mode; b.title = "Theme: " + mode; });
|
||||
};
|
||||
q.addEventListener("change", () => mode === "system" && apply());
|
||||
window.setTheme = (m) => { mode = m; try { m === "system" ? localStorage.removeItem("theme") : localStorage.setItem("theme", m); } catch {} apply(); };
|
||||
window.themeMode = () => mode;
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/minimax">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/minimax">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/minimax">
|
||||
<link rel="alternate" hreflang="x-default" href="https://usemagpie.ai/docs/minimax">
|
||||
<link rel="canonical" href="https://usemagpie.ai/docs/zh/minimax">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:site_name" content="magpie">
|
||||
<meta property="og:title" content="MiniMax 与编程套餐接入 Claude Code、Codex、Gemini CLI 和 OpenCode">
|
||||
<meta property="og:description" content="用 magpie 把 MiniMax M3 和 M2.7 接入 Claude Code、Codex、Gemini CLI 和 OpenCode:按量付费或编程套餐(Coding Plan)的 Key,国际和国内接口地址,交错思考,M3.1 Flash 的推理强度,以及编程套餐的用量窗口。">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/zh/minimax">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "TechArticle",
|
||||
"headline": "MiniMax 与编程套餐接入 Claude Code、Codex、Gemini CLI 和 OpenCode",
|
||||
"description": "用 magpie 把 MiniMax M3 和 M2.7 接入 Claude Code、Codex、Gemini CLI 和 OpenCode:按量付费或编程套餐(Coding Plan)的 Key,国际和国内接口地址,交错思考,M3.1 Flash 的推理强度,以及编程套餐的用量窗口。",
|
||||
"inLanguage": "zh-CN",
|
||||
"url": "https://usemagpie.ai/docs/zh/minimax",
|
||||
"about": {
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "magpie",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "macOS, Windows, Linux"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "magpie",
|
||||
"url": "https://usemagpie.ai/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "MiniMax 怎么接入 Claude Code?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "在 magpie 里添加 MiniMax 的 Key(供应商 → 添加供应商 → MiniMax (China) 或 MiniMax),然后在 Claude Code 那一行选一个模型,比如 MiniMax-M3,或者运行 magpie claude minimax-cn/MiniMax-M3。magpie 会写好 Claude Code 的 settings.json,把请求转给 MiniMax 的 Anthropic 接口 https://api.minimaxi.com/anthropic。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "MiniMax 编程套餐怎么用?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "把编程套餐的 Key(sk-cp- 开头)添加到你购买套餐那个站点的 MiniMax 预设下,和按量付费的 Key 一样。magpie 根据 MiniMax 对这个 Key 的答复区分两者,并在编程套餐 Key 那一行显示用量窗口。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Codex 能用 MiniMax 吗?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "能。MiniMax 提供 Chat Completions 和 Anthropic Messages,不提供 Responses,所以 magpie 会转换 Codex 的请求和 MiniMax 的回复。在 Codex 那一行选模型,或运行 magpie codex minimax-cn/MiniMax-M3,模型会出现在 Codex 的 /model 里。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "MiniMax Code 能用其他模型吗?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "能。MiniMax Code 是 magpie 支持的工具之一,在 Agent 页它那一行可以选你添加的任何模型,MiniMax 的或其他厂商的都行。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "为什么 MiniMax 的思考出现在正文里?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "MiniMax 的 Chat API 把模型的思考放在回复正文的 <think> 标签里。magpie 把它取出来作为思考交给工具,在之后的轮次再按 MiniMax 要求的方式放回去。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "能用多个 MiniMax Key 吗?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "能。把它们都添加到 MiniMax 供应商下并逐个勾选。magpie 会把请求分摊到这些 Key 上,并按编程套餐 Key 的窗口来分配和让它休息:用完窗口的 Key 会等到重置后再用。"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav><div class="wrap">
|
||||
<a class="brand" href="/zh/"><img class="bird" src="/img/magpie-small.svg" alt="">magpie <small>文档</small></a>
|
||||
<div class="links">
|
||||
<a href="/zh/">首页</a>
|
||||
<a href="/docs/zh/start">快速上手</a>
|
||||
<a href="/docs/zh/intent">意图路由</a>
|
||||
<a href="/docs/zh/plugins">插件开发</a>
|
||||
<a class="toc-only" href="/docs/zh/remote">远程 magpie</a>
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a class="toc-only" href="/docs/zh/library">资源库</a>
|
||||
<a class="toc-only" href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/codex-models">Codex 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/subscriptions">订阅用于任意 Agent</a>
|
||||
<a class="toc-only" href="/docs/zh/local-models">本地模型</a>
|
||||
<a class="toc-only" href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/alternatives">与 CC Switch、CCR 对比</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
</div>
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="语言" title="语言" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/minimax" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/minimax" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/minimax" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="magpie on Discord" title="Join us on Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
<a class="icon-btn" href="https://github.com/yetone/magpie" aria-label="magpie on GitHub" title="Source on GitHub"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg></a>
|
||||
<button class="icon-btn theme" type="button" aria-label="Theme" title="Theme: system"><svg class="i-system" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1.75" y="2.75" width="12.5" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11.25V14"/></svg><svg class="i-light" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg><svg class="i-dark" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M13.5 9.5A5.5 5.5 0 0 1 6.5 2.5a5.5 5.5 0 1 0 7 7Z"/></svg></button>
|
||||
<a class="btn small" href="/#get">下载</a>
|
||||
</div></nav>
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>本页内容</p>
|
||||
<a href="#add">添加</a>
|
||||
<a href="#endpoints">套餐与接口地址</a>
|
||||
<a href="#agents">在各个工具里用</a>
|
||||
<a href="#thinking">思考</a>
|
||||
<a href="#usage">余额与用量</a>
|
||||
<a href="#faq">常见问题</a>
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">文档 · 供应商</p>
|
||||
<h1>MiniMax 与编程套餐接入 Claude Code、Codex、Gemini CLI 和 OpenCode</h1>
|
||||
<p class="lede">MiniMax 提供兼容 OpenAI 的 Chat API 和兼容 Anthropic 的接口,有国际站和国内站,按量付费和编程套餐的 Key 都能用。在 magpie 里添加一次 Key,Claude Code、Codex、Gemini CLI、OpenCode 以及你接入的其他工具都能通过 magpie 的本地网关 <code>127.0.0.1:3425</code> 用上 <code>MiniMax-M3</code>、<code>MiniMax-M2.7</code> 等模型。</p>
|
||||
|
||||
<h2 id="add"><a class="anchor" href="#add">添加 MiniMax</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>拿到 Key</b>国内在 <a href="https://platform.minimaxi.com/user-center/basic-information/interface-key">platform.minimaxi.com</a> 创建,国际站在 <a href="https://platform.minimax.io/user-center/basic-information/interface-key">platform.minimax.io</a>。编程套餐的 Key 以 <code>sk-cp-</code> 开头。</li>
|
||||
<li><b>添加供应商</b>在 magpie 的 <span class="ui">供应商</span> 页点 <span class="ui">+ 添加供应商</span>,选 MiniMax (China) 或 MiniMax,粘贴 Key 并保存。按量付费和编程套餐的 Key 都这样添加。</li>
|
||||
<li><b>给工具选上</b>在 <span class="ui">Agent</span> 页点工具那一行的模型,选一个 MiniMax 模型。</li>
|
||||
</ol>
|
||||
<div class="code"><span class="lang">终端</span><button class="copy" data-copy="ex-add">复制</button><pre id="ex-add">magpie provider add minimax-cn sk-cp-… # 编程套餐,platform.minimaxi.com
|
||||
magpie provider add minimax sk-… # 国际站,platform.minimax.io</pre></div>
|
||||
|
||||
<h2 id="endpoints"><a class="anchor" href="#endpoints">套餐与接口地址</a></h2>
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>预设</th><th>平台</th><th>Chat Completions</th><th>Anthropic Messages</th></tr>
|
||||
<tr><td>MiniMax <span class="ui">minimax</span></td><td>platform.minimax.io(国际)</td><td><code>https://api.minimax.io/v1</code></td><td><code>https://api.minimax.io/anthropic</code></td></tr>
|
||||
<tr><td>MiniMax (China) <span class="ui">minimax-cn</span></td><td>platform.minimaxi.com(国内)</td><td><code>https://api.minimaxi.com/v1</code></td><td><code>https://api.minimaxi.com/anthropic</code></td></tr>
|
||||
</table></div>
|
||||
<p>编程套餐和按量付费用的是同一组接口地址,请求按哪种计费由 Key 决定。国际站和国内站是不同的账号,各自的 Key 放在各自站点的预设下。</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">在各个工具里用</a></h2>
|
||||
<p>在 <span class="ui">Agent</span> 页里点某个工具那一行的模型来选,或者在终端里选。每篇指南都写了 magpie 在那个工具的配置里改了什么、怎么换回去。</p>
|
||||
<div class="code"><span class="lang">终端</span><button class="copy" data-copy="ex-agents">复制</button><pre id="ex-agents">magpie claude minimax-cn/MiniMax-M3
|
||||
magpie codex minimax-cn/MiniMax-M3
|
||||
magpie gemini model minimax-cn/MiniMax-M2.7
|
||||
magpie opencode minimax-cn/MiniMax-M3</pre></div>
|
||||
<ul>
|
||||
<li><b>Claude Code</b> 说的是 Anthropic Messages,MiniMax 的 Anthropic 接口也说这种协议,所以请求原样转过去。opus、sonnet、haiku 三档默认都用你选的模型,也可以给某一档单独指定。<a href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>。</li>
|
||||
<li><b>Codex</b> 只说 OpenAI Responses。MiniMax 提供 Chat Completions 和 Anthropic Messages,不提供 Responses,所以 magpie 会转换请求和回复,流式输出和工具调用都保留。模型会出现在 Codex 的 <code>/model</code> 里,带着推理强度。<a href="/docs/zh/codex-models">Codex 接入其他模型</a>。</li>
|
||||
<li><b>Gemini CLI</b> 说 Gemini 的 API。magpie 把它指向本地网关并做转换。<a href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>。</li>
|
||||
<li><b>OpenCode</b>:magpie 把模型写进 <code>opencode.json</code>,带上推理档位和价格。<a href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>。</li>
|
||||
</ul>
|
||||
<p>MiniMax Code 也是 magpie 支持的工具:它那一行可以选 MiniMax 的模型,也可以选其他厂商的。</p>
|
||||
|
||||
<h2 id="thinking"><a class="anchor" href="#thinking">思考与推理强度</a></h2>
|
||||
<ul>
|
||||
<li><b>交错思考。</b>MiniMax 的 Chat API 把模型的思考放在回复正文的 <code><think></code> 标签里,并要求之后的轮次原样带回。magpie 把它作为思考交给工具,再放回 MiniMax 要的位置。</li>
|
||||
<li><b>推理强度。</b><code>MiniMax-M3.1-Flash</code> 及其预览版有从 low 到 max 的思考档位。magpie 像 MiniMax Code 一样把工具要的档位写进 <code>output_config.effort</code>,不会被 token 预算吃掉。</li>
|
||||
<li><b>一直思考的模型。</b><code>MiniMax-M3.1-Flash-Preview</code> 不允许关掉思考。工具要求关掉时,magpie 会保持思考开启再问一次,工具拿到的是回答而不是报错。</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="usage"><a class="anchor" href="#usage">编程套餐窗口与用量</a></h2>
|
||||
<ul>
|
||||
<li><b>编程套餐窗口。</b>编程套餐 Key 那一行显示 MiniMax 告知的每个窗口还剩多少:一个滚动窗口和一个按周的窗口,从 MiniMax 读取。模型用的是通用额度;单独计量的额度(比如视频)显示为次数,例如 4 / 5。按量付费的 Key 没有窗口,也没有卡片。</li>
|
||||
<li><b>路由。</b>有多个编程套餐 Key 时,magpie 按窗口分配请求,窗口用完的 Key 会休息到重置。</li>
|
||||
<li><b>用量。</b><span class="ui">用量</span> 页会统计经过 magpie 的每个工具和模型的 token、缓存命中和费用。</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">常见问题</a></h2>
|
||||
<h3>MiniMax 怎么接入 Claude Code?</h3>
|
||||
<p>在 magpie 里添加 MiniMax 的 Key(供应商 → 添加供应商 → MiniMax (China) 或 MiniMax),然后在 Claude Code 那一行选一个模型,比如 <code>MiniMax-M3</code>,或者运行 <code>magpie claude minimax-cn/MiniMax-M3</code>。magpie 会写好 Claude Code 的 <code>settings.json</code>,把请求转给 MiniMax 的 Anthropic 接口 <code>https://api.minimaxi.com/anthropic</code>。</p>
|
||||
<h3>MiniMax 编程套餐怎么用?</h3>
|
||||
<p>把编程套餐的 Key(<code>sk-cp-</code> 开头)添加到你购买套餐那个站点的 MiniMax 预设下,和按量付费的 Key 一样。magpie 根据 MiniMax 对这个 Key 的答复区分两者,并在编程套餐 Key 那一行显示用量窗口。</p>
|
||||
<h3>Codex 能用 MiniMax 吗?</h3>
|
||||
<p>能。MiniMax 提供 Chat Completions 和 Anthropic Messages,不提供 Responses,所以 magpie 会转换 Codex 的请求和 MiniMax 的回复。在 Codex 那一行选模型,或运行 <code>magpie codex minimax-cn/MiniMax-M3</code>,模型会出现在 Codex 的 <code>/model</code> 里。</p>
|
||||
<h3>MiniMax Code 能用其他模型吗?</h3>
|
||||
<p>能。MiniMax Code 是 magpie 支持的工具之一,在 Agent 页它那一行可以选你添加的任何模型,MiniMax 的或其他厂商的都行。</p>
|
||||
<h3>为什么 MiniMax 的思考出现在正文里?</h3>
|
||||
<p>MiniMax 的 Chat API 把模型的思考放在回复正文的 <code><think></code> 标签里。magpie 把它取出来作为思考交给工具,在之后的轮次再按 MiniMax 要求的方式放回去。</p>
|
||||
<h3>能用多个 MiniMax Key 吗?</h3>
|
||||
<p>能。把它们都添加到 MiniMax 供应商下并逐个勾选。magpie 会把请求分摊到这些 Key 上,并按编程套餐 Key 的窗口来分配和让它休息:用完窗口的 Key 会等到重置后再用。</p>
|
||||
|
||||
<p style="margin-top:48px">各个工具的指南:<a href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>、<a href="/docs/zh/codex-models">Codex 接入其他模型</a>、<a href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>、<a href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>。遇到问题可以在 <a href="https://discord.gg/vGSnD3ZKQF">Discord</a> 提问。</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap">
|
||||
<span>© 2026 magpie · MIT</span>
|
||||
<div class="links">
|
||||
<a href="/zh/">首页</a>
|
||||
<a href="/docs/zh/intent">意图路由</a>
|
||||
<a href="/docs/zh/plugins">插件开发</a>
|
||||
<a href="/docs/zh/remote">远程 magpie</a>
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/library">资源库</a>
|
||||
<a href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>
|
||||
<a href="/docs/zh/codex-models">Codex 接入其他模型</a>
|
||||
<a href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>
|
||||
<a href="/docs/zh/subscriptions">订阅用于任意 Agent</a>
|
||||
<a href="/docs/zh/local-models">本地模型</a>
|
||||
<a href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>
|
||||
<a href="/docs/zh/alternatives">与 CC Switch、CCR 对比</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="/docs/zh/contributors">贡献墙</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const next = { system: "light", light: "dark", dark: "system" };
|
||||
document.querySelectorAll("button.theme").forEach((b) => {
|
||||
b.dataset.mode = themeMode();
|
||||
b.title = "Theme: " + themeMode();
|
||||
b.addEventListener("click", () => setTheme(next[themeMode()]));
|
||||
});
|
||||
|
||||
document.querySelectorAll(".copy").forEach((b) => b.addEventListener("click", async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(document.getElementById(b.dataset.copy).textContent);
|
||||
b.textContent = "已复制"; setTimeout(() => (b.textContent = "复制"), 1400);
|
||||
} catch {}
|
||||
}));
|
||||
})();
|
||||
</script>
|
||||
<script src="/docs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -239,7 +239,7 @@ magpie visible opencode all # 恢复显示全部</pre></div>
|
||||
<div class="code"><span class="lang">终端</span><button class="copy" data-copy="ex-oc-back">复制</button><pre id="ex-oc-back">magpie opencode default</pre></div>
|
||||
<p>它会恢复接入 magpie 之前的 <code>model</code> 和 <code>small_model</code>,并把 <code>magpie</code> 供应商从文件里删掉。</p>
|
||||
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a></p>
|
||||
<p><b>按供应商:</b><a href="/docs/zh/deepseek">DeepSeek</a> · <a href="/docs/zh/kimi">Kimi 与 Kimi Code</a> · <a href="/docs/zh/glm">GLM 编程套餐</a> · <a href="/docs/zh/qwen">通义千问</a> · <a href="/docs/zh/minimax">MiniMax</a></p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">常见问题</a></h2>
|
||||
<h3>OpenCode 怎么用 DeepSeek?</h3>
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>通义千问 Qwen 接入 Claude Code、Codex、Gemini CLI 和 OpenCode · magpie</title>
|
||||
<meta name="description" content="用 magpie 把通义千问 Qwen 接入 Claude Code、Codex、Gemini CLI 和 OpenCode:阿里云百炼(DashScope)与 Model Studio 的 Key、千问和百炼的 Token Plan 套餐、Qwen Cloud 的地域、每种 Key 用哪个接口地址,以及思考怎么处理。">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
<script>
|
||||
(() => {
|
||||
let mode = "system";
|
||||
try { mode = localStorage.getItem("theme") || "system"; } catch {}
|
||||
const q = matchMedia("(prefers-color-scheme: dark)");
|
||||
const apply = () => {
|
||||
const t = mode === "system" ? (q.matches ? "dark" : "light") : mode;
|
||||
document.documentElement.dataset.theme = t;
|
||||
document.querySelector('meta[name="theme-color"]').content = t === "dark" ? "#0b0b0c" : "#fafafa";
|
||||
document.querySelectorAll("button.theme").forEach((b) => { b.dataset.mode = mode; b.title = "Theme: " + mode; });
|
||||
};
|
||||
q.addEventListener("change", () => mode === "system" && apply());
|
||||
window.setTheme = (m) => { mode = m; try { m === "system" ? localStorage.removeItem("theme") : localStorage.setItem("theme", m); } catch {} apply(); };
|
||||
window.themeMode = () => mode;
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
<script>try{if(/Linux/.test(navigator.userAgent)&&!/Android/.test(navigator.userAgent)||localStorage.getItem("omarchy")||/[?&]omarchy=/.test(location.search))document.write('<script src="/omarchy.js"><\/script>')}catch(e){}</script>
|
||||
<link rel="icon" href="/favicon.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-256.png">
|
||||
<link rel="alternate" hreflang="en" href="https://usemagpie.ai/docs/qwen">
|
||||
<link rel="alternate" hreflang="zh" href="https://usemagpie.ai/docs/zh/qwen">
|
||||
<link rel="alternate" hreflang="ja" href="https://usemagpie.ai/docs/ja/qwen">
|
||||
<link rel="alternate" hreflang="x-default" href="https://usemagpie.ai/docs/qwen">
|
||||
<link rel="canonical" href="https://usemagpie.ai/docs/zh/qwen">
|
||||
<link rel="stylesheet" href="/docs.css">
|
||||
<meta property="og:site_name" content="magpie">
|
||||
<meta property="og:title" content="通义千问 Qwen 接入 Claude Code、Codex、Gemini CLI 和 OpenCode">
|
||||
<meta property="og:description" content="用 magpie 把通义千问 Qwen 接入 Claude Code、Codex、Gemini CLI 和 OpenCode:阿里云百炼(DashScope)与 Model Studio 的 Key、千问和百炼的 Token Plan 套餐、Qwen Cloud 的地域、每种 Key 用哪个接口地址,以及思考怎么处理。">
|
||||
<meta property="og:image" content="https://usemagpie.ai/img/og.png">
|
||||
<meta property="og:url" content="https://usemagpie.ai/docs/zh/qwen">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "TechArticle",
|
||||
"headline": "通义千问 Qwen 接入 Claude Code、Codex、Gemini CLI 和 OpenCode",
|
||||
"description": "用 magpie 把通义千问 Qwen 接入 Claude Code、Codex、Gemini CLI 和 OpenCode:阿里云百炼(DashScope)与 Model Studio 的 Key、千问和百炼的 Token Plan 套餐、Qwen Cloud 的地域、每种 Key 用哪个接口地址,以及思考怎么处理。",
|
||||
"inLanguage": "zh-CN",
|
||||
"url": "https://usemagpie.ai/docs/zh/qwen",
|
||||
"about": {
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "magpie",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "macOS, Windows, Linux"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "magpie",
|
||||
"url": "https://usemagpie.ai/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "通义千问怎么接入 Claude Code?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "在 magpie 里添加 Key(供应商 → 添加供应商 → Key 所属的 Qwen 预设),然后在 Claude Code 那一行选一个千问模型,比如 qwen3.8-max,或者运行 magpie claude qwen-cn/qwen3.8-max。magpie 会写好 Claude Code 的 settings.json,把请求转给 DashScope 的 Anthropic 接口。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "百炼的编程套餐怎么接入?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "百炼的订阅套餐在 magpie 里是 Bailian Token Plan 预设:添加供应商时选它,填 sk-sp- 开头的套餐 Key。千问 AI 开放平台的套餐选 Qwen Token Plan,Qwen Cloud 的套餐选 Qwen Cloud Token Plan。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Codex 能用千问吗?Qwen3 Coder 也行吗?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "能。magpie 会列出 DashScope 给这个 Key 的所有模型,包括 Coder 模型,Codex 都能用:magpie 把 Codex 的 Responses 请求转成 Chat Completions,再把回复转回去。在 Codex 那一行选模型,或运行 magpie codex qwen-cn/qwen3.8-max,模型会出现在 Codex 的 /model 里。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "我的 Key 该选哪个预设?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Key 是在哪个平台创建的就选哪个。Token Plan 的 Key(sk-sp- 开头)只能用在自己套餐的地址,Qwen Cloud 按量付费的 Key(sk-ws- 开头)只能用在自己的地域,放到别的预设下会被 401 拒绝。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "Qwen Code 能用其他模型吗?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "能。Qwen Code 是 magpie 支持的工具之一,在 Agent 页它那一行可以选你添加的任何模型,千问的或其他厂商的都行。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": "magpie 能显示 Token Plan 的额度吗?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "不能。两个 Token Plan 都没有查额度的 API,额度在阿里云控制台的套餐订阅页里看。magpie 的用量页仍会统计每个工具用掉的 token。"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav><div class="wrap">
|
||||
<a class="brand" href="/zh/"><img class="bird" src="/img/magpie-small.svg" alt="">magpie <small>文档</small></a>
|
||||
<div class="links">
|
||||
<a href="/zh/">首页</a>
|
||||
<a href="/docs/zh/start">快速上手</a>
|
||||
<a href="/docs/zh/intent">意图路由</a>
|
||||
<a href="/docs/zh/plugins">插件开发</a>
|
||||
<a class="toc-only" href="/docs/zh/remote">远程 magpie</a>
|
||||
<a class="toc-only" href="/docs/zh/docker">Docker</a>
|
||||
<a class="toc-only" href="/docs/zh/privacy">隐私</a>
|
||||
<a class="toc-only" href="/docs/zh/masking">本地脱敏</a>
|
||||
<a class="toc-only" href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a class="toc-only" href="/docs/zh/library">资源库</a>
|
||||
<a class="toc-only" href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/codex-models">Codex 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/subscriptions">订阅用于任意 Agent</a>
|
||||
<a class="toc-only" href="/docs/zh/local-models">本地模型</a>
|
||||
<a class="toc-only" href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>
|
||||
<a class="toc-only" href="/docs/zh/alternatives">与 CC Switch、CCR 对比</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
</div>
|
||||
<div class="langs">
|
||||
<button class="icon-btn lang" type="button" aria-label="语言" title="语言" aria-haspopup="true" aria-expanded="false" aria-controls="langs"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="6.25"/><path d="M1.75 8h12.5M8 1.75c1.7 1.75 2.55 3.83 2.55 6.25S9.7 12.5 8 14.25M8 1.75C6.3 3.5 5.45 5.58 5.45 8S6.3 12.5 8 14.25"/></svg></button>
|
||||
<div class="lang-menu" id="langs" hidden>
|
||||
<a href="/docs/qwen" hreflang="en" lang="en">English</a>
|
||||
<a href="/docs/zh/qwen" hreflang="zh" lang="zh">中文</a>
|
||||
<a href="/docs/ja/qwen" hreflang="ja" lang="ja">日本語</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="icon-btn" href="https://discord.gg/vGSnD3ZKQF" aria-label="magpie on Discord" title="Join us on Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
|
||||
<a class="icon-btn" href="https://github.com/yetone/magpie" aria-label="magpie on GitHub" title="Source on GitHub"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg></a>
|
||||
<button class="icon-btn theme" type="button" aria-label="Theme" title="Theme: system"><svg class="i-system" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1.75" y="2.75" width="12.5" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11.25V14"/></svg><svg class="i-light" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg><svg class="i-dark" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M13.5 9.5A5.5 5.5 0 0 1 6.5 2.5a5.5 5.5 0 1 0 7 7Z"/></svg></button>
|
||||
<a class="btn small" href="/#get">下载</a>
|
||||
</div></nav>
|
||||
|
||||
<main class="wrap doc">
|
||||
<aside class="toc">
|
||||
<p>本页内容</p>
|
||||
<a href="#add">添加</a>
|
||||
<a href="#endpoints">套餐与接口地址</a>
|
||||
<a href="#agents">在各个工具里用</a>
|
||||
<a href="#thinking">思考</a>
|
||||
<a href="#usage">余额与用量</a>
|
||||
<a href="#faq">常见问题</a>
|
||||
</aside>
|
||||
|
||||
<article>
|
||||
<p class="eyebrow" id="overview">文档 · 供应商</p>
|
||||
<h1>通义千问 Qwen 接入 Claude Code、Codex、Gemini CLI 和 OpenCode</h1>
|
||||
<p class="lede">阿里通过 DashScope 提供通义千问,有阿里云百炼、Model Studio 国际站和 Qwen Cloud,按量付费或 Token Plan 套餐。它们都提供 OpenAI Chat Completions 和 Anthropic Messages 接口。在 magpie 里添加一次 Key,Claude Code、Codex、Gemini CLI、OpenCode 以及你接入的其他工具都能通过 magpie 的本地网关 <code>127.0.0.1:3425</code> 用上千问。</p>
|
||||
|
||||
<h2 id="add"><a class="anchor" href="#add">添加千问</a></h2>
|
||||
<ol class="steps">
|
||||
<li><b>拿到 Key</b>按量付费:国内在 <a href="https://bailian.console.aliyun.com/?tab=model#/api-key">百炼控制台</a>,国际站在 <a href="https://modelstudio.console.alibabacloud.com/?tab=playground#/api-key">Model Studio</a>。Token Plan 的 Key 在各自套餐页里创建。</li>
|
||||
<li><b>添加供应商</b>在 magpie 的 <span class="ui">供应商</span> 页点 <span class="ui">+ 添加供应商</span>,选 Key 所属的 Qwen 预设(见下表),粘贴 Key 并保存。magpie 会向接口查询它提供哪些模型。</li>
|
||||
<li><b>给工具选上</b>在 <span class="ui">Agent</span> 页点工具那一行的模型,选一个千问模型,比如 <code>qwen3.8-max</code>。</li>
|
||||
</ol>
|
||||
<div class="code"><span class="lang">终端</span><button class="copy" data-copy="ex-add">复制</button><pre id="ex-add">magpie provider add qwen-cn sk-… # 百炼,国内
|
||||
magpie provider add bailian-token-plan sk-sp-… # 百炼 Token Plan
|
||||
magpie provider add qwen-token-plan sk-sp-… # 千问 AI 开放平台 Token Plan
|
||||
magpie provider add qwencloud sk-ws-… region=us-east-1</pre></div>
|
||||
<div class="callout"><b>每种 Key 只能用在自己的地址。</b>Token Plan 的 Key(<code>sk-sp-…</code>)在按量付费接口和别的 Token Plan 上都会被拒绝,Qwen Cloud 的 Key 出了自己的地域也会被拒绝。请求返回 401 时,先看看 Key 是不是放在了它所属的预设下。</div>
|
||||
|
||||
<h2 id="endpoints"><a class="anchor" href="#endpoints">套餐与接口地址</a></h2>
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>预设</th><th>套餐与 Key</th><th>接口地址(Chat Completions、Anthropic Messages)</th></tr>
|
||||
<tr><td>Qwen <span class="ui">qwen</span></td><td>按量付费,国际站(Model Studio)</td><td><code>https://dashscope-intl.aliyuncs.com/compatible-mode/v1</code><br><code>https://dashscope-intl.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen (China) <span class="ui">qwen-cn</span></td><td>按量付费,国内(百炼)</td><td><code>https://dashscope.aliyuncs.com/compatible-mode/v1</code><br><code>https://dashscope.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Token Plan <span class="ui">qwen-token-plan</span></td><td>订阅套餐,<code>sk-sp-</code></td><td><code>https://token-plan.maas.qianwenaiapi.com/compatible-mode/v1</code><br><code>https://token-plan.maas.qianwenaiapi.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Bailian Token Plan <span class="ui">bailian-token-plan</span></td><td>订阅套餐,<code>sk-sp-</code></td><td><code>https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1</code><br><code>https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Cloud <span class="ui">qwencloud</span></td><td>按量付费,<code>sk-ws-</code>,六个地域,默认新加坡</td><td><code>https://{region}.maas.qwencloudapi.com/compatible-mode/v1</code><br><code>https://{region}.maas.qwencloudapi.com/apps/anthropic</code></td></tr>
|
||||
<tr><td>Qwen Cloud Token Plan <span class="ui">qwencloud-token-plan</span></td><td>订阅套餐,<code>sk-sp-</code>,仅新加坡</td><td><code>https://token-plan.maas.qwencloudapi.com/compatible-mode/v1</code><br><code>https://token-plan.maas.qwencloudapi.com/apps/anthropic</code></td></tr>
|
||||
</table></div>
|
||||
<p>Token Plan 的地址不给模型列表时,magpie 会按套餐概览列出它的文本模型:auto, qwen3.8-max, qwen3.8-flash, qwen3.7-max, qwen3.7-plus, qwen3.6-flash,以及套餐里的 DeepSeek 和 GLM 模型。百炼 Token Plan 还提供一个决策模型,可以给<a href="/docs/zh/intent">意图路由</a>判断每一轮该去哪。</p>
|
||||
|
||||
<h2 id="agents"><a class="anchor" href="#agents">在各个工具里用</a></h2>
|
||||
<p>在 <span class="ui">Agent</span> 页里点某个工具那一行的模型来选,或者在终端里选。每篇指南都写了 magpie 在那个工具的配置里改了什么、怎么换回去。</p>
|
||||
<div class="code"><span class="lang">终端</span><button class="copy" data-copy="ex-agents">复制</button><pre id="ex-agents">magpie claude qwen-cn/qwen3.8-max
|
||||
magpie codex qwen-cn/qwen3.8-max
|
||||
magpie gemini model qwen-cn/qwen3.7-plus
|
||||
magpie opencode qwen-cn/qwen3.8-max</pre></div>
|
||||
<ul>
|
||||
<li><b>Claude Code</b> 说的是 Anthropic Messages,千问 的 Anthropic 接口也说这种协议,所以请求原样转过去。opus、sonnet、haiku 三档默认都用你选的模型,也可以给某一档单独指定。<a href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>。</li>
|
||||
<li><b>Codex</b> 只说 OpenAI Responses。DashScope 提供 Chat Completions 和 Anthropic Messages,不提供 Responses,所以 magpie 会转换请求和回复,流式输出和工具调用都保留。模型会出现在 Codex 的 <code>/model</code> 里,带着推理强度。<a href="/docs/zh/codex-models">Codex 接入其他模型</a>。</li>
|
||||
<li><b>Gemini CLI</b> 说 Gemini 的 API。magpie 把它指向本地网关并做转换。<a href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>。</li>
|
||||
<li><b>OpenCode</b>:magpie 把模型写进 <code>opencode.json</code>,带上推理档位和价格。<a href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>。</li>
|
||||
</ul>
|
||||
<p>Qwen Code 也是 magpie 支持的工具:它那一行可以选千问的模型,也可以选其他厂商的。</p>
|
||||
|
||||
<h2 id="thinking"><a class="anchor" href="#thinking">思考与图片</a></h2>
|
||||
<ul>
|
||||
<li><b>一次性返回的回复。</b>会思考的千问模型在 DashScope 上只能流式返回,要求一次性返回整个回复的请求会被拒绝。工具或路由分组的分类器要一次性回复时,magpie 向 DashScope 要流式回复,再把完整回复(含思考)交给工具。</li>
|
||||
<li><b>一直思考的模型。</b>DashScope 上有的模型不允许关掉思考,比如它的 <code>glm-5.3</code>。工具要求关掉思考而模型拒绝时,magpie 会保持思考开启再问一次。</li>
|
||||
<li><b>图片。</b>Qwen-Image 和 <code>wan2.7-image</code> 模型通过 DashScope 自己的图片接口生成图片,六个预设都可以。在 magpie 的 <span class="ui">设置 → 图像</span> 里选用。尺寸写成 <code>宽x高</code>,最大 2048×2048。</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="usage"><a class="anchor" href="#usage">余额与用量</a></h2>
|
||||
<p>magpie 不显示千问的余额或套餐卡片:DashScope 没有查 Key 余额的 API,两个 Token Plan 也没有查额度的 API,额度在阿里云控制台的套餐订阅页里看。<span class="ui">用量</span> 页会统计经过 magpie 的每个工具和模型的 token、缓存命中和费用。</p>
|
||||
|
||||
<h2 id="faq"><a class="anchor" href="#faq">常见问题</a></h2>
|
||||
<h3>通义千问怎么接入 Claude Code?</h3>
|
||||
<p>在 magpie 里添加 Key(供应商 → 添加供应商 → Key 所属的 Qwen 预设),然后在 Claude Code 那一行选一个千问模型,比如 <code>qwen3.8-max</code>,或者运行 <code>magpie claude qwen-cn/qwen3.8-max</code>。magpie 会写好 Claude Code 的 <code>settings.json</code>,把请求转给 DashScope 的 Anthropic 接口。</p>
|
||||
<h3>百炼的编程套餐怎么接入?</h3>
|
||||
<p>百炼的订阅套餐在 magpie 里是 Bailian Token Plan 预设:添加供应商时选它,填 <code>sk-sp-</code> 开头的套餐 Key。千问 AI 开放平台的套餐选 Qwen Token Plan,Qwen Cloud 的套餐选 Qwen Cloud Token Plan。</p>
|
||||
<h3>Codex 能用千问吗?Qwen3 Coder 也行吗?</h3>
|
||||
<p>能。magpie 会列出 DashScope 给这个 Key 的所有模型,包括 Coder 模型,Codex 都能用:magpie 把 Codex 的 Responses 请求转成 Chat Completions,再把回复转回去。在 Codex 那一行选模型,或运行 <code>magpie codex qwen-cn/qwen3.8-max</code>,模型会出现在 Codex 的 <code>/model</code> 里。</p>
|
||||
<h3>我的 Key 该选哪个预设?</h3>
|
||||
<p>Key 是在哪个平台创建的就选哪个。Token Plan 的 Key(<code>sk-sp-</code> 开头)只能用在自己套餐的地址,Qwen Cloud 按量付费的 Key(<code>sk-ws-</code> 开头)只能用在自己的地域,放到别的预设下会被 401 拒绝。</p>
|
||||
<h3>Qwen Code 能用其他模型吗?</h3>
|
||||
<p>能。Qwen Code 是 magpie 支持的工具之一,在 Agent 页它那一行可以选你添加的任何模型,千问的或其他厂商的都行。</p>
|
||||
<h3>magpie 能显示 Token Plan 的额度吗?</h3>
|
||||
<p>不能。两个 Token Plan 都没有查额度的 API,额度在阿里云控制台的套餐订阅页里看。magpie 的用量页仍会统计每个工具用掉的 token。</p>
|
||||
|
||||
<p style="margin-top:48px">各个工具的指南:<a href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>、<a href="/docs/zh/codex-models">Codex 接入其他模型</a>、<a href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>、<a href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>。遇到问题可以在 <a href="https://discord.gg/vGSnD3ZKQF">Discord</a> 提问。</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap">
|
||||
<span>© 2026 magpie · MIT</span>
|
||||
<div class="links">
|
||||
<a href="/zh/">首页</a>
|
||||
<a href="/docs/zh/intent">意图路由</a>
|
||||
<a href="/docs/zh/plugins">插件开发</a>
|
||||
<a href="/docs/zh/remote">远程 magpie</a>
|
||||
<a href="/docs/zh/docker">Docker</a>
|
||||
<a href="/docs/zh/privacy">隐私</a>
|
||||
<a href="/docs/zh/masking">本地脱敏</a>
|
||||
<a href="/docs/zh/mcp-router">MCP 路由</a>
|
||||
<a href="/docs/zh/library">资源库</a>
|
||||
<a href="/docs/zh/claude-code-models">Claude Code 接入其他模型</a>
|
||||
<a href="/docs/zh/codex-models">Codex 接入其他模型</a>
|
||||
<a href="/docs/zh/gemini-cli-models">Gemini CLI 接入其他模型</a>
|
||||
<a href="/docs/zh/subscriptions">订阅用于任意 Agent</a>
|
||||
<a href="/docs/zh/local-models">本地模型</a>
|
||||
<a href="/docs/zh/opencode-models">OpenCode 接入其他模型</a>
|
||||
<a href="/docs/zh/alternatives">与 CC Switch、CCR 对比</a>
|
||||
<a href="/docs/zh/import">Add to magpie</a>
|
||||
<a href="/docs/zh/integrate">接入应用</a>
|
||||
<a href="https://github.com/yetone/magpie">GitHub</a>
|
||||
<a href="https://discord.gg/vGSnD3ZKQF">Discord</a>
|
||||
<a href="/docs/zh/contributors">贡献墙</a>
|
||||
<a href="https://github.com/yetone/magpie-releases/releases">版本发布</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const next = { system: "light", light: "dark", dark: "system" };
|
||||
document.querySelectorAll("button.theme").forEach((b) => {
|
||||
b.dataset.mode = themeMode();
|
||||
b.title = "Theme: " + themeMode();
|
||||
b.addEventListener("click", () => setTheme(next[themeMode()]));
|
||||
});
|
||||
|
||||
document.querySelectorAll(".copy").forEach((b) => b.addEventListener("click", async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(document.getElementById(b.dataset.copy).textContent);
|
||||
b.textContent = "已复制"; setTimeout(() => (b.textContent = "复制"), 1400);
|
||||
} catch {}
|
||||
}));
|
||||
})();
|
||||
</script>
|
||||
<script src="/docs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -46,6 +46,8 @@ DeepSeek, Kimi (Moonshot), GLM (Zhipu), Qwen, MiniMax, Anthropic (Claude), OpenA
|
||||
- [DeepSeek in every agent](https://usemagpie.ai/docs/deepseek): use DeepSeek V4 in Claude Code, Codex, Gemini CLI and OpenCode; the API key, endpoints, thinking on tool turns, reasoning effort, prompt cache and balance.
|
||||
- [Kimi K2 and Kimi Code in every agent](https://usemagpie.ai/docs/kimi): Kimi API or Kimi Code membership keys, global and China endpoints, in Claude Code, Codex, Gemini CLI and OpenCode; usage windows and web search.
|
||||
- [GLM Coding Plan in every agent](https://usemagpie.ai/docs/glm): Zhipu GLM and Z.ai, pay as you go or Coding Plan, each plan's endpoints, the 1113 "insufficient balance" fix, thinking and plan windows.
|
||||
- [Qwen in every agent](https://usemagpie.ai/docs/qwen): Alibaba Cloud Model Studio (DashScope), Bailian, the Qwen and Bailian Token Plans and Qwen Cloud in Claude Code, Codex, Gemini CLI and OpenCode; which endpoint each key works on, thinking and images.
|
||||
- [MiniMax and the Coding Plan in every agent](https://usemagpie.ai/docs/minimax): MiniMax M3 and M2.7, pay as you go or Coding Plan keys, global and China endpoints, interleaved thinking, effort and the plan's usage windows.
|
||||
- [Intent routing](https://usemagpie.ai/docs/intent): how a turn is routed by what the user asks for.
|
||||
- [Privacy masking](https://usemagpie.ai/docs/masking): what is masked before a request leaves the computer and how values come back.
|
||||
- [Library](https://usemagpie.ai/docs/library): instructions, MCP servers, skills, hooks and subagents for each agent.
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
<url><loc>https://usemagpie.ai/docs/deepseek</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/kimi</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/glm</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/qwen</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/minimax</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/zh/claude-code-models</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/zh/codex-models</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/zh/contributors</loc></url>
|
||||
@@ -48,6 +50,8 @@
|
||||
<url><loc>https://usemagpie.ai/docs/zh/deepseek</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/zh/kimi</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/zh/glm</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/zh/qwen</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/zh/minimax</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/ja/claude-code-models</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/ja/codex-models</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/ja/contributors</loc></url>
|
||||
@@ -69,4 +73,6 @@
|
||||
<url><loc>https://usemagpie.ai/docs/ja/deepseek</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/ja/kimi</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/ja/glm</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/ja/qwen</loc></url>
|
||||
<url><loc>https://usemagpie.ai/docs/ja/minimax</loc></url>
|
||||
</urlset>
|
||||
|
||||
Reference in New Issue
Block a user