Skip to main content

Kilo CLI

Kilo CLI で Alibaba Cloud Model Studio のモデルを使用します。

クイックスタート

  1. 1

    Kilo CLI を起動する

    kilo
    
  2. 2

    プロバイダーを接続する

    /connect を入力し、課金プランに対応するプロバイダーを選択して、API キーを入力します:
    • Token Plan
    • 従量課金
    • Coding Plan
    Alibaba Token Plan (China) を選択し、エディションに対応する Token Plan API キーを入力します:
  3. 3

    モデルを選択する

    /models を入力し、使用するモデルを選択します。
  4. 4

    確認する

    kilo run "Hello"
    

設定ファイルで構成する

上記のオプションに加えて、設定ファイルを使用して接続することもできます。
  1. 1

    設定ファイルを開くか作成する

    • macOS / Linux: ~/.config/kilo/config.json
    • Windows: C:\Users\<username>\.config\kilo\config.json
  2. 2

    構成を追加する

    YOUR_API_KEY をプランの API キーに置き換え、構成を config.json に追加します。
    • Token Plan パーソナルエディション
    • Token Plan チームエディション
    • 従量課金
    • Coding 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"
                ]
              }
            },
            "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"
                ]
              }
            }
          }
        }
      }
    }
    
    qwen4-max-preview を使用する場合、1 回のリクエストあたりの出力上限はデフォルトで 32000 です。より長い出力が必要な場合は、KILO_EXPERIMENTAL_OUTPUT_TOKEN_MAX を設定します。limit.output のみを変更しても上限は引き上げられません。
  3. 3

    確認する

    保存したら、次のコマンドを実行します:
    kilo run "Hello" -m <provider>/<model>
    
    <provider>/<model> を、プランに対応するプロバイダーとモデル(例: bailian-token-plan/auto)に置き換えます。

エラーコード

構成中にエラーが発生した場合は、課金プランに対応する FAQ ドキュメントを参照してください:

FAQ

従量課金の接続方法は変わりません。Model Studio の汎用 API Key と Base URL を使用します。節約プランを購入すると自動的に有効になり、対象の利用料金が自動的に控除されます。詳細は節約プランをご参照ください。
同じ形式で config.json の models にモデル ID を追加し、ファイルを保存して Kilo CLI を再度開きます。サポートされているモデルについては、課金プランのサポート対象モデルリストを参照してください。
API キーがベース URL と一致していないか、キーが別の課金プランに属しています。キーの種類が構成内の baseURL と一致していることを確認してから、構成を再度保存してください。