Preferences Over Benchmarks: Model Routing — Archana Kamath & Tyler Gillam, DigitalOcean

AI Engineer · 15 min · 203 sentences · from YouTube's caption track

Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.

  1. 00:01[music]
  2. 00:12Hello everyone.
  3. 00:14So preferences over benchmarks.
  4. 00:17The talk today is about model routing and specifically why the way most people think about picking a model which usually is chasing you know to the top of a benchmark
  5. 00:28is actually the wrong instinct.
  6. 00:32I'm Archa VP of engineering for inference engine and AI infrastructure at Digital Ocean and I'll be joined by Tyler who built parts of the router and will actually do a live demo for us today.
  7. 00:44We both work on the managed agent orchestration and inference engine products at digital ocean.
  8. 00:52So you may know digital ocean as droplets, databases and app platform.
  9. 00:57All of that is true.
  10. 00:58We are also the AI native cloud.
  11. 01:01This is five integrated layers starting from infrastructure all the way up to the managed agents with the inference engine right in the middle.
  12. 01:10And that's why we are here talking about inference router.
  13. 01:14Routing lives in the inference engine.
  14. 01:15And if you want to know more about our stack and the full story, please come find us at the booth.
  15. 01:24So everybody is reaching out for the model routing and let's look at three reasons why the three reasons that are breaking the one model habit for most users.
  16. 01:33The first one I want to talk about is cost.
  17. 01:36Spend is exploding and even companies like Walmart, Uber, Microsoft, they're actively capping usage to control the inference bills.
  18. 01:46The second one is fit.
  19. 01:48One model for every task is likely an overkill.
  20. 01:51We're essentially paying frontier rates for a work that a much smaller model will be able to handle really well.
  21. 01:58And the third one, which for me is the most important one, is the risk.
  22. 02:02The risk associated with one single model.
  23. 02:05models can go down and if you bet your entire product and production on one model, you have no failover when something degrades and model orchestration is actually the new phas.
  24. 02:20As you all know, cloud cost optimization took us about 15 years for it to actually become a real good discipline and for companies to get it right.
  25. 02:29This one actually is arriving in months and not years.
  26. 02:32And here's the premise that I think everybody gets wrong about this.
  27. 02:37We all think of like what is the best model for a job.
  28. 02:41Here's the thing.
  29. 02:42There is no single best model.
  30. 02:45The right one depends on the actual request.
  31. 02:48For example, if you're doing classification and labeling, a small open model may very well work really well for you and will give you really good cost optimizations.
  32. 02:59However, if you're running code completion in line, you will likely need really fast routing and that is where a faster larger routing model comes into picture.
  33. 03:09Think about code generation and bug fixing.
  34. 03:12You're likely good with an mid openw weight model.
  35. 03:15Uh and again, it'll bring you like really good cost optimizations over using a frontier for something that is likely an overkill in this situation.
  36. 03:23But then you're looking at like really accuracy critical tasks like code review and security, you're likely going to lean towards a frontier model.
  37. 03:34So essentially what makes a model right for a request?
  38. 03:38It's a mix that no public leaderboard can actually encode for you because it's the task itself.
  39. 03:44What are you actually trying to achieve?
  40. 03:45What is your model trying to achieve?
  41. 03:47The system prompts and tools around it.
  42. 03:49that is the methodology by which you're getting something done using a model.
  43. 03:54The cost you're willing to spend.
  44. 03:55This is a very very important aspect and latency the use case needs.
  45. 04:00Not all use cases need the same amount of latency.
  46. 04:04So depending on what you're trying to do, this can vary widely.
  47. 04:06And finally, the end user preference.
  48. 04:08All of this is driven by what the end user really wants out of your application.
  49. 04:13So, I'm going to welcome Tyler on to stage so that he can actually show you the inference light router live in action and show you how it can really help with all of these key aspects that I'm calling out here.
  50. 04:31Testing.
  51. 04:32All right.
  52. 04:32Thank you, Archa.
  53. 04:35Okay.
  54. 04:36So many builders have tried auto routing before, but the problem was that it feels like a black box.
  55. 04:44The router makes a choice and if that choice results in poor performance, you really have no way of improving it.
  56. 04:49We built ours differently at the architecture level, which is what you can see on the screen.
  57. 04:54A request runs through our open proxy plan and our purpose-built routing model.
  58. 04:59Both open source.
  59. 05:01There is no vendor lockin, which is a key digital ocean value.
  60. 05:06You describe what matters for your workload, costs, latency, quality, preferred models or hard rules.
  61. 05:15Then the router uses that context to pick the right model per request.
  62. 05:20Because the routing model is specialized for this job, it's super fast, under 200 milliseconds, and it costs customers nothing extra.
  63. 05:27In our evaluations, it actually has beating frontier models like the GBT 5 series models at routing task itself with a fraction of the latency.
  64. 05:37So the difference is simple.
  65. 05:39This is routing you can customize, evaluate and improve without vendor lock in.
  66. 05:48So you bring your preferences and we honor them.
  67. 05:51You describe a task in natural language and set what matters, cost, latency, and task description.
  68. 05:57You bring your rules and we execute them intelligently.
  69. 06:01Layer decision tree rules on top.
  70. 06:03Start from presets, change anything you want in a single line of code.
  71. 06:08And you validate with your own evaluations, not someone else's leaderboard.
  72. 06:11Route, evaluate, adjust, then feed that back in.
  73. 06:16That loop is key.
  74. 06:20Okay, we're going to switch gears here.
  75. 06:21We're going to do a live demo.
  76. 06:25Bear with me here.
  77. 06:29All right, I'm going to show you a couple things.
  78. 06:31First, I'll show you router configuration in the UI, how to use it, and then how you can use evaluations to measure and improve your router's performance.
  79. 06:39And then I'll show you a real router that I created inside a coding agent workflow.
  80. 06:45So I'm here in the cloud console, the digital ocean cloud console and you can see my routers.
  81. 06:50We have several presets.
  82. 06:51You can see software engineering, general writing, knowledge bases and document intelligence.
  83. 06:56In this case, I've actually created my own.
  84. 06:58So I I customized our preset software engineering.
  85. 07:01Uh if we click into this, we can see that I have sever several different tasks here.
  86. 07:06I have bug fixing, code generation, test writing, and a few others.
  87. 07:11This also shows that you can specify more than one model per task in the bug fixing case and code generation case.
  88. 07:18Um, in the code generation, I have GLM 5.2 and GPT 5.2. And because I really want to always route to GLM 5.2 unless it's down, I use this manual ranking option.
  89. 07:28So, it'll always go to GLM 5.2. If GLM fails, it'll fail over to GPD 5.2. In the bug fixing one, you can see a little bit of a different one.
  90. 07:37In this case, I have selection policy fastest.
  91. 07:41So out of this model pool, if it matches to bug fixing, it'll pick whichever one's been fastest in about the last 30 minutes.
  92. 07:48Okay, let's do this in action a little bit.
  93. 07:50Here's our playground where I'll show a couple of examples side by side.
  94. 07:54First, I'll start with just a simple prompt.
  95. 07:56Write a basic Fibonacci function.
  96. 08:01And as this runs, we can see on the left we're writing to Opus.
  97. 08:05On the right, we're using our software engineering router that I just showed you.
  98. 08:08And you're going to see that it picks different models on the right.
  99. 08:11So in this case, it matched to the code snippets task and just used the long before Maverick model that I had configured for that one.
  100. 08:17And if we scroll down, I mean this is this is obvious, right?
  101. 08:20But this model is extremely fast and extremely cheap compared to Opus.
  102. 08:27Now let's say optimize my function and we'll see the same thing happen.
  103. 08:32In this case, it matched the code performance optimization task using GBT 5.2. And again, it's obviously significantly faster.
  104. 08:39If we scroll down here, we can also see that it's significantly cheaper.
  105. 08:43We'll do one more.
  106. 08:44Write some unit tests.
  107. 08:50Okay.
  108. 08:50And in this case, it matched to Cloud 5 Summit on the test writing and code verification.
  109. 08:56And again, we're going to see faster and cheaper.
  110. 08:58So, it's a pattern.
  111. 08:59It matches my, you know, vibe check, right?
  112. 09:02It's still vibes, though.
  113. 09:03How you actually prove it is working it through evaluations.
  114. 09:07So, I have an evaluation that I ran here, comparing Opus on the left or actually on the right hand side to my router on the left hand side.
  115. 09:17You can see that the scores 90% for my router, 95% correctness for Opus are very very close.
  116. 09:23In fact, that's pretty much within a judge uh margin of error.
  117. 09:29But what what's really interesting is if we scroll down here, we can see that the router knew significantly less tokens and was significantly faster than Opus.
  118. 09:41Okay, let's jump into a real workflow here.
  119. 09:44This is where the inference router really becomes impactful.
  120. 09:47Here I have two terminals running open code.
  121. 09:50On the left I have a single model approach using quad opus.
  122. 09:53So I have opus set up or open code set up with opus.
  123. 09:56On the right, I've configured open code to send requests to our software engineering router that I just showed you configured.
  124. 10:03Um, below I kind of have this customuilt open code where you'll be able to see live uh, observability essentially.
  125. 10:09So, let's go ahead and get these started.
  126. 10:11It's just a simple feature request pre-loaded into here.
  127. 10:14Build me a spinning wheel app.
  128. 10:16I'll run the same prompt in both.
  129. 10:18And as this runs, we can focus on the bottom panel.
  130. 10:20So, it'll start to show up here.
  131. 10:22Hopefully, we can see that on the screen.
  132. 10:24uh you'll be able to see token usage in real time, which models are being selected, what tasks those map to, and the cost accumulating live.
  133. 10:32So on the right, we can already see that we're starting to route to GLM 5.2 because our requests are starting to match the code generation.
  134. 10:40And on the left, of course, we're just routing to quadopus.
  135. 10:42I think open code sometimes routes to to haiku by itself.
  136. 10:45So that's what you see there.
  137. 10:47And we'll notice latency, too.
  138. 10:49How quickly things start to come back.
  139. 10:51In this case, it wants me to create a temporary directory.
  140. 10:58So the key difference here is that on the left we'll see every single request that I write goes to the same premium model.
  141. 11:04Cost and latency is going to stay high for pretty much every single task.
  142. 11:07On the right the router is selecting models based on the task.
  143. 11:13[snorts]
  144. 11:13So we're optimizing both cost and speed.
  145. 11:16And we can see that our software engineering router already finished.
  146. 11:19And if we look here, it actually matched to two models throughout.
  147. 11:22So, let's go and open this up and see how it looks.
  148. 11:25Okay, this actually looks really solid to me in Opus 4.7 finish at a similar time.
  149. 11:30Let's take a look at that.
  150. 11:32We can compare them.
  151. 11:33I mean, it's this is a vibe check, right?
  152. 11:34But honestly, I would say the software engineering router did better because this is an interesting approach that you I'm not even sure it works too well.
  153. 11:41So, in this case, the router did a little bit better.
  154. 11:45So now that step is done, you know, we get similar outputs, but if we look here, the software engineering router has only spent 8 cents on the session while Opus directly has spent 25 cents.
  155. 11:56So we have a about a 3x in cost and very very similar quality so far.
  156. 12:03Let's try another another prompt here.
  157. 12:05What what comes next in a software engineering life cycle?
  158. 12:07Probably write some unit test, right?
  159. 12:12So we'll write this in both start up this first.
  160. 12:17[clears throat] On the right we have the router again.
  161. 12:20And we can see that it got matched to the test writing and code verification which picked the claude 5 sonnet model because that's what I configured earlier.
  162. 12:29And we'll see the same pattern.
  163. 12:30It's going to be significantly cheaper overall across the entire session than going straight to opus.
  164. 12:37So we'll let this finish here.
  165. 12:42Okay.
  166. 12:43And that finished.
  167. 12:44Let's just queue up one more, write some documentation in a readme, and then we'll compare the total session cost.
  168. 13:03Okay.
  169. 13:03And as this runs, we'll wait and see what it does.
  170. 13:09Okay, it created the read me and if we look here, we can see that the total session cost for the router was 14 while the total session cost for Opus was 44.
  171. 13:20So at this point, we can see the cost is significantly lower.
  172. 13:24Latency is optimized per step and the quality remains pretty similar across.
  173. 13:29So you can see as you scale this, the cost performance really add up.
  174. 13:35Okay, Archa, back to you.
  175. 13:41[applause]
  176. 13:44Thank you so much, Tyler.
  177. 13:46And that that was actually a live demo that we ran here.
  178. 13:49So, thanks to Tyler for setting it up and taking us through that.
  179. 13:53So, now that you've seen it work, let's look at some quick facts.
  180. 13:58Routing decision and under 200 milliseconds per request.
  181. 14:03It runs on a custom mixture of experts model purpose-built for routing.
  182. 14:08Zero application code changes needed from you to get it to adopt and it's free and included so you do not have to roll out your own router.
  183. 14:16And we open source the whole routing model via Plano.
  184. 14:19So you can actually check how that looks as well.
  185. 14:24The last thing I wanted to talk about was a bit about um routing is the foundation layer.
  186. 14:29It's not really the destination.
  187. 14:31And there are three things that we usually build on top of it.
  188. 14:34The first one is eval to prove that the right model works with your use case and your test well.
  189. 14:41Caching so that you can stop paying twice or more for the same answer each time.
  190. 14:47And personalization so that the router learns what works for your team over time.
  191. 14:53This is a continuous improvement loop maturing over time.
  192. 14:56That means that the more you route and evaluate, the better the router does for your workload.
  193. 15:04So to summarize, where does this leave you?
  194. 15:07There is no single best model.
  195. 15:09There's only the right model for the request and benchmarks will only tell you part of the story.
  196. 15:15Your preferences will tell you the rest.
  197. 15:17And we built the router to honor your preferences and stay open so that you're never locked into a single stack.
  198. 15:24And that's how teams actually built.
  199. 15:27We are digital ocean and AI native cloud.
  200. 15:30Come find us at the booth and route your next workload with us.
  201. 15:33Thank you so much for being here.
  202. 15:36[applause]
  203. 15:50[music]