• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

output-dev-model-selection

プラグイン
outputai
ソース
GitHub で見る ↗
説明

出力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.

ユースケース
  • 新しい.promptファイルを作成するとき
  • モデルの選択内容を見直すとき
  • 古いモデルをアップグレードするとき
本文(日本語訳)

Output SDK プロンプト用のモデル選択

このスキルは、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 トークンあたりのコスト(USD)。「100 万トークンあたり」に換算する場合は 1,000,000 を掛ける
pricing.input_cache_read キャッシュ入力の価格 — 通常は input の 10 分の 1
type チャットモデルは language;画像生成モデルは image-generation で、.prompt ファイルでは使用不可

判定フロー

ステップ 1 — タスク優先度を判定

当てはまる最初の行を選びます。不明な場合は、デフォルトで 推論 を選びます。

優先度 次のような場合に使用
推論(デフォルト) 複雑な多段階ロジック、構造化出力の抽出、エッジケースに対応する判定、間違える方が遅いより悪い場面
バランス ほとんどの生成タスク — 要約、分類、コンテンツ作成、会話
速度 短い対話的な応答、低遅延の UI ループ、単純な変換
コスト トークン消費量が支配的で、品質の下限が許容される大量バッチ処理

ステップ 2 — プロバイダーを判定

ワークフロー内の既存の *.prompt ファイルと、src/workflows/ 傘下の兄弟ワークフローをスキャンし、宣言されている provider: を数えます。

  • ワークフロー(または兄弟ワークフロー)が既にあるプロバイダーを使っているなら、それに合わせてください。 複数プロバイダーの混在は、ランタイムが各 API キーを必要とするため、運用上のリスク。
  • 既存プロンプトがなければ、デフォルトで anthropic を選びます。
  • ユーザーが明示的に要求した場合、またはプロバイダー固有の機能(例: Gemini の useSearchGrounding、OpenAI の maxToolCalls)が必要な場合のみ、プロバイダーを変更してください。

ステップ 3 — プロバイダー名をスナップショットキーにマップ

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 名前空間に変換)

ステップ 4 — プロバイダーのリストからモデルを選択

リストは既に新しい順に整列されています。上から下へ走査し、優先度に合った id を持つ最初のモデルを選びます。

デフォルトではスキップ:

  • type != "language"(例: gpt-image-2、gemini-embedding-2)— .prompt ファイルでは使用不可
  • preview、alpha、beta を含む ID。安定版 / GA モデルのみを使用してください。 ユーザーが明示的に要求した場合のみ(「プレビュー版を使って」「新しいベータ版が欲しい」など)、非安定版を選んでください。
優先度 Anthropic — id に含むもの OpenAI — id にマッチ Google — id にマッチ
推論 claude-opus-(かつ tags に reasoning を含む) -pro で終わる -pro を含む
バランス claude-sonnet- ベース gpt-N.M(-mini/-nano/-pro サフィックスなし) -pro を含む
速度 claude-haiku- -mini で終わる -flash を含む(-flash-lite ではない)
コスト claude-haiku- -nano で終わる -flash-lite を含む

複数の安定版モデルがマッチした場合の優先順位:

  • 再現性が必要でない限り(例: 評価判定)、日付付きスナップショット(claude-sonnet-4-20250514)より、バージョン指定なしの別名(claude-sonnet-4.6)を優先。
  • 2 つの真に同等の行がある場合、context_window が大きいものを、次に pricing.input が低いものを選ぶ。

スナップショット内の すべて がプレビュー/アルファ/ベータの場合 — つまり、その階層全体がプレリリース中 — ユーザーに通知し、選ぶ前に確認を求めてください。利用可能な唯一のものだからといって、黙ってプレビュー版を使用しないでください。

ステップ 5 — ゲートウェイ ID をプロンプトファイルのモデル文字列に変換

ゲートウェイ 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
maxOutputTokens: 4096
---

関連項目

  • output-dev-prompt-file — .prompt ファイル全体の構造
  • output-dev-upgrade-prompt-models — 既存プロンプトを現在のファミリーの最新版に一括アップグレード
  • output-eval-judge-prompt — 判定用モデルの選択ガイダンス(小規模で開始し、TPR/TNR 失敗時にスケールアップ)
原文(English)を表示

Picking a Model for an Output SDK Prompt

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.

Live model snapshot

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

Snapshot Data

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

Snapshot Fallback

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.

Snapshot shape

{
  "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

Decision flow

Step 1 — Determine task priority

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

Step 2 — Determine provider

Scan existing *.prompt files in the workflow (and its siblings under src/workflows/) and tally what provider: they declare.

  • If the workflow (or sibling workflows) already use one provider, match it. Mixing providers means the runtime needs API keys for each — operational footgun.
  • If no existing prompts, default to anthropic.
  • Only switch provider when the user explicitly asks, or when a feature you need (eg Gemini's useSearchGrounding, OpenAI's maxToolCalls) is provider-specific.

Step 3 — Map provider name to snapshot key

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)

Step 4 — Pick a model from the provider's list

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.
  • IDs containing 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:

  • Prefer the unversioned alias (claude-sonnet-4.6) over a dated snapshot (claude-sonnet-4-20250514) unless reproducibility is required (eg eval judges).
  • If two truly equivalent rows exist, take the one with the larger 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.

Step 5 — Translate the gateway ID into a prompt-file model string

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
maxOutputTokens: 4096
---

See also

  • output-dev-prompt-file — overall .prompt file structure
  • output-dev-upgrade-prompt-models — bulk-upgrade existing prompts to the latest version of their current family
  • output-eval-judge-prompt — judge-specific selection guidance (start small, escalate on TPR/TNR failures)

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。