AI Engineer World's Fair 2025
fun stories from building OpenRouter and where all this is going
About this talk
OpenRouter co-founder Alex Atallah recounts how the emergence of open-weight models and Stanford Alpaca challenged assumptions that AI inference would become a winner-take-all market. He traces the path from the Window AI browser extension to OpenRouter’s multi-provider model marketplace, then discusses provider fallback, inference plugins, MCP integration, improved model discovery, prompt observability, and reducing vendor lock-in.
Chapters
- 0:25Why AI inference might not be winner-take-all
- 2:38BLOOM, OPT, LLaMA, and the open-model breakthrough
- 4:29Stanford Alpaca and inexpensive instruction tuning
- 6:20Window AI, Plasmo, and founding OpenRouter
- 9:07Provider fallback and extensible inference plugins
- 18:09Model discovery, observability, and lower vendor lock-in
Talk transcript
- 0:00
[upbeat music]
- 0:25
All right. When I started OpenRouter at the beginning of 2023, I had one major question in mind. I was looking at this new market that was coming online and, and it was incredible.
- 0:38
Like, at the, the very end of, uh, 2022, we all saw ChatGPT, and I got bitten by the AI bug. Um, and I decided to look into answering this question: Will this market be winner take all?
- 0:52
Inference might be the largest market ever in software, and this seemed like a critical thing that everybody was assuming the answer to, the answer to it would be yes.
- 1:02
Um, OpenAI was just far and away the leading model. There were a few others that were coming up on its tail, and I, I built a couple prototypes to look into what they could be g- used for, and also wanted to investigate open source.
- 1:19
So in this talk, which Swix named, um, I'm gonna talk about the founding story of OpenRouter and, uh, and go through a little bit of the hoops that we jumped through and sort of the investigation that we did as we, we put together this product that started as an experiment and kind of evolved into a marketplace over
- 1:39
time. In January, we saw the first signs of people wanting other types of models, and the, the first evidence was moderation.
- 1:55
This, this was like a very clear interest from users in looking for models where they could understand why, whether they'd be deplatformed or what the, the moderation policy of the company was.
- 2:07
And, and we saw some people, like, generating novels where, like, it would be a detective story and in chapter four, um, the detective would find someone who, like, commits a murder and shoots the victim.
- 2:20
And, and OpenAI at the time sometimes refused to generate that output, or it was, like, questionably against the terms of service. And of course, we saw role play and a, and basically a big gray area emerge around what models were willing to generate.
- 2:38
So, uh, in, in the next month, we saw the open source race begin. And that... Uh, I'm gonna do a little bit of an OG test here. Uh, raise your hand if you ever used BLOOM 176B.
- 2:56
There's like... Ah, there's like 10 hands raised. Um, or OPT by Facebook. This was like one of the earliest open source language models. About five hands raised. Uh, there were a couple of these emerging, and there were some very interesting projects to help people access them.
- 3:13
And, uh, and, and early days, they weren't really useful for very much. So, uh, we kept digging and, uh, and eventually, like, the open source community, um, rou- like, ran into Meta's first launch, which was LLaMA 1 in, in February.
- 3:34
And LLaMA 1, in their abstract, advertised that it outperformed GPT-3 on most benchmarks, you can see the highlighted part here, which blew everyone away. This was huge. An open-weights model better than GPT-3.
- 3:50
And, uh, and especially a smaller model. This was the 13 billion parameter version, one that you could run on your laptop, um, outperforming a large server-only, only like, you know, tons of money required to run inference company's model.
- 4:07
It, and it was beating it on some benchmarks. Everyone lost their minds. And LLaMA kicked off a huge storm. It still was not very useful, I have to say.
- 4:18
It was like a text completion model for the most part, and it was very difficult to run locally. The infrastructure just wasn't there. Um, and people were struggling to figure out what to do with it.
- 4:29
Which is when we found, when we had the greatest moment of all, I think, for the birth of the long tail of language models, which was the first successful distillation in March of 2023: Alpaca.
- 4:45
Uh, a group at Stanford took LLaMA 1, generated a bunch of outputs on GPT-3, and fine-tuned LLaMA 1 on those outputs and created Alpaca for less than $600 in to- like, total.
- 4:59
And this was an incredible moment. It was the first time I saw the transference of both style and knowledge from a large model onto a small one. And this me- this was a huge unlock 'cause it meant that not only do you not need a $10 million training budget to create your own models, but you could also
- 5:19
for the first time make unique data available as a service in the form of a language model.
- 5:26
And I immediately began to wonder, like, well, w- what are... There's, there's gonna be tens of thousands of these, maybe hundreds of thousands. Um, and they seem incredibly important.
- 5:37
This is knowledge finally being distilled into software. Uh, there needs to be a place on the internet to discover these and understand what they do. 'Cause even this open-weights model was still closed in a way.
- 5:49
It's a black box. You get seven billion floating point numbers. You don't know what it's good at or what to do with it. Ve- uh, very few people used Alpaca.
- 5:58
Raise your hands if you used Alpaca.
- 6:02
I see about fif- maybe 12. So it's, like, only double the number of people who used the, like, almost unusable open source models on the previous slide. So OpenRouter initially started as a place to collect all these things.
- 6:20
Um, but before we got there, I wanted to check out people's willingness to bring their own model to generic websites. Like, what if the developer didn't even know which model a user wanted to use?
- 6:34
How would a user bring their choice of model to the software that they want?
- 6:40
And, uh, in April, I launched Window AI, which was a, an open source Chrome extension, uh, that let a user choose their model and let a web app just kind of suck it in.
- 6:54
And so you can see from the Chrome extension here, if you look really closely, um, this user is using Together's open source deployment of GPT-Next.
- 7:07
I can't, I can't read it from the- here. But, like, an open source model that, um, swaps out OpenAI directly inside the webpage.
- 7:17
So the next month, OpenRouter launched. And, uh, I, uh, co-founded it with the founder of the framework that, that Window AI was built on, Plasmo, um, Lewis. And we started OpenRouter as first a place to collect all the models in one spot and f- and help people figure out what to do with them.
- 7:39
And it eventually grew into a place that gives you the, like, better prices, better uptime, no subscription, and, uh, and the most choice for figuring out which intelligence your so- your, uh, software should run.
- 7:55
So let's talk a little bit about what it is, 'cause not everyone here might be familiar with it. Um, we, we have been growing ten to 100% month over month for the last two years.
- 8:09
It is an API that lets you access all language models and, uh, and it, it's also become kind of the go-to place for data about who's using which model, um, and how that is changing over time, which you can see on our public rankings page here.
- 8:26
It's a single API that you pay for once. You get near zero switching costs to go from model to model.
- 8:33
Uh, and we have about 400, over 400 models, over 60 active providers, and, uh, you can buy with lots of different payment methods, including crypto. And, and we basically do all the, the tricky work of normalizing tool calls and caching for you so that you get the best prices and the most features, uh, and you don't have
- 8:53
to worry about what the provider supports. Another story. Initially, OpenRouter was not a marketplace really. It was just kind of a collection of all the models and a way to explore data about who was using each one.
- 9:07
So how did we get here? Initially, when the first open source models emerged, uh, we only had, like, one or two providers for each one, and so we had, like, a primary provider and a fallback provider.
- 9:21
And i- initially that was it, and, and we didn't even name the providers. Um, but it became clear that there were going to be a bunch of companies that wanted to host these provi- these models and at very different prices and performances.
- 9:37
The, the number of features ballooned. Um, there were companies that supported the MinPe sampler and most didn't. There were some that supported caching, some that supported tool calling and structured outputs, and others that didn't.
- 9:49
And suddenly the ecosystem was just ballooning into this kind of out of control heterogeneous monster. And we wanted to tame the monster. So we aggregated all providers in one spot and at different price points it became a marketplace.
- 10:06
And you can see, like, this model, LLaMA 3.3 70B instruct, um, it has one of-- it, it's one of the models with the most providers on the platform. Um, and it has, like, 23.
- 10:20
Um, closed source models also had something interesting happen to them, which is that they just-- they couldn't keep up with the demand. And, uh, and, and so we helped developers basically get uptime boosting, and you can see, like, the delta, uh, and how much we can boost uptime just by aggregating lots of different providers for a model.
- 10:41
And this became really helpful for people using open sour- or closed source. And we became a marketplace for both, um, showing graphs about latency and throughput and helping people figure out using real world data what the latency and throughput is on each model.
- 10:57
Um, and that's how OpenRouter became a marketplace and an-- uh, one optimized for language models, which I thought would be proper for, for inference, po- potentially the biggest market in software.
- 11:11
Uh, you can-- obviously a couple other things that we support, comparing models w- using your own prompts with the ease of just texting an iMessage, um, fine grain privacy controls with API level overrides, the ability to see, like, your usage of all models in one place and have great observability.
- 11:30
And back to the original question here of whether will intelligence be winner take all. Uh, I, I-- we've come to the most likely bet that that is not the case.
- 11:42
Um, here's our data broken down by model author, um, how much-- how many tokens have been processed by each one. And you can see Google Gemini started pretty low, like roughly two, 3% in June of last year, and just has grown to 34, 35%, uh, pretty steadily over the last 12
- 12:06
months. Um, oh, uh, Anthropic, uh, is, is like one of the most popular models on our platform. OpenAI is a little bit underrepresented in this data, um, because a lot of developers use us to get OpenAI-like behavior for all of their models.
- 12:22
But OpenAI has, has grown a lot here as well.
- 12:27
So here's what we believe about the market after all of the, you know, backstory that I just gave you. Um, the future's gonna be multi-model. Ton-- all of our customers, tons of customers use different models for different purposes and realize they can unlock huge gains by doing so.
- 12:46
Inference is also a commodity. Claude from Bedrock, we wanna make look exactly the same as Claude from Vertex. And we do that because, like, the two hyperscalers have fundamentally, uh, you know, the same commodity being delivered at different rates, different performances, and for a developer, you just wanna be able to, like, select that without worrying about who's
- 13:09
serving it. Um, we think inference will be, like, a dominant operating expense, and selecting and routing will be crucial. Um, you can see the number of active models on OpenRouter has just steadily grown.
- 13:23
It's not the case that people just hop from model to model. Like, it tends to be sticky, and, uh, and we tr- what's-- we're trying to just make this wild ecosystem a lot more homogeneous and easier to work with as a developer.
- 13:40
Um, to honor Swyx's title for this presentation, uh,
- 13:46
let's give a technical story, um, something that we've worked on in the process of building the company, and that was our own idea for how to do an MCP within OpenRouter.
- 13:59
So we don't have MCPs. We don't have an MCP marketplace. Um, but we did run into the need to expand inference with new features and new abilities. For example, searching the web for all models, PDF parsing for all models, um, you know, other interesting things coming soon.
- 14:22
And what we really wanted to do was give these abilities to all models, but that involves not just the pre-flight work that MCPs do today, where you can kind of get in-- you know, like call another API, get a bunch of behaviors, and then have the inference process access those behaviors as it goes.
- 14:42
We also need the ability to transform the outputs on the way to the user. And so what we really, really needed was something more like middleware. Middleware, um, is kind of a common concept in web development.
- 14:57
You set up middleware when you're setting up authentication, for example, or, or, or caching for a web app. And so we came up with a type of middleware that's sort of-- that's AI native and optimized for inference, um, and that looks not totally dissimilar from the way middleware looks in, in Next.js or, or web development.
- 15:18
You know, so pardon the code on the screen, but this is a little bit about how our pl- our plug-in system looks, and it, you know, it can call MCPs from inside a plug-in.
- 15:27
But importantly, it can also augment the results on the way back to the user. So here's an example of our web search plug-in, which augments every language model with the ability to search the web.
- 15:40
Um, every language model can just kinda tap into this plug-in and get web annotations as results are being fed back to users in real time, and this all happens in a stream.
- 15:53
See? There's no kind of like, you know, requirement that you get all of the tokens at once. It can just happen in-- live in the stream.
- 16:02
We got-- We solved a bunch of other tricky problems, uh, while building OpenRouter. We, we really wanted to get extremely low latency, um, and we got it down to about thirty milliseconds, uh, the best in the industry, I believe, um, using a lot of custom cache work, and we, we also need to make streams cancelable.
- 16:23
All these different providers have completely different stream cancellation policies. Sometimes if you just drop a stream, the, the, the, the inference provider will bill you for the entire thing.
- 16:35
Sometimes it won't. Sometimes it'll bill you for the next twenty tokens that you never got. And, um, we ki- we, we work a lot to try to figure out these edge cases and understand when developers are going to care about them, too.
- 16:50
And standardizing all these providers and models, uh, became, like, a big tricky architecture problem that we spent a while working on. So here's where all this is going. Uh, we're gonna add more modalities to OpenRouter, and I think this is, like, a big change in the industry as well.
- 17:06
We're gonna start seeing LLMs generate images. We already have, uh, a few examples on the market, but tr-- like, some people call it transfusion models, a transformer mixed with stable diffusion.
- 17:20
Um, these are gonna give images way more world knowledge and the ability to have a conversation with the image, which we think is just critical for growing that industry and making it really work.
- 17:31
Imagine... I just ran into somebody today who is using a transfusion model, uh, or who told me about their customer using a transfusion model to generate menus. Imagine doing that, like, a whole menu, like, in a delivery app generated by a transfusion model.
- 17:48
Um, it's going to be really exciting and, and a big deal in the coming year.
- 17:54
We're also gonna work on much more powerful routing. Like, routing is our bread and butter. And so doing geographical routing right now, we-- it's pretty minimal, but routing people to the right GPU in the right place and doing enterprise-level optimization's coming.
- 18:09
Um, better prompt observability, better discovery of models, like really fine-grained categorization. You know, imagine being able to see, like, the best models that take Japanese and, and create Python code.
- 18:21
And of course, even better prices coming soon. So, you know, we, we believe in, in collaboration, um, and, and building an ecosystem that's durable and with low vendor lock-in.
- 18:34
So, you know, collaborate with us. Um, here's our email, and if you're interested, join us too. [outro music]