SKILL.md--- name: model-discovery description: "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." --- # Model Discovery Skill 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. ## Variables | Variable | Default | Description | |----------|---------|-------------| | CACHE_TTL_HOURS | 24 | How long to cache model lists before refreshing | | ENABLED_ANTHROPIC | true | Fetch Claude models from Anthropic API | | ENABLED_OPENAI | true | Fetch GPT models from OpenAI API | | ENABLED_GEMINI | true | Fetch Gemini models from Google API | | ENABLED_OLLAMA | true | Fetch local models from Ollama | | OLLAMA_HOST | http://localhost:11434 | Ollama API endpoint | | AUTO_CLASSIFY | true | Auto-classify new models using pattern matching | ## Instructions **MANDATORY** - Follow the Workflow steps below in order. Do not skip steps. - Before referencing model names in any skill, check if fresh data exists - Use tier mappings to select appropriate models (fast for speed, heavy for capability) - Check for new models periodically and classify them ## Red Flags - STOP and Reconsider If you're about to: - Hardcode a model version like `gpt-5.2` or `claude-sonnet-4-5` - Use model names from memory without checking current availability - Call APIs without checking if API keys are configured - Skip new model classification when prompted **STOP** -> Read the appropriate cookbook file -> Use the fetch script ## Workflow ### Fetching Models 1. [ ] Determine which provider(s) you need models from 2. [ ] Check if cached model list exists: `cache/models.json` 3. [ ] If cache is fresh (< CACHE_TTL_HOURS old), use cached data 4. [ ] If stale/missing, run: `uv run python scripts/fetch_models.py --force` 5. [ ] **CHECKPOINT**: Verify no API errors in output 6. [ ] Use the model IDs as needed ### Checking for New Models 1. [ ] Run: `uv run python scripts/check_new_models.py --json` 2. [ ] If new models found, review the output 3. [ ] For auto-classification: `uv run python scripts/check_new_models.py --auto` 4. [ ] For interactive classification: `uv run python scripts/check_new_models.py` 5. [ ] **CHECKPOINT**: All models assigned to tiers (fast/default/heavy) ### Getting Tier Recommendations 1. [ ] Read: `config/model_tiers.json` for current tier mappings 2. [ ] Use the appropriate model for task complexity: - **fast**: Simple tasks, high throughput, cost-sensitive - **default**: General purpose, balanced - **heavy**: Complex reasoning, research, difficult tasks ## Model Tier Reference ### Anthropic Claude | Tier | Model | CLI Name | |------|-------|----------| | fast | c