Urgent.News

What's breaking now, across thousands of outlets.

AI

Model routing with OpenRouter and DeepSeek to cut costs without losing quality

Model routing means sending each request to the cheapest model that still solves the task at the quality you need, instead of sending everything to a single expensive model. In production I implemented it with OpenRouter as a single access layer: DeepSeek for the bulk of traffic (classification, extraction, summaries) and a premium model like Claude only for the cases where quality is critical.…

Model routing is a technique where requests are sent to the cheapest model that can still achieve the required quality, rather than sending everything to a single expensive model. In a production implementation using OpenRouter, DeepSeek is used for the majority of traffic (classification, extraction, summarization), while a premium model like Claude is reserved only for cases where quality is critical.

This approach cuts AI costs significantly, often by 80-90%, without users noticing a difference. The process involves sending the bulk of traffic to a cheaper model like DeepSeek, validating its output, and escalating to the premium model only when necessary. It's crucial to clean the JSON before giving up to avoid unnecessary escalations.

To determine which tasks the cheap model can handle effectively, you need to identify tasks with predictable, verifiable formats (like classification, extraction, summarization), where DeepSeek performs near-par with premium models. However, tasks requiring open-ended reasoning, strict adherence to long instructions, or nuanced writing may need the premium model.

This strategy reduces costs by directing only the most complex tasks to more expensive models, while the majority of requests are handled by cheaper models.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

What if your AI assistant had two minutes of free time?如果你的AI助手有两分钟的空闲时间,会怎样?

A few weeks ago I was talking with Claude about whether a model could have anything like a belief, and what it would take.

  • Claude Fable 5.1 focused on interpretability, exploring Anthropic's J-space work
  • ChatGPT Sol exceeded time constraint, searched diverse topics including archaeology and NASA
  • Gemini 3.6 Flash acknowledged inability to browse without specific goal

More from Saturday 5 September →