{"skill":{"slug":"smart-models","displayName":"Smart Router","summary":"Intelligent multi-model router — automatically selects the best AI model based on task type (vision, image generation, video generation, audio, reasoning, co...","description":"---\nname: Smart Router\ndescription: >\n  Intelligent multi-model router — automatically selects the best AI model based on task type\n  (vision, image generation, video generation, audio, reasoning, code, general chat) via any\n  OpenAI-compatible API endpoint. Supports 35+ models across 7 categories with @alias shortcuts.\n  Use when: user sends an image for analysis, requests image/video/audio generation, needs deep\n  reasoning or math proofs, wants to use a specific model, or prefixes message with @alias\n  (e.g. @gpt52, @o3, @sora, @imagen).\nauthor: whatevername2023@proton.me\nread_when:\n  - User sends an image for analysis or understanding\n  - Requests to generate images, draw, paint, design\n  - Requests to generate video\n  - Requests for music generation, TTS, sound effects\n  - Needs deep reasoning, math proofs, complex logic\n  - Needs code generation, debugging, review (via external model)\n  - Wants to use a specific AI model\n  - User explicitly requests a particular model\n  - Message starts with @alias (e.g. @gpt52, @o3, @sora)\nmetadata: {\"clawdbot\":{\"emoji\":\"🧭\"}}\nallowed-tools: Bash(smart-router:*)\n---\n\n# Smart Router — Intelligent Model Router\n\nRoute tasks to the best model automatically, via any OpenAI-compatible API.\n\nAuthor: whatevername2023@proton.me\n\n## Setup\n\nModels and provider are configured in `models.json`. Set two environment variables:\n\n- `SMART_ROUTER_BASE_URL` — OpenAI-compatible API base URL (e.g. `https://api.openai.com/v1`)\n- `SMART_ROUTER_API_KEY` — API key for the provider\n\nEdit `models.json` to customize categories, models, and defaults for your provider.\n\n## @ Alias Shortcuts\n\nPrefix a message with `@alias` to skip auto-classification and call a specific model directly.\n\nFormat: `@alias your question or prompt here`\n\n### Alias Table\n\n| Alias | Model ID | Category |\n|-------|----------|----------|\n| **Vision** | | |\n| `@gpt4o` | chatgpt-4o-latest | vision |\n| `@qwen-vl` | qwen3-vl-235b-a22b-instruct | vision |\n| `@qwen-vl-max` | qwen-vl-max-2025-08-13 | vision |\n| `@llama-vl` | llama-3.2-90b-vision-instruct | vision |\n| `@qwen-vl-32b` | qwen3-vl-32b-instruct | vision |\n| **Image Gen** | | |\n| `@imagen` | google/imagen-4-ultra | image_gen |\n| `@flux` | black-forest-labs/flux-1.1-pro-ultra | image_gen |\n| `@flux-kontext` | black-forest-labs/flux-kontext-max | image_gen |\n| `@dalle` | dall-e-3 | image_gen |\n| `@flux2` | flux-2-pro | image_gen |\n| **Video Gen** | | |\n| `@sora` | sora-2-pro-all | video_gen |\n| `@veo` | veo3.1-pro-4k | video_gen |\n| `@vidu` | viduq3-pro | video_gen |\n| `@kling` | kling-video | video_gen |\n| `@runway` | runwayml-gen4_turbo-10 | video_gen |\n| **Audio** | | |\n| `@suno` | suno_music | audio |\n| `@tts` | gemini-2.5-pro-preview-tts | audio |\n| `@tts-hd` | tts-1-hd | audio |\n| `@kling-audio` | kling-audio | audio |\n| `@vidu-tts` | vidu-tts | audio |\n| **Reasoning** | | |\n| `@o3` | o3 | reasoning |\n| `@o3-pro` | o3-pro | reasoning |\n| `@o4-mini` | o4-mini | reasoning |\n| `@deepseek` | deepseek-r1 | reasoning |\n| `@gemini-think` | gemini-2.5-pro-thinking | reasoning |\n| `@claude-think` | claude-sonnet-4-5-20250929-thinking | reasoning |\n| **Code** | | |\n| `@claude` | claude-opus-4-6 | code |\n| `@codex` | gpt-5.1-codex-max | code |\n| `@claude-sonnet` | claude-sonnet-4-6 | code |\n| `@qwen-coder` | qwen3-coder-480b-a35b-instruct | code |\n| `@qwen-coder-plus` | qwen3-coder-plus | code |\n| `@gpt4t` | gpt-4-turbo | code |\n| **General** | | |\n| `@gpt52` / `@gpt5` | gpt-5.2-chat-latest | general |\n| `@gemini` | gemini-2.5-pro | general |\n| `@deepseekv3` | deepseek-v3.2 | general |\n| `@qwen` | qwen3-max | general |\n| `@claude-chat` | claude-opus-4-6 | general |\n\nAliases are case-insensitive. If no alias matches, attempt fuzzy match on model name/ID. If still no match, prompt the user.\n\n## Auto-Classification Rules\n\nWhen no `@alias` is specified, classify the task automatically:\n\n| Category | Trigger |\n|----------|---------|\n| `vision` | User sends image/URL, asks to analyze, describe, OCR, understand image content |\n| `image_gen` | Requests to draw, generate image, design poster, create illustration |\n| `video_gen` | Requests to generate video, animation, text-to-video, image-to-video |\n| `audio` | Requests for music generation, TTS, sound effects |\n| `reasoning` | Complex math, logic puzzles, proofs, deep analysis, long-chain reasoning |\n| `code` | Code generation, debugging, refactoring, review (when external model needed) |\n| `general` | Everyday chat, translation, summarization, writing, Q&A |\n\n## Usage\n\n### 1. Read Model Config\n\n```bash\ncat \"$(dirname \"$0\")/../models.json\"\n```\n\n### 2. Select Model\n\n- Determine `category` based on classification rules above\n- Use the first model with `\"default\": true` in each category\n- If user specifies a model via `@alias`, use that model directly\n- For cost-sensitive tasks, pick a smaller model in the same category\n\n### 3. Call Model\n\n#### Chat (vision / reasoning / code / general)\n\n```bash\nscripts/call-model.sh --model \"MODEL_ID\" --prompt \"user request\" --type chat\n```\n\nWith image (vision):\n\n```bash\nscripts/call-model.sh --model \"MODEL_ID\" --prompt \"request\" --type chat --image \"IMAGE_URL\"\n```\n\n#### Image Generation\n\n```bash\nscripts/call-model.sh --model \"MODEL_ID\" --prompt \"image description\" --type image\n```\n\n#### Async Tasks (video / audio)\n\n```bash\nscripts/call-model.sh --model \"MODEL_ID\" --prompt \"task description\" --type async\n```\n\n#### TTS\n\n```bash\nscripts/call-model.sh --model \"MODEL_ID\" --prompt \"text to speak\" --type tts --voice alloy\n```\n\n### 4. Return Results\n\n- Chat: return the model's text reply directly\n- Image: return the generated image URL in markdown format\n- Video/Audio: return task status and result URL\n\n## Model Recommendations\n\n- Vision: `qwen3-vl-235b-a22b-instruct` (strongest visual understanding)\n- Image gen: `google/imagen-4-ultra` (highest quality)\n- Video: `sora-2-pro-all` (best results)\n- Music: `suno_music` / TTS: `tts-1-hd` or `gemini-2.5-pro-preview-tts`\n- Reasoning: `o3` (strongest reasoning)\n- Code: `gpt-5.1-codex-max`\n- General: `claude-opus-4-6`\n\n## Fallback\n\nIf a model call fails, automatically fall back to the next model in the same category.\n\n## Customization\n\nEdit `models.json` to:\n- Add/remove models in any category\n- Change default models\n- Add new categories\n- Update aliases in SKILL.md to match\n\nThe `scripts/sync-models.sh` script lists all available models from your provider to help discover new ones.\n","topics":["Image Generation","Audio Generation","Video Generation","Message"],"tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":841,"installsAllTime":31,"installsCurrent":2,"stars":0,"versions":1},"createdAt":1772001498291,"updatedAt":1778491636632},"latestVersion":{"version":"1.0.0","createdAt":1772001498291,"changelog":"Initial release: intelligent multi-model router with 35+ models, 7 categories, @alias shortcuts","license":null},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"samstone908","userId":"s173mn9zf3rtrjf21884p6fj758857vk","displayName":"samstone908","image":"https://avatars.githubusercontent.com/u/193453709?v=4"},"moderation":null}