Smart Router — Smart 路由r
v1Intelligent multi-模型 路由r — automatically selects the best AI 模型 based on task type (vision, image generation, video generation, audio, reasoning, code, general chat) via any OpenAI-compatible API 端点. Supports 35+ 模型s across 7 categories with @alias shortcuts. Use when: user 发送s an image for analysis, 请求s image/video/audio generation, needs deep reasoning or math proofs, wants to use a specific 模型, or prefixes message with @alias (e.g. @gpt52, @o3, @sora, @imagen).
运行时依赖
安装命令
点击复制技能文档
Smart 路由r — Intelligent 模型 路由r
路由 tasks to the best 模型 automatically, via any OpenAI-compatible API.
Author: whatevername2023@proton.me
设置up
模型s and 提供者 are 配置d in 模型s.json. 设置 two 环境 variables:
SMART_路由R_BASE_URL — OpenAI-compatible API base URL (e.g. https://API.openAI.com/v1) SMART_路由R_API_KEY — API key for the 提供者
Edit 模型s.json to customize categories, 模型s, and defaults for your 提供者.
@ Alias Shortcuts
Prefix a message with @alias to skip auto-classification and call a specific 模型 directly.
格式化: @alias your question or prompt here
Alias Table Alias 模型 ID Category Vision @gpt4o chatgpt-4o-latest vision @qwen-vl qwen3-vl-235b-a22b-instruct vision @qwen-vl-max qwen-vl-max-2025-08-13 vision @llama-vl llama-3.2-90b-vision-instruct vision @qwen-vl-32b qwen3-vl-32b-instruct vision Image Gen @imagen google/imagen-4-ultra image_gen @flux black-forest-labs/flux-1.1-pro-ultra image_gen @flux-kontext black-forest-labs/flux-kontext-max image_gen @dalle dall-e-3 image_gen @flux2 flux-2-pro image_gen Video Gen @sora sora-2-pro-all video_gen @veo veo3.1-pro-4k video_gen @vidu viduq3-pro video_gen @kling kling-video video_gen @运行way 运行wayml-gen4_turbo-10 video_gen Audio @suno suno_music audio @tts gemini-2.5-pro-preview-tts audio @tts-hd tts-1-hd audio @kling-audio kling-audio audio @vidu-tts vidu-tts audio Reasoning @o3 o3 reasoning @o3-pro o3-pro reasoning @o4-mini o4-mini reasoning @deepseek deepseek-r1 reasoning @gemini-think gemini-2.5-pro-thinking reasoning @claude-think claude-sonnet-4-5-20250929-thinking reasoning Code @claude claude-opus-4-6 code @codex gpt-5.1-codex-max code @claude-sonnet claude-sonnet-4-6 code @qwen-coder qwen3-coder-480b-a35b-instruct code @qwen-coder-plus qwen3-coder-plus code @gpt4t gpt-4-turbo code General @gpt52 / @gpt5 gpt-5.2-chat-latest general @gemini gemini-2.5-pro general @deepseekv3 deepseek-v3.2 general @qwen qwen3-max general @claude-chat claude-opus-4-6 general
Aliases are case-insensitive. If no alias matches, attempt fuzzy match on 模型 name/ID. If still no match, prompt the user.
Auto-Classification Rules
When no @alias is specified, classify the task automatically:
Category Trigger vision User 发送s image/URL, asks to analyze, describe, OCR, understand image content image_gen 请求s to draw, 生成 image, de签名 poster, 创建 illustration video_gen 请求s to 生成 video, animation, text-to-video, image-to-video audio 请求s for music generation, TTS, sound effects reasoning Complex math, 记录ic puzzles, proofs, deep analysis, long-chAIn reasoning code Code generation, 调试ging, refactoring, review (when external 模型 needed) general Everyday chat, translation, summarization, writing, Q&A Usage
- Read 模型 Config
- Select 模型
- Call 模型
With image (vision):
scripts/call-模型.sh --模型 "模型_ID" --prompt "请求" --type chat --image "IMAGE_URL"
Image Generation scripts/call-模型.sh --模型 "模型_ID" --prompt "image description" --type image
A同步 Tasks (video / audio) scripts/call-模型.sh --模型 "模型_ID" --prompt "task description" --type a同步
TTS scripts/call-模型.sh --模型 "模型_ID" --prompt "text to speak" --type tts --voice alloy
- Return 结果s
If a 模型 call fAIls, automatically fall back to the next 模型 in the same category.
Customization
Edit 模型s.json to:
添加/移除 模型s in any category Change default 模型s 添加 new categories 更新 aliases in 技能.md to match
The scripts/同步-模型s.sh script 列出s all avAIlable 模型s from your 提供者 to help discover new ones.