Launch HN: Tokenless (YC S26) – Automatic model switching to save money
Posted by rohaga 5 days ago
Hi HN, Rohit here from Tokenless (https://usetokenless.com/), which I’m building alongside co-founders Andrew and Kev. We’re building an API gateway which routes agent traffic dynamically turn-by-turn between different models to save on AI spend.
The cost of AI tokens is top-of-mind for many. Companies like Uber and Salesforce have been complaining about blowing their yearly AI spend faster than expected.
Frontier models are amazing for dev work, but are so expensive. Open-source models are cheap and rapidly improving, closing the gap with frontier models, but aren’t quite there yet.
Tokenless gets you the best of both worlds–routing harder turns to smarter models only when needed, which keeps costs low.
Before Tokenless, I was doing a PhD at Princeton. While using coding/other agents, I constantly agonized over model choice, to make sure my AI spend was going as far as possible on my academic Cursor account.
At the same time, I was doing LLM research, and a small technique I developed while in recovery from NeurIPS submission season seemed to hit SOTA pretty fast. I was surprised that such simple ideas could do routing well.
We’ve been able to develop a version of the router that matches the performance of Claude Fable 5 at half the cost. The blog post on our website explores the technical details on how we did this (https://usetokenless.com/blog/building-tokenless/).
Highlights: - Our approach queries multiple models at once and uses their progress to make decisions (this technique is novel AFAIK, let us know if you know anyone else doing this). - Switching models doesn’t destroy the cache if the routing algorithm is aware of when the cache is hot/cold.
To come: - Adding Kimi K3, all other GPT efforts and more to the router
Go ahead and sign up on usetokenless.com and try using Tokenless with your agent, you’ll get $20 of free credit. Here’s a demo on how to use it: https://youtu.be/sjZWriclcls
Tokenless provides frontier-level intelligence for cheaper, so we’d love some feedback on how it feels to use, any corner cases that the router routes incorrectly, and whether you find the routing problem interesting!
Comments
Comment by mediaman 5 days ago
But user->AI calls are very much the rare case now, the more agentic the workload. Most of them will be tool->result->tool without the user involved. And token burn is highest with these long running agentic chains, but that's precisely where routing doesn't work because of the KV cache.
How do you deal with that?
Comment by rohaga 5 days ago
Not exactly. It can also make sense if the cache is hot to switch models. For example, we might currently be on Deepseek and the next task is SO HARD that it doesn't make sense to not use frontier (1 turn to crack versus 100 turns for Deepseek to crack). Likewise, the router may judge that it's likely that the next few set of tool-calls will be ridiculously easy, and so switching to Deepseek will save over time.
Remember that Deepseek can be something like 30x cheaper even cold.
There is a more fine-grained view of caching here, because each model can have a different amount of the prefix already cached as well (since we were switching a bunch) so even if the cache is somewhat warm it may make sense to switch.
Comment by brandall10 5 days ago
I can really only see the utility of things like spawning subagents to a lower tier model from another provider, and that's something harnesses can already handle (ie. give model specs for certain delegation roles).
Comment by benjiro29 4 days ago
Some agents when you alter the reasoning level, partially or complete wipe the cache. Never assume that changing reasoning is a no-impact change. I do not have the link but a French youtuber did a ton of research on this.
Comment by ValentineC 4 days ago
https://platform.claude.com/docs/en/build-with-claude/effort...
Comment by rohaga 5 days ago
Comment by verdverm 5 days ago
Comment by brandall10 5 days ago
Comment by ignoramous 5 days ago
How does tokenless quantify "so hard"?
> 1 turn to crack versus 100 turns for Deepseek to crack
Interesting definition for a "frontier". What is a "turn" here? Token count? Request count? Context-based?
I've found that MiniMax M3 (a smaller model at 295b) will code up better when DeepSeek v4 Pro (1.6t) will not (and vice versa).
Comment by rohaga 5 days ago
A turn here is a tool call/user input, anything that causes the model to get some new input. We're working on adding Minimax M3 and other models. We think that people have some intuitions about which models are good when--we seek to quantify them scientifically.
Comment by CuriouslyC 4 days ago
Comment by gbalduzzi 4 days ago
Code exploration tends to burn a ton of tokens and do not require frontier knowledge. It then returns a compact overview of the findings to the better model, that can therefore perform its task with less tokens.
Anyone else has a similar approach?
Comment by sdesol 4 days ago
https://github.com/gitsense/chat/tree/update-readme
The README and latest version is still being worked on but I am hoping to have the latest release in place soon.
Comment by dahdum 4 days ago
Comment by judge2020 4 days ago
Comment by lowbloodsugar 4 days ago
Comment by KaseyKim 4 days ago
Comment by seizethecheese 4 days ago
I'm skeptical though. In order to pick which model is on the right trajectory, you actually need intelligence. But real intelligence would make your system painfully slow and more expensive. I suspect you're using a classifier of some sort, but I also suspect what it's really measuring is confidence.
Most likely, this is a fantastic approach for the kind of problem where there's uncertainty but only one correct solution. But this is going to be really bad for cases where there are many potential solutions, some of which look good but are in fact bad. You only show one benchmark, and I'm wondering if it happens to be nicely shaped for this kind of router. Have you run it on DeepSWE?
Comment by rohaga 4 days ago
Comment by seizethecheese 4 days ago
I did read the blog post and I’m not sure what you mean by your reply. I don’t think the blog post addresses my comment.
Comment by jartan2002 1 day ago
Comment by renezander030 4 days ago
Comment by siliconc0w 4 days ago
Comment by popPopBoom 5 days ago
One thing I'm curious about: how do you handle the latency hit from spinning up multiple models on the harder turns? Does the user-facing latency still feel competitive with just going straight to Claude, or is there a noticeable pause while the router decides?
Also, any plans to expose the routing decisions (or at least the model chosen per turn) so people can debug when it picks poorly? That seems useful for the feedback loop you're asking for.
Comment by rohaga 4 days ago
We are exposing the routing decision information already, scroll over the response in the Dashboard and it'll tell you what models it considered and what it chose.
Comment by JoshTriplett 5 days ago
By the time the model is "on track", it will have already received the input tokens. To a first approximation, input tokens are often the bulk of the cost for many queries, and this would increase the cost for such queries. It seems like it'd only decrease costs for prompts where you feed a relatively small amount of input into the model first and can tell whether the model is "on track" before it starts reading larger amounts of input data.
Comment by rohaga 5 days ago
We also think there are tons of people working on "context management"--e.g. retrieval systems, prompt compression, log compression, etc. We want to work harder on the "decode" side as we think there are lots of savings to be made
Comment by MikhailTal 5 days ago
τ³-Banking is the only one which you show better accuracy and cheaper. If i'm reading the blog results right, for deepswe and terminalbench, you are worse+cheaper than frontier, and better+more expensive than just small models. Which is exactly what i would expect even for a router that switches at random.
Speaking of random routing, this would be a great ablation study as well. What about also if you route each request to a tiny 7B model classifier? Why is your approach SOTA?
Comment by rohaga 5 days ago
We think the results are a work in progress. Routing is convincing for quality for the following reason. Take your favorite benchmark, and on each task, run both the top GPT and top Claude model, and call the task a success if at least one of them succeeds. You'll find the accuracy is SIGNIFICANTLY than just max{GPT, Claude}. And the more models you add the better the effect.
Hence, if we can make the router approach this "oracle," the quality could be really good (but also, with turn-by-turn routing, there's no reason we couldn't exceed the oracle)
We will likely do some ablations. Our approach was SOTA back when we first applied to YC with it, we just neglected to post it (we had only done stuff with tiny Qwen models at that point).
Comment by crazytweek 5 days ago
Sounds like DigitalOceans Model synthesis (https://www.digitalocean.com/blog/model-synthesis) or AilinOne (https://ailin.guide/) ?
Comment by random17 5 days ago
1. we trained custom models to predict LLM performance (this performs much better than asking LLMs directly to predict performance)
2. we cut off model responses early if they are not performing well, saving on costs versus running them to completion
3. finally we serve the unmodified output of the chosen model, instead of synthesizing the outputs into one, which makes us a model router
Comment by Barbing 5 days ago
via https://news.ycombinator.com/item?id=48980458 (incl. example chat) and just now found the developer’s explanation https://news.ycombinator.com/item?id=49028740:
aimed at improving performance without added latency but from a different angle. Instead of waiting for all replies for synthesis (like OpenRouter Fusion), it streams the "best" reply immediately (using a router to pick the best model) then synthesizes with emoji reactions and optional replies from the background models.Comment by sarjann 5 days ago
Comment by crazytweek 5 days ago
Comment by rush86999 4 days ago
I also developed something similar for my agent harness. It's based on model predictors and an exponential moving average:
https://github.com/rush86999/atom/blob/main/docs/architectur...
Comment by rvz 4 days ago
It is just another metoo copy of OpenRouter, but "Backed by Y Combinator™"
Comment by _superposition_ 3 days ago
Comment by simonebrunozzi 4 days ago
If memory serves well, I think none of them survived or had meaningful exits. I might be wrong. The main reason could be that this is a feature that gets commoditized really quickly.
Comment by tesr 3 days ago
Comment by RuiWang0811 5 days ago
Comment by rohaga 4 days ago
Comment by Mzzzzz 5 days ago
Comment by Avery29 4 days ago
Comment by binarydreams 4 days ago
Comment by _davide_ 1 day ago
Comment by grim_io 5 days ago
Comment by rohaga 5 days ago
That being said, whatever models we select to race at any point will ALL have their cache updated, so if they're chosen on the next race they'll be a lot cheaper.
Comment by grim_io 5 days ago
Most frontier Models won't show you their true reasoning, but only a summary.
There is also no reason you can automatically assume the quality and price of the outcome based on the first few reasoning trace summaries.
If you look at the recent model releases, it becomes clear that the trend is that the largest models provide the most cost-effective solutions, because of the massive turn/tool call/reasoning reduction needed to find the solution, compared to cheaper and smaller models.
Comment by rohaga 5 days ago
The largest models are very well known for having large reasoning traces. The thing that cracks down on overthinking is reasoning-effort training, which is largely a function of how the model is trained (certain RL objectives/teachers) rather than size of the model. The Kimi K3 technical report has some excellent work on this: https://arxiv.org/pdf/2607.
Comment by maxignol 5 days ago
Comment by rohaga 5 days ago
Comment by pranshuchittora 5 days ago
Comment by sarjann 5 days ago
What use case are you imagining where cache eviction would happen during it? It might also be the case that a task might seem easy but then it ends up becoming hard for certain parts. For spawning subagents I could see this being useful maybe.
Comment by yiyingzhang 4 days ago
Comment by verdverm 5 days ago
Comment by aykutseker 5 days ago
Comment by alightsoul 4 days ago
Comment by myshapeprotocol 4 days ago
Comment by hmokiguess 4 days ago
I worry about overfitting and bias in the router algorithm. Sometimes temperature and or variance that doesn't align with a directive leads to a faster task resolution, which may seem higher cost but overall task cost ending up cheaper.
Comment by Topology1 5 days ago
Comment by effnorwood 4 days ago
Comment by ibuildproducts 4 days ago
Comment by _superposition_ 3 days ago
Comment by vancouvermatt 3 days ago
We ended up doing roughly the session-lock you're describing — pin a conversation to whichever provider is already warm, reconsider only on a cold prefix — and what surprised me is that eviction was rarely the thing that broke it.
Any request that changed the prefix at all did: a tool definition added mid-session, a system prompt carrying a timestamp, retrieval that reorders context. Those all still look like a warm session to the router and are a full re-price in practice.
So the lock ended up being less "stay until eviction" and more "stay until something upstream invalidates the prefix" — and most of our savings came from stopping our own code from invalidating it, not from the routing decision.
Comment by Ecko123 4 days ago
Comment by borhensaidi 4 days ago
Comment by TokenLat 4 days ago