出力SDK用のプロンプトファイルに最適なLLM(大規模言語モデル)を選択できます。 **次のような場合に使用:** - 新しい.promptファイルを作成するとき - モデルの選択内容を見直すとき - 古いモデルをアップグレードするとき **機能:** 優先順位(推論能力・性能と速度のバランス・処理速度・費用)の整理、プロバイダー(AIサービス提供者)の選定、Vercel AI Gatewayのモデル一覧に対するリアルタイム照合を通じて、あなたのニーズに合ったモデルを見つけるお手伝いをします。
Pick the right LLM model for an Output SDK prompt file. Use when writing a new .prompt file, reviewing a model choice, or upgrading a stale model. Walks through priority (reasoning/balance/speed/cost), provider selection, and a live lookup against the Vercel AI Gateway model index.
このスキルは、Output SDK スキル・エージェント全体におけるモデル選択の唯一の正式な情報源です。他のスキルは特定のモデル ID を固定するのではなく、ここにリンクします。モデルのラインナップは ドキュメントよりも頻繁に更新されるためです。
スキル読み込み時に以下を実行し、Vercel AI Gateway からプロバイダーごとに最新 10 モデルを取得します:
output=$(curl -fsS https://ai-gateway.vercel.sh/v1/models 2>/dev/null | jq '
.data as $models
| {
anthropic: ([ $models[] | select(.id | startswith("anthropic/")) ] | sort_by(.released) | reverse | .[0:10]),
openai: ([ $models[] | select(.id | startswith("openai/")) ] | sort_by(.released) | reverse | .[0:10]),
google: ([ $models[] | select(.id | startswith("google/")) ] | sort_by(.released) | reverse | .[0:10])
}
' 2>/dev/null)
if [ -n "$output" ]; then printf '%s\n' "$output"; else echo "(snapshot unavailable)"; fi
output=$(curl -fsS https://ai-gateway.vercel.sh/v1/models 2>/dev/null | jq '
.data as $models
| {
anthropic: ([ $models[] | select(.id | startswith("anthropic/")) ] | sort_by(.released) | reverse | .[0:10]),
openai: ([ $models[] | select(.id | startswith("openai/")) ] | sort_by(.released) | reverse | .[0:10]),
google: ([ $models[] | select(.id | startswith("google/")) ] | sort_by(.released) | reverse | .[0:10])
}
' 2>/dev/null)
if [ -n "$output" ]; then printf '%s\n' "$output"; else echo "(snapshot unavailable)"; fi
上のブロックが空の場合、スクリプトが自動実行されませんでした。jq、curl、ネットワークアクセスのいずれかが使用できないと考えられます。先に進む前に、スナップショットを手動でクエリしてフィルタリングしてください。
{
"anthropic": [ <model>, ..., <最大10個> ],
"openai": [ <model>, ..., <最大10個> ],
"google": [ <model>, ..., <最大10個> ]
}
各 <model> はゲートウェイペイロードのそのままです。モデルごとの主要フィールド:
| フィールド | 用途 |
|---|---|
id |
プロバイダー接頭辞付きの ID(例:anthropic/claude-sonnet-4.6)— ステップ 5 でプロンプトファイル形式に変換 |
released |
リリース日時(Unix タイムスタンプ)。スナップショットはプロバイダーごとに新しい順にソート済み |
name |
人間が読める名前 |
description |
1 段落の機能説明 — 似た名前のモデル比較時に参照 |
context_window |
入力トークン上限。プロンプトが大量の背景情報(コード、長いドキュメント)を含む場合に重要 |
max_tokens |
1 回の応答出力トークン上限 |
tags |
機能フラグ。reasoning、tool-use、vision、file-input、web-search、image-generation、explicit-caching、implicit-caching |
pricing.input / pricing.output |
トークンあたりの価格(米ドル)。100 万トークンあたりの価格にするには 1,000,000 を乗算 |
pricing.input_cache_read |
キャッシュ済み入力の価格 — 通常は input の 10 分の 1 程度 |
type |
チャットモデルは language。画像生成モデルは image-generation と表示されるが、.prompt ファイルでは使用不可 |
当てはまる最初の行を選びます。不明な場合は reasoning をデフォルトにします。
| 優先順位 | 次のような場合に使用 |
|---|---|
| reasoning(デフォルト) | 複数ステップの複雑なロジック、構造化データ抽出、エッジケースを含む判定、誤った結果よりも低速の方が悪い場合 |
| balance | 大部分の生成系タスク — 要約、分類、コンテンツ作成、会話 |
| speed | 短い対話的応答、低遅延の UI ループ、単純な変換 |
| cost | トークン消費が支配的で、品質の下限に余裕がある大量バッチ処理 |
ワークフロー(および src/workflows/ 配下の同じレベルのワークフロー)内の既存 *.prompt ファイルをスキャンし、宣言されている provider: の値を確認します。
anthropic をデフォルトにします。useSearchGrounding、OpenAI の maxToolCalls)がプロバイダー固有の場合のみ行います。Output SDK の provider: 値は、Vercel が Gemini を google/ にグループ化しているため、スナップショットキーと常に一致しません:
| Output SDK provider | スナップショットキー |
|---|---|
anthropic |
anthropic |
openai |
openai |
google-vertex(Gemini モデル) |
google |
google-vertex(Claude モデル) |
anthropic(その後、手動で @vertex サフィックスを再追加) |
amazon-bedrock |
anthropic(その後、手動で bedrock ネームスペースに変換) |
リストは既に新しい順にソートされています。上から下へ走査し、優先順位に該当する id を持つ最初のモデルを選びます。
デフォルトではこれらをスキップ:
type != "language"(例:gpt-image-2、gemini-embedding-2)— .prompt ファイルでは使用不可preview、alpha、beta を含むもの。新しいプレビュー/アルファ/ベータが存在しても、安定版または GA モデルのみを使用してください。 ユーザーが明示的に「プレビューを使う」「新しいベータが欲しい」など要求した場合のみ、非安定版を選びます。| 優先順位 | Anthropic — id に含む |
OpenAI — id |
Google — id |
|---|---|---|---|
| reasoning | claude-opus-(かつ tags に reasoning を含む) |
-pro で終了 |
-pro を含む |
| balance | claude-sonnet- |
ベース gpt-N.M(-mini/-nano/-pro なし) |
-pro を含む |
| speed | claude-haiku- |
-mini で終了 |
-flash で終了(-flash-lite ではない) |
| cost | claude-haiku- |
-nano で終了 |
-flash-lite を含む |
複数の安定版モデルが一致した場合の優先ルール:
claude-sonnet-4.6)を日付付きスナップショット(claude-sonnet-4-20250514)より優先します。ただし、再現性が必須な場合(例:評価用判定モデル)は除きます。context_window が大きいものを選び、次に pricing.input が低いものを選びます。スナップショット内のすべてのマッチが プレビュー/アルファ/ベータである場合(つまり、階層全体がプレリリース状態)、そのことをユーザーに通知し、選択前に確認を取ります。唯一の選択肢だからという理由で、黙ってプレビューを選んではいけません。
ゲートウェイ ID はプロバイダー接頭辞を持ち、ドットを使用します。プロンプトファイル ID は接頭辞を削除し、ハイフンを使用します。2 つの変換を適用します: 最初の / までを削除し、その後 . を - に置き換えます。
ゲートウェイ id |
プロンプトファイル model: |
|---|---|
anthropic/claude-sonnet-4.6 |
claude-sonnet-4-6 |
openai/gpt-5.5 |
gpt-5-5 |
google/gemini-3-flash |
gemini-3-flash |
変換後の文字列を .prompt ファイルのヘッダー(フロントマター)に入力します:
---
provider: anthropic
model: claude-sonnet-4-6
temperature: 0.7
maxTokens: 4096
---
output-dev-prompt-file — 全般的な .prompt ファイル構造output-dev-upgrade-prompt-models — 既存プロンプトを現在のファミリー最新版に一括アップグレードoutput-eval-judge-prompt — 判定モデル固有の選択ガイダンス(小さく始めて、TPR/TNR 失敗時にエスカレート)This skill is the single source of truth for model selection across Output SDK skills and agents. Other skills link here instead of pinning specific model IDs, because model rosters drift faster than docs.
We run this at skill-load time to fetch the 10 most recently released models per provider from the Vercel AI Gateway:
output=$(curl -fsS https://ai-gateway.vercel.sh/v1/models 2>/dev/null | jq '
.data as $models
| {
anthropic: ([ $models[] | select(.id | startswith("anthropic/")) ] | sort_by(.released) | reverse | .[0:10]),
openai: ([ $models[] | select(.id | startswith("openai/")) ] | sort_by(.released) | reverse | .[0:10]),
google: ([ $models[] | select(.id | startswith("google/")) ] | sort_by(.released) | reverse | .[0:10])
}
' 2>/dev/null)
if [ -n "$output" ]; then printf '%s\n' "$output"; else echo "(snapshot unavailable)"; fi
output=$(curl -fsS https://ai-gateway.vercel.sh/v1/models 2>/dev/null | jq '
.data as $models
| {
anthropic: ([ $models[] | select(.id | startswith("anthropic/")) ] | sort_by(.released) | reverse | .[0:10]),
openai: ([ $models[] | select(.id | startswith("openai/")) ] | sort_by(.released) | reverse | .[0:10]),
google: ([ $models[] | select(.id | startswith("google/")) ] | sort_by(.released) | reverse | .[0:10])
}
' 2>/dev/null)
if [ -n "$output" ]; then printf '%s\n' "$output"; else echo "(snapshot unavailable)"; fi
If the block above is empty, the script didn't execute automatically — likely because part of it (jq, curl, or network access) is missing. Query and filter the snapshot yourself before continuing.
{
"anthropic": [ <model>, ..., <up to 10> ],
"openai": [ <model>, ..., <up to 10> ],
"google": [ <model>, ..., <up to 10> ]
}
Each <model> is the unmodified gateway payload. Useful fields per model:
| Field | What to use it for |
|---|---|
id |
The provider-prefixed ID (eg anthropic/claude-sonnet-4.6) — translate to prompt-file form (Step 5) |
released |
Unix timestamp of release. Snapshot is already sorted newest-first per provider. |
name |
Human-readable name |
description |
One-paragraph capability summary — read this when comparing similarly-named tiers |
context_window |
Max input tokens. Matters when prompts include large context (codebases, long docs) |
max_tokens |
Max single-response output tokens |
tags |
Capability flags. reasoning, tool-use, vision, file-input, web-search, image-generation, explicit-caching, implicit-caching |
pricing.input / pricing.output |
Per-token cost (USD). Multiply by 1,000,000 for "per 1M tokens" |
pricing.input_cache_read |
Cached-input price — usually 10× cheaper than input |
type |
language for chat models; image models surface as image-generation and aren't valid for .prompt files |
Pick the first row that fits. If unclear, default to reasoning.
| Priority | Use when |
|---|---|
| reasoning (default) | Complex multi-step logic, structured output extraction, judges with edge cases, anything where wrong > slow |
| balance | Most generative work — summarization, classification, content drafting, conversation |
| speed | Short interactive responses, low-latency UI loops, simple transforms |
| cost | Bulk batch processing where token spend dominates and quality floor is forgiving |
Scan existing *.prompt files in the workflow (and its siblings under src/workflows/) and tally what provider: they declare.
anthropic.useSearchGrounding, OpenAI's maxToolCalls) is provider-specific.Output SDK provider: values don't always line up with the snapshot keys, since Vercel groups Gemini under google/:
| Output SDK provider | Snapshot key |
|---|---|
anthropic |
anthropic |
openai |
openai |
google-vertex (Gemini models) |
google |
google-vertex (Claude models) |
anthropic (then re-add the @vertex suffix manually) |
amazon-bedrock |
anthropic (then translate to bedrock namespace manually) |
The list is already sorted newest-first. Walk it top-down and pick the first model whose id matches the tier for your priority.
Skip these by default:
type != "language" (eg gpt-image-2, gemini-embedding-2) — not valid for .prompt files.preview, alpha, or beta. Use stable / GA models only, even if a newer preview/alpha/beta exists. Only pick a non-stable model when the user explicitly asks for it ("use the preview", "I want the new beta", etc.).| Priority | Anthropic — match id containing |
OpenAI — match id |
Google — match id |
|---|---|---|---|
| reasoning | claude-opus- (and tags includes reasoning) |
ends with -pro |
contains -pro |
| balance | claude-sonnet- |
base gpt-N.M (no -mini/-nano/-pro suffix) |
contains -pro |
| speed | claude-haiku- |
ends with -mini |
ends with -flash (not -flash-lite) |
| cost | claude-haiku- |
ends with -nano |
contains -flash-lite |
Tie-breakers when multiple stable models match:
claude-sonnet-4.6) over a dated snapshot (claude-sonnet-4-20250514) unless reproducibility is required (eg eval judges).context_window, then lower pricing.input.If every match in the snapshot is a preview/alpha/beta — meaning the entire tier is in pre-release — surface that to the user and ask before picking one. Don't silently use a preview because it was the only thing available.
Gateway IDs carry a provider prefix and use dots; prompt-file IDs strip the prefix and use hyphens. Apply two transformations: drop everything up to and including the first /, then replace . with -.
Gateway id |
Prompt-file model: |
|---|---|
anthropic/claude-sonnet-4.6 |
claude-sonnet-4-6 |
openai/gpt-5.5 |
gpt-5-5 |
google/gemini-3-flash |
gemini-3-flash |
Drop the translated string into your .prompt frontmatter:
---
provider: anthropic
model: claude-sonnet-4-6
temperature: 0.7
maxTokens: 4096
---
output-dev-prompt-file — overall .prompt file structureoutput-dev-upgrade-prompt-models — bulk-upgrade existing prompts to the latest version of their current familyoutput-eval-judge-prompt — judge-specific selection guidance (start small, escalate on TPR/TNR failures)原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。