Kilo CLI で Alibaba Cloud Model Studio のモデルを使用します。
クイックスタート
- 1
Kilo CLI を起動する
kilo - 2
プロバイダーを接続する
/connectを入力し、課金プランに対応するプロバイダーを選択して、API キーを入力します:Token Plan
Alibaba Token Plan (China) を選択し、エディションに対応する Token Plan API キーを入力します:
- Token Plan Personal Edition:API Key を作成または表示
- Token Plan Team Edition:シートを割り当てて API Key を取得
従量課金
Alibaba (China) を選択し、Model Studio API キーを入力します。
Coding Plan
Alibaba Coding Plan (China) を選択し、Coding Plan API キーを入力します。
- 3
モデルを選択する
/modelsを入力し、使用するモデルを選択します。 - 4
確認する
kilo run "Hello"
設定ファイルで構成する
上記のオプションに加えて、設定ファイルを使用して接続することもできます。
- 1
設定ファイルを開くか作成する
- macOS / Linux:
~/.config/kilo/config.json - Windows:
C:\Users\<username>\.config\kilo\config.json
- macOS / Linux:
- 2
構成を追加する
YOUR_API_KEYをプランの API キーに置き換え、構成をconfig.jsonに追加します。Token Plan パーソナルエディション
{ "$schema": "https://kilo.ai/config.json", "provider": { "bailian-token-plan": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "auto": { "name": "Auto", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "qwen4-max-preview": { "name": "Qwen4.0 Max Preview", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen4-max": { "name": "Qwen4 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.8-max": { "name": "Qwen3.8 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.8-flash": { "name": "Qwen3.8 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.7-max": { "name": "Qwen3.7 Max", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.6-flash": { "name": "Qwen3.6 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "deepseek-v4.1-flash-1017": { "name": "DeepSeek V4.1 Flash 1017", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "deepseek-v4-pro": { "name": "DeepSeek V4 Pro", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "deepseek-v4-pro-0813": { "name": "DeepSeek V4 Pro 0813", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "deepseek-v4-flash-0731": { "name": "DeepSeek V4 Flash 0731", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "glm-5.3": { "name": "GLM-5.3", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "glm-5.2": { "name": "GLM-5.2", "modalities": { "input": [ "text" ], "output": [ "text" ] } } } } } }Token Plan チームエディション
{ "$schema": "https://kilo.ai/config.json", "provider": { "bailian-token-plan": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "auto": { "name": "Auto", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "qwen4-max-preview": { "name": "Qwen4.0 Max Preview", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen4-max": { "name": "Qwen4 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.8-max": { "name": "Qwen3.8 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.8-flash": { "name": "Qwen3.8 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.7-max": { "name": "Qwen3.7 Max", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.6-plus": { "name": "Qwen3.6 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.6-flash": { "name": "Qwen3.6 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "deepseek-v4.1-flash-1017": { "name": "DeepSeek V4.1 Flash 1017", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "deepseek-v4-pro": { "name": "DeepSeek V4 Pro", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "deepseek-v4-pro-0813": { "name": "DeepSeek V4 Pro 0813", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "deepseek-v4-flash-0731": { "name": "DeepSeek V4 Flash 0731", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "kimi-k2.7-code": { "name": "Kimi K2.7 Code", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "kimi-k2.6": { "name": "Kimi K2.6", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "kimi-k2.5": { "name": "Kimi K2.5", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "glm-5.3": { "name": "GLM-5.3", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "glm-5.2": { "name": "GLM-5.2", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "glm-5.1": { "name": "GLM-5.1", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "glm-5": { "name": "GLM-5", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "MiniMax-M2.5": { "name": "MiniMax M2.5", "modalities": { "input": [ "text" ], "output": [ "text" ] } } } } } }従量課金
{WorkspaceId}を実際の ワークスペース IDに置き換えます。{ "$schema": "https://kilo.ai/config.json", "provider": { "bailian-payg": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "qwen3.8-max": { "name": "Qwen3.8 Max", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.8-flash": { "name": "Qwen3.8 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "deepseek-v4-pro-0813": { "name": "DeepSeek V4 Pro 0813", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } } } } } }Coding Plan
{ "$schema": "https://kilo.ai/config.json", "provider": { "bailian-coding-plan": { "npm": "@ai-sdk/anthropic", "name": "Alibaba Cloud Model Studio", "options": { "baseURL": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1", "apiKey": "YOUR_API_KEY" }, "models": { "qwen3.7-plus": { "name": "Qwen3.7 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "qwen3.6-plus": { "name": "Qwen3.6 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "kimi-k2.5": { "name": "Kimi K2.5", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } }, "glm-5": { "name": "GLM-5", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "MiniMax-M2.5": { "name": "MiniMax M2.5", "modalities": { "input": [ "text" ], "output": [ "text" ] } }, "qwen3.5-plus": { "name": "Qwen3.5 Plus", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] } } } } } }注記qwen4-max-preview を使用する場合、1 回のリクエストあたりの出力上限はデフォルトで 32000 です。より長い出力が必要な場合は、
KILO_EXPERIMENTAL_OUTPUT_TOKEN_MAXを設定します。limit.outputのみを変更しても上限は引き上げられません。注記qwen4-max を使用する場合、1 回のリクエストあたりの出力上限はデフォルトで 32000 です。より長い出力が必要な場合は、
KILO_EXPERIMENTAL_OUTPUT_TOKEN_MAXを設定します。limit.outputのみを変更しても上限は引き上げられません。qwen4-max のコンテキスト長は 1M Token です。非思考モードの最大出力は 131,072 Token、思考と最終回答の合計は最大 262,144 Token です。デフォルトは reasoning_effort=high、thinking_budget=131072 です。 - 3
確認する
保存したら、次のコマンドを実行します:
kilo run "Hello" -m <provider>/<model><provider>/<model>を、プランに対応するプロバイダーとモデル(例:bailian-token-plan/auto)に置き換えます。
エラーコード
構成中にエラーが発生した場合は、課金プランに対応する FAQ ドキュメントを参照してください:
- Token Plan: Personal Edition FAQ · Team Edition FAQ
- Pay-as-you-go: エラーコード
- Coding Plan: Coding Plan FAQ
FAQ
従量課金で節約プランを使用するには?
従量課金の接続方法は変わりません。Model Studio の汎用 API Key と Base URL を使用します。節約プランを購入すると自動的に有効になり、対象の利用料金が自動的に控除されます。詳細は節約プランをご参照ください。
必要なモデルがリストにない
同じ形式で config.json の models にモデル ID を追加し、ファイルを保存して Kilo CLI を再度開きます。サポートされているモデルについては、課金プランのサポート対象モデルリストを参照してください。
リクエストが 401 Unauthorized を返す
API キーがベース URL と一致していないか、キーが別の課金プランに属しています。キーの種類が構成内の baseURL と一致していることを確認してから、構成を再度保存してください。