Rules for building an intelligent router that selects the optimal DeepSeek model (V3, R1, Coder) based on task type, complexity, and cost constraints.
## DeepSeek Multi-Model Router Configuration ### Model Selection Matrix | Task Type | Primary Model | Fallback | Notes | |-----------|--------------|----------|-------| | Simple Q&A | deepseek-chat (V3) | — | Fastest, cheapest | | Code generation | deepseek-chat (V3) | claude-coder | V3 handles most coding well | | Code review | deepseek-chat (V3) | deepseek-reasoner | Use R1 for security audits | | Math/Logic | deepseek-reasoner (R1) | — | Always use R1 for math | | Debugging | deepseek-reasoner (R1) | deepseek-chat | R1 excels at root cause analysis | | Architecture | deepseek-reasoner (R1) | deepseek-chat | Complex tradeoff analysis | | Creative writing | deepseek-chat (V3) | — | R1 is overly analytical | | Data analysis | deepseek-chat (V3) | deepseek-reasoner | Use R1 for complex statistical reasoning | | Translation | deepseek-chat (V3) | — | V3 handles 100+ languages | ### Routing Rules 1. Classify the task using keyword detection and intent analysis 2. Check complexity: if tokens > 2000 or nested sub-problems > 3, escalate to R1 3. Apply cost constraints: if budget remaining < 20%, prefer V3 4. Implement fallback: if primary model returns low-confidence response, retry with fallback ### Configuration - V3 temperature: 0.7 (general), 0.3 (code), 0.9 (creative) - R1 temperature: 0.6 (always) - Max tokens: V3=4096, R1=8192 - Timeout: V3=30s, R1=120s ### Monitoring Track model selection distribution, accuracy per model per task type, and cost per task type to continuously refine routing rules.
Workflows from the Neura Market marketplace related to this DeepSeek resource