DEV Community

Dubhe
Dubhe

Posted on

6 AI Models, 6 Use Cases: A Developer's Guide to Choosing the Right One

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' }]
});
Enter fullscreen mode Exit fullscreen mode

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' }]
});
Enter fullscreen mode Exit fullscreen mode

๐Ÿค– 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' } }
    ]}
  ]
});
Enter fullscreen mode Exit fullscreen mode

๐Ÿง  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
Enter fullscreen mode Exit fullscreen mode

Cost Strategy

  1. Route simple queries to Fast model (saves 10-20x)
  2. Route coding questions to Code model
  3. Fall back to Reasoner only when uncertain
  4. 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)