テック技報最新号へ →
AIコーディング

VS Code 1.147: 「この種の作業はこのモデル」を YAML に書き、判定モデルに振り分けさせる model router(実験)※モデル・料金

~/.agents/model-routers/ に置いた YAML に「モデル」と「どんなときに使うか」を並べると、判定専用モデル gpt-6-luna-decisions が依頼ごとにどの行に当たるかを決め、そのモデルでチャットを走らせる。毎回モデルを選び直さずに、重い作業は上位モデル、雑用は安いモデルに回せる。

@code公開
#ai-coding#vscode#copilot#モデル#ルーティング#料金

設定

  1. ユーザーの settings.json に "chat.copilot.modelRouter.enabled": true を足す
  2. ルーターを書く(Copilot harness のチャットで /model-router と打ち、振り分け方を説明して作らせることもできる)
yaml
# ~/.agents/model-routers/build-vs-chores.yaml
version: 1
description: Opus で作る、GPT-6 Luna で軽い質問
routes:
  - model: opus
    when: Building or changing code over many steps, such as a feature, a bug fix, or a refactor.
  - model: gpt-6-luna
    when: Quick answers and small chores, such as where something is or what a setting does.
  1. モデルピッカーでそのルーターを選ぶ

when の書き方のコツ

注意点

  • 実験的機能。ルーターが出るのは Copilot harness のセッションのモデルピッカー(ほかの harness での扱いはリリースノートに記載なし)
  • 振り分け先のモデルの料金・プレミアムリクエストはそのまま掛かる。上位モデルの行の when が広すぎると、雑用まで高いモデルに流れる
  • 判定に使う gpt-6-luna-decisions のような「判断だけを安いモデルに任せる」考え方は Gemini にもある Gemini Decision 1 で分岐の判断を任せる
  • 同じプロンプトを複数モデルで走らせて比べる Model comparison(プレビュー)も、比較の設定(各モデルと effort、judge、synthesizer)をセッション一覧のホバーで見られるようになった

出典

  • @code 2026-11-19 JST(VS Code 1.147 のスレッド): @code · 2026-11-19
  • VS Code 1.147 リリースノート「Decision model-based model routers (Experimental)」「Model comparison improvements」: code.visualstudio.com

関連記事