Query and display available GitHub Copilot AI models with their capabilities, context limits, and features. Use when: "what models are available", "show copilot models", "list github models", "check model capabilities", "switch models". Examples: - user: "What models can I use with GitHub Copilot?" → fetch and display available models - user: "Show me models with vision support" → filter models by capability - user: "Which model has the largest context window?" → compare model specifications - user: "List all GPT-5 models" → filter by model family
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Query available GitHub Copilot AI models directly from the API to see what models you actually have access to (not just what OpenCode knows about).
The model registry OpenCode ships with is a cache, not a source of truth — it is a config file bundled at OpenCode's own release time, so it is always at least as stale as the gap since that release. The GitHub Copilot API is the only place that reflects your actual, current, per-subscription access: a model can be added, removed, or moved from preview to enabled (or the reverse) without OpenCode's registry ever being updated. Every question about "what models can I use" or "why did this model stop working" should be answered by querying the live API first, then treating anything OpenCode's own listing says as a claim to verify, not a fact to trust.
This distinction matters most under two conditions the registry can never reflect: subscription-tier gating (your org's plan determines which models are enabled for you specifically, not globally) and policy-state churn (a model silently moving to disabled or preview is the single most common cause of "it worked yesterday" incidents).
Use this skill when you need to:
/models endpoint and its policy/capabilities shape, which don't apply elsewhereUse the provided script to fetch your available models, run relative to this skill's own directory:
# Plain listing
scripts/fetch-models.sh
# With JSON output for parsing
scripts/fetch-models.sh --json
# Filter by category
scripts/fetch-models.sh --category powerful
# Show only picker-enabled models
scripts/fetch-models.sh --picker-only| --json | Raw JSON output | fetch-models.sh --json |
| --picker-only | Only show featured models | fetch-models.sh --picker-only |
| --category <cat> | Filter by category | fetch-models.sh --category versatile |
| --family <name> | Filter by model family | fetch-models.sh --family claude |
| --vendor <name> | Filter by vendor | fetch-models.sh --vendor Anthropic |
| --vision | Only models with vision | fetch-models.sh --vision |
| --help | Show all options | fetch-models.sh --help |
See references/manual-queries-and-workflows.md for the raw curl/jq equivalent of the script, plus worked example workflows (large-context filtering, vision-model discovery, per-vendor comparison).
The script automatically reads your OpenCode authentication from:
~/.local/share/opencode/auth.jsonIf authentication fails:
# Re-authenticate with GitHub Copilot
opencode auth add github-copilot
# Verify authentication
opencode auth listAfter finding your desired model, specify it per-command or set a default:
# Per-command (recommended for testing)
opencode run --model gpt-5.2-codex "Refactor this code"
# Set project default in .opencode/opencode.json
{
"defaultModel": "gpt-5.2-codex"
}Validation: Test the model is active and responding correctly:
opencode run "Echo back: model working" && echo "✓ Model active"When choosing a model after querying:
"enabled" models are usable; ignore "disabled" or restricted modelspowerful for complex tasks, versatile for general use, fast for quick iterationsPer-command (recommended for testing):
Project default (use after validation):
.opencode/opencode.json only after confirming model stability--model flag on every commandWHY: GitHub Copilot model availability varies by subscription tier and region; a hardcoded ID that worked for one teammate can fail silently for another, or fail for everyone after a policy change.
❌ BAD:
{ "defaultModel": "gpt-5.2-codex" }set without ever checking whether the account actually has access.
✅ GOOD:
scripts/fetch-models.sh --json | jq -r '.data[].id' # confirm it's in the list firstConsequence: The failure mode is silent until runtime — the config parses fine, and the error only surfaces as an opaque "model unavailable" when a job actually tries to use it.
WHY: OpenCode's registry is a snapshot baked in at release time; it does not track live per-account policy changes.
❌ BAD:
opencode models # trusts a potentially stale bundled list✅ GOOD:
scripts/fetch-models.sh --json # queries the live GitHub Copilot APIConsequence: A model shown as available in opencode models can already be disabled on the account, and a genuinely new model can be invisible to OpenCode entirely.
policy.state when selecting a modelWHY: models with "disabled" or "preview" state can appear in the listing yet still reject requests at runtime.
❌ BAD:
jq '.data[0].id' # takes the first model with no state check✅ GOOD:
jq '.data[] | select(.policy.state == "enabled")'Consequence: Scripts and configs built on an unfiltered list intermittently fail whenever the selected model happens to be preview- or disabled-gated for that account.
WHY: model names don't reliably encode context limits — a "3.5" in a name is a version number, not a token count, and vendors change limits between releases without renaming the model.
❌ BAD: guessing "this sounds like a big model" from the name alone.
✅ GOOD:
jq '.data[] | {id, context: .capabilities.limits.max_context_window_tokens}'Consequence: A pipeline sized for the wrong context window either truncates input silently or rejects requests that should have fit.
preview model as production-safeWHY: preview access is provisional and can be restricted or withdrawn without the standard deprecation notice a stable model would get, and preview models must always be cross-checked against policy.state before being wired into anything unattended.
❌ BAD: setting a preview-tagged model as a CI pipeline's defaultModel.
✅ GOOD: use preview models for manual, interactive testing only, and require policy.state == "enabled" (not "preview") before a model is eligible for unattended use.
Consequence: A CI pipeline built on a preview model can start failing overnight with no corresponding code change, because the provider — not the user — changed the model's availability.
Common issues (root causes and detailed diagnosis in references/troubleshooting.md):
policy.state and the preview flag| Topic | Reference | When to Use |
|---|---|---|
Raw curl/jq API query and worked example filters | Manual Queries and Workflows | The packaged script isn't available, or you need a custom jq filter beyond its flags |
| Root-cause diagnosis for auth, staleness, and runtime-unavailable errors | Troubleshooting | A query fails, a model that should be listed isn't, or a previously-working model stops responding |
| Official model listing endpoint | GitHub Copilot Models API | Confirming the live response shape or endpoint behaviour directly |
Provider auth setup and auth.json format | OpenCode Authentication Docs | Setting up or debugging GitHub Copilot authentication in OpenCode |
| Tier-based model availability | GitHub Copilot Subscription Plans | Explaining why a model is preview-gated or unavailable on a given subscription |
a1083f4
Also appears in
last in sync Aug 28, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.