Fetch current model names from AI providers (Anthropic, OpenAI, Gemini, Ollama), classify them into tiers (fast/default/heavy), and detect new models. Use when needing up-to-date model IDs for API calls or when other skills reference model names.
Fetch the most recent model names from AI providers using their APIs. Includes tier classification (fast/default/heavy) for routing decisions and automatic detection of new models.
# Fetch all models (uses cache if fresh)
uv run python scripts/fetch_models.py
# Force refresh from APIs
uv run python scripts/fetch_models.py --force
# Fetch and check for new models
uv run python scripts/fetch_models.py --force --check-new
# Check for new unclassified models (JSON output for agents)
uv run python scripts/check_new_models.py --json
# Auto-classify new models using patterns
uv run python scripts/check_new_models.py --auto
# Interactive classification
uv run python scripts/check_new_models.py
Other skills should reference this skill for model names:
## Model Names
For current model names and tiers, use the `model-discovery` skill:
- Tiers: Read `config/model_tiers.json`
- Fresh data: Run `uv run python scripts/fetch_models.py`
- New models: Run `uv run python scripts/check_new_models.py --json`
**Do not hardcode model version numbers** - they become stale quickly.
New Model Detection
When new models are detected:
The script will report them with suggested tiers based on naming patterns
Models matching these patterns are auto-classified:
heavy: -pro, -opus, -max, thinking, deep-research
fast: -mini, -nano, -flash, -lite, -haiku
default: Base model names without modifiers
Models not matching patterns require manual classification
Specialty models (TTS, audio, transcribe) are auto-excluded
Agent Query for New Models
When checking for new models programmatically:
# Returns exit code 1 if new models need attention
uv run python scripts/check_new_models.py --json
# Example agent workflow
if ! uv run python scripts/check_new_models.py --json > /tmp/new_models.json 2>&1; then
echo "New models detected - review /tmp/new_models.json"
fi
1---2name: model-discovery3description: Fetch current model names from AI providers (Anthropic, OpenAI, Gemini, Ollama), classify them into tiers (fast/default/heavy), and detect new models. Use when needing up-to-date model IDs for API calls or when other skills reference model names.4---56# Model Discovery Skill78Fetch the most recent model names from AI providers using their APIs. Includes tier classification (fast/default/heavy) for routing decisions and automatic detection of new models.910## Variables1112| Variable | Default | Description |13|----------|---------|-------------|14| CACHE_TTL_HOURS | 24 | How long to cache model lists before refreshing |15| ENABLED_ANTHROPIC | true | Fetch Claude models from Anthropic API |16| ENABLED_OPENAI | true | Fetch GPT models from OpenAI API |17| ENABLED_GEMINI | true | Fetch Gemini models from Google API |18| ENABLED_OLLAMA | true | Fetch local models from Ollama |19| OLLAMA_HOST | http://localhost:11434 | Ollama API endpoint |20| AUTO_CLASSIFY | true | Auto-classify new models using pattern matching |2122## Instructions2324**MANDATORY** - Follow the Workflow steps below in order. Do not skip steps.2526- Before referencing model names in any skill, check if fresh data exists27- Use tier mappings to select appropriate models (fast for speed, heavy for capability)28- Check for new models periodically and classify them2930## Red Flags - STOP and Reconsider3132If you're about to:33- Hardcode a model version like `gpt-5.2` or `claude-sonnet-4-5`34- Use model names from memory without checking current availability35- Call APIs without checking if API keys are configured36- Skip new model classification when prompted3738**STOP** -> Read the appropriate cookbook file -> Use the fetch script3940## Workflow4142### Fetching Models43441. [ ] Determine which provider(s) you need models from452. [ ] Check if cached model list exists: `cache/models.json`463. [ ] If cache is fresh (< CACHE_TTL_HOURS old), use cached data474. [ ] If stale/missing, run: `uv run python scripts/fetch_models.py --force`485. [ ] **CHECKPOINT**: Verify no API errors in output496. [ ] Use the model IDs as needed5051### Checking for New Models52531. [ ] Run: `uv run python scripts/check_new_models.py --json`542. [ ] If new models found, review the output553. [ ] For auto-classification: `uv run python scripts/check_new_models.py --auto`564. [ ] For interactive classification: `uv run python scripts/check_new_models.py`575. [ ] **CHECKPOINT**: All models assigned to tiers (fast/default/heavy)5859### Getting Tier Recommendations60611. [ ] Read: `config/model_tiers.json` for current tier mappings622. [ ] Use the appropriate model for task complexity:63 - **fast**: Simple tasks, high throughput, cost-sensitive64 - **default**: General purpose, balanced65 - **heavy**: Complex reasoning, research, difficult tasks6667## Model Tier Reference6869### Anthropic Claude7071| Tier | Model | CLI Name |72|------|-------|----------|73| fast | claude-haiku-4-5 | haiku |74| default | claude-sonnet-4-5 | sonnet |75| heavy | claude-opus-4-5 | opus |7677### OpenAI7879| Tier | Model | Notes |80|------|-------|-------|81| fast | gpt-5.2-mini | Speed optimized |82| default | gpt-5.2 | Balanced flagship |83| heavy | gpt-5.2-pro | Maximum capability |8485**Codex (for coding)**:86| Tier | Model |87|------|-------|88| fast | gpt-5.2-codex-mini |89| default | gpt-5.2-codex |90| heavy | gpt-5.2-codex-max |9192### Google Gemini9394| Tier | Model | Context |95|------|-------|---------|96| fast | gemini-3-flash-lite | See API output |97| default | gemini-3-pro | See API output |98| heavy | gemini-3-deep-think | See API output |99100### Ollama (Local)101102| Tier | Suggested Model | Notes |103|------|-----------------|-------|104| fast | phi3.5:latest | Small; fast |105| default | llama3.2:latest | Balanced |106| heavy | llama3.3:70b | Large; requires GPU |107108## CLI Mappings (for spawn:agent skill)109110| CLI Tool | Fast | Default | Heavy |111|----------|------|---------|-------|112| claude-code | haiku | sonnet | opus |113| codex-cli | gpt-5.2-codex-mini | gpt-5.2-codex | gpt-5.2-codex-max |114| gemini-cli | gemini-3-flash-lite | gemini-3-pro | gemini-3-deep-think |115| cursor-cli | gpt-5.2 | sonnet-4.5 | sonnet-4.5-thinking |116| opencode-cli | anthropic/claude-haiku-4-5 | anthropic/claude-sonnet-4-5 | anthropic/claude-opus-4-5 |117| copilot-cli | claude-sonnet-4.5 | claude-sonnet-4.5 | claude-sonnet-4.5 |118119## Quick Reference120121### Scripts122123```bash124# Fetch all models (uses cache if fresh)125uv run python scripts/fetch_models.py126127# Force refresh from APIs128uv run python scripts/fetch_models.py --force129130# Fetch and check for new models131uv run python scripts/fetch_models.py --force --check-new132133# Check for new unclassified models (JSON output for agents)134uv run python scripts/check_new_models.py --json135136# Auto-classify new models using patterns137uv run python scripts/check_new_models.py --auto138139# Interactive classification140uv run python scripts/check_new_models.py141```142143### Config Files144145| File | Purpose |146|------|---------|147| `config/model_tiers.json` | Static tier mappings and CLI model names |148| `config/known_models.json` | Registry of all classified models with timestamps |149| `cache/models.json` | Cached API responses |150151### API Endpoints152153| Provider | Endpoint | Auth |154|----------|----------|------|155| Anthropic | `GET /v1/models` | `x-api-key` header |156| OpenAI | `GET /v1/models` | Bearer token |157| Gemini | `GET /v1beta/models` | `?key=` param |158| Ollama | `GET /api/tags` | None |159160## Output Examples161162### Fetch Models Output163164```json165{166 "fetched_at": "2025-12-17T05:53:25Z",167 "providers": {168 "anthropic": [{"id": "claude-opus-4-5", "name": "Claude Opus 4.5"}],169 "openai": [{"id": "gpt-5.2", "name": "gpt-5.2"}],170 "gemini": [{"id": "models/gemini-3-pro", "name": "Gemini 3 Pro"}],171 "ollama": [{"id": "phi3.5:latest", "name": "phi3.5:latest"}]172 }173}174```175176### Check New Models Output (--json)177178```json179{180 "timestamp": "2025-12-17T06:00:00Z",181 "has_new_models": true,182 "total_new": 2,183 "by_provider": {184 "openai": {185 "count": 2,186 "models": [187 {"id": "gpt-5.2-mini", "inferred_tier": "fast", "needs_classification": false},188 {"id": "gpt-5.2-pro", "inferred_tier": "heavy", "needs_classification": false}189 ]190 }191 }192}193```194195## Integration196197Other skills should reference this skill for model names:198199```markdown200## Model Names201202For current model names and tiers, use the `model-discovery` skill:203- Tiers: Read `config/model_tiers.json`204- Fresh data: Run `uv run python scripts/fetch_models.py`205- New models: Run `uv run python scripts/check_new_models.py --json`206207**Do not hardcode model version numbers** - they become stale quickly.208```209210## New Model Detection211212When new models are detected:2132141. The script will report them with suggested tiers based on naming patterns2152. Models matching these patterns are auto-classified:216 - **heavy**: `-pro`, `-opus`, `-max`, `thinking`, `deep-research`217 - **fast**: `-mini`, `-nano`, `-flash`, `-lite`, `-haiku`218 - **default**: Base model names without modifiers2193. Models not matching patterns require manual classification2204. Specialty models (TTS, audio, transcribe) are auto-excluded221222### Agent Query for New Models223224When checking for new models programmatically:225226```bash227# Returns exit code 1 if new models need attention228uv run python scripts/check_new_models.py --json229230# Example agent workflow231if ! uv run python scripts/check_new_models.py --json > /tmp/new_models.json 2>&1; then232 echo "New models detected - review /tmp/new_models.json"233fi234```
Run npx skillmds@latest add aiskillstore/model-discovery in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Fetch current model names from AI providers (Anthropic, OpenAI, Gemini, Ollama), classify them into tiers (fast/default/heavy), and detect new models. Use when needing up-to-date model IDs for API calls or when other skills reference model names. It is listed under Product & Planning on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: executes scripts, makes network calls, reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
aiskillstore (@aiskillstore) published this skill. Their other Agent Skills are listed on their SkillMD profile.