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!
mediaman4 hours ago
So this only switches models if the cache is cold, because otherwise the economics of switching don't work. But most agentic work involves long strings of successive tool calls that benefit from a hot cache. Hot cache calls reduce input cost by 90%. This can basically only deliver cost savings in turns where the AI delivers a result to the user, the user waits at least 5 minutes (or the length of the cache), and then responds.
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?
rohagaop4 hours ago
> So this only switches models if the cache is cold
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.
brandall102 hours ago
Seems like it might be more advantageous to just adjust reasoning effort to retain cache. Maybe in some exceptional cases where there will be a ton more inference to solve the problem, but going significantly dumber in that case seems counterintuitive.
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).
rohagaopan hour ago
I agree that adjusting the reasoning effort to retain cache is a huge thing! But even doing that automatically is currently a challenge for people to figure out and do well, and costs mental energy when perhaps it doesn't need to. For example, there is GPT-5.6-Sol low, med, high, xhigh, max, and lots of "rules of thumb" that people develop on which one to use when.
verdverm2 hours ago
caching is per model, it does not transfer between them
brandall102 hours ago
Updated to clarify reasoning effort.
ignoramous3 hours ago
> the next task is SO HARD that it doesn't make sense to not use frontier
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).
rohagaop3 hours ago
Highly encourage you to read the blog post (https://usetokenless.com/blog/building-tokenless). Essentially, we estimate the confidence of a specific model failing or succeeding on a specific task using our own foundation models.
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.
seizethecheesean hour ago
Super interesting approach. It's probably novel. I can say this because I've been working on something similar (while building a code version of http://pellmell.ai).
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?
rohagaopan hour ago
We have run it on DeepSWE, check out our blog post for details of how we leverage the intelligence of the smart models https://usetokenless.com/blog/building-tokenless/
seizethecheesean hour ago
Ah I didn’t see the tabs in the benchmark chart. Performance is worse on the two coding benchmarks and cheaper which makes sense.
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.
popPopBoom3 hours ago
Interesting approach. The multi-model progress monitoring idea is clever, most routing I've seen is either static rules or a cheap classifier that picks once upfront. Querying in parallel and deciding mid-turn feels different.
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.
rohagaopan hour ago
Since we fan out in parallel, by definition the latency is only at worst the latency of the slowest model. The model in between is fairly light, so it seems to not materially affect things. Deciding mid-turn also lets us resolve earlier, often saving on the latency question. We hope to publish a detailed study about this soon.
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.
JoshTriplett3 hours ago
> Tokenless fans out your request to a group of models and watches them think. Once a model is clearly on track
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.
rohagaop3 hours ago
Well, you can estimate the confidence BEFORE you start the task, too. That way you can restrict your trajectory to just a few models.
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
MikhailTal3 hours ago
It's a smart approach, definitely interesting. It all hinges on quality of course which im not convinced.
τ³-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?
rohagaop3 hours ago
Thanks for the praise!
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).
[deleted]2 hours agocollapsed
crazytweek3 hours ago
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)
Sounds like DigitalOceans Model synthesis (https://www.digitalocean.com/blog/model-synthesis) or AilinOne (https://ailin.guide/) ?
random173 hours ago
These approaches, along with OpenRouter Fusion (https://openrouter.ai/blog/announcements/fusion-beats-fronti...) are different from ours in that:
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
Barbing3 hours ago
Can you tell if this site is doing two and three?
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.sarjann3 hours ago
Sounds like this would be expensive on the input token side with some saving on the decode side. For workloads with large documents / context that could be an issue.
crazytweek3 hours ago
AFAIK they solve this through their RAG based knowledgebases to only search and use the most relevant Information.
ricefan10703 hours ago
Does this mean you have to retrain routing rules every time a new model gets released? I imagine since the price/token (or rather the amount of work that can be done per token) does not monotonically increase with new models, that the routing logic has to change all the time
rohagaopan hour ago
Yeah this is a great observation--we have to collect some more data to understand new models as they come out. However, by having this composable architecture that separates "confidence prediction" and the actual "routing layer," this makes it a lot easier to add new models/restrict the models rather than re-training from scratch.
Mzzzzz2 hours ago
test
maxignol3 hours ago
Is the model picked through the router only for the first user turn or is there multi-turn routing (or planned to be added) ?
rohagaop3 hours ago
It automatically works with multi-turn routing. You can try it yourself in Claude Code or Codex
pranshuchittora3 hours ago
System Prompt Jailbreak (Playground) > You are a coding assistant powered by Tokenless, a router that dynamically picks the best LLM for each task. Help with programming questions, code review, debugging, and software design. Be concise and lead with concrete code or commands. Use fenced code blocks with the correct language tag.
grim_io4 hours ago
How can you be cheaper if you query multiple models at once, compared to me just using a single model, which will always have the correct caching configured?
rohagaop4 hours ago
If we cut off an unconfident/expensive model early in thinking, then we don't have to pay for additional thinking cost at all. For many tasks, this is quite a large saving.
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.
grim_io4 hours ago
Maybe I'm misunderstanding, but this seems to oversimplify the problem.
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.
rohagaop3 hours ago
Our research seems to indicate you can get a decent signal based on the first few reasoning trace summaries. We analyzed hundreds of billions of tokens to figure this out. Any open-weights model also gives you reasoning, which is very helpful (because they are usually lower-quality candidates you would want to cut off early)
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.
sarjann3 hours ago
If it only switches when cache is cold, it seems like it'd lock in one model for the whole session?
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.
aykutseker3 hours ago
Is Tokenless measuring cost per completed task, or just cost per request, including errors and retries?
Topology12 hours ago
what sets this apart from other routers?
verdverm2 hours ago
Model routing seems like a piece of the Ai stack that will quickly distill into industry if it is even that useful. I remain unconvinced that you need on the fly choice making beyond provider downtime. More likely you want to evaluate some and then settle on the model-agent-task pairings that work for you
borhensaidi43 minutes ago
[dead]