When you're building with LLMs, there's no single "best" model. The best model depends entirely on what you're building.
Here's a practical guide to which model fits which job โ with real code examples and cost breakdowns.
The 6 Model Types
โก Fast โ General Chat & Text
Best for: Customer support chatbots, content generation, summarization
This is your workhorse. Fast responses, lowest cost. Use it for the 80% of requests that don't need deep reasoning.
const completion = await client.chat.completions.create({
model: 'dubhe-fast', // $0.30/M input
messages: [{ role: 'user', content: 'Write a product description' }]
});
Cost per request: ~$0.00022
When to use: Default for all simple queries
๐ป Code โ Programming Tasks
Best for: Code generation, debugging, code review
Specialized for programming. Handles complex code patterns and multiple languages.
const completion = await client.chat.completions.create({
model: 'dubhe-code', // $0.80/M input
messages: [{ role: 'user', content: 'Write a React hook that debounces API calls' }]
});
๐ค Agent โ Automation
Best for: Function calling, multi-step workflows, tool use
Optimized for agentic patterns โ structured outputs, tool calling, and complex instructions.
โ Plus โ Long Context
Best for: Document analysis, full-codebase review, long conversations
Handles up to 1M tokens of context.
๐ Vision โ Image Understanding
Best for: Image analysis, OCR, screenshot understanding
const completion = await client.chat.completions.create({
model: 'dubhe-vision',
messages: [
{ role: 'user', content: [
{ type: 'text', text: 'What error is shown?' },
{ type: 'image_url', image_url: { url: 'https://example.com/error.png' } }
]}
]
});
๐ง Reasoner โ Deep Reasoning
Best for: Complex problem-solving, math, logic, analysis
Spends extra compute tokens on "thinking" before answering.
Decision Tree
Is the task code-related?
โ Yes โ Use Code model
โ No โ Does it need images?
โ Yes โ Use Vision model
โ No โ Complex reasoning?
โ Yes โ Use Reasoner model
โ No โ Long context needed?
โ Yes โ Use Plus model
โ No โ Agentic (tool use)?
โ Yes โ Use Agent model
โ No โ Use Fast model
Cost Strategy
- Route simple queries to Fast model (saves 10-20x)
- Route coding questions to Code model
- Fall back to Reasoner only when uncertain
- Use Vision only when images are submitted
This approach can cut API costs by 60-80%.
Try It Yourself
All these models are available through a single API endpoint at Dubhe Hub โ just change the model name in your code.
Pricing starts at $0.30/M input tokens. Free tier: 100K tokens to test before committing.
Top comments (0)