HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
try-works
role-model
TypeScript2026–2026
try-works / role-model

role-model

role-model is a protocol for assigning the right model for the right job. Use local and cloud AI together, or route between several cloud providers.

2Distinct people
10Mentions
0Explicit recommenders
119GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

role-model is a protocol for assigning the right model for the right job. Use local and cloud AI together, or route between several cloud providers.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week10 dated mentions

Observed mentions: 2026-06-28 05:32:23 UTC to 2026-09-12 19:19:08 UTC. Weeks start Monday, UTC.

01232026-06-22 00:00:00 UTC to 2026-06-29 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 commentsJun 222026-06-29 00:00:00 UTC to 2026-07-06 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-07-06 00:00:00 UTC to 2026-07-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-07-13 00:00:00 UTC to 2026-07-20 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-07-20 00:00:00 UTC to 2026-07-27 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-07-27 00:00:00 UTC to 2026-08-03 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 272026-08-03 00:00:00 UTC to 2026-08-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-10 00:00:00 UTC to 2026-08-17 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-08-17 00:00:00 UTC to 2026-08-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-24 00:00:00 UTC to 2026-08-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-31 00:00:00 UTC to 2026-09-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-07 00:00:00 UTC to 2026-09-14 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsSep 7

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jun 222026-06-22 00:00:00 UTC2026-06-29 00:00:00 UTC312
Jun 292026-06-29 00:00:00 UTC2026-07-06 00:00:00 UTC202
Jul 62026-07-06 00:00:00 UTC2026-07-13 00:00:00 UTC000
Jul 132026-07-13 00:00:00 UTC2026-07-20 00:00:00 UTC101
Jul 202026-07-20 00:00:00 UTC2026-07-27 00:00:00 UTC101
Jul 272026-07-27 00:00:00 UTC2026-08-03 00:00:00 UTC101
Aug 32026-08-03 00:00:00 UTC2026-08-10 00:00:00 UTC000
Aug 102026-08-10 00:00:00 UTC2026-08-17 00:00:00 UTC101
Aug 172026-08-17 00:00:00 UTC2026-08-24 00:00:00 UTC000
Aug 242026-08-24 00:00:00 UTC2026-08-31 00:00:00 UTC000
Aug 312026-08-31 00:00:00 UTC2026-09-07 00:00:00 UTC000
Sep 72026-09-07 00:00:00 UTC2026-09-14 00:00:00 UTC110

What Hacker News says

10 sources
To keep it simple, forget about routers and imagine you're in Cursor using GPT for a while, reaching a cache of says 200k. You decide to switch to DeepSeek in the same session via the model picker, and continue as usual. What happens is that the cache for DeepSeek is created with the 200k + the incremental message. After this, cache can be kept warm for both models; two instances of the cache exists, one for GPT and one for DS. You switch back to GPT. The whole session is sent to the model with the 200k original from GPT and the incremental messages you sent to DS. The 200k is read from cache and the incrementals are new, and then added to the cache. Let's say every second message you switch between GPT and DS; cache was 200k and each incremental message is 1k. If you kept going with only GPT, cache hit rate would be 200k/(200k+1k) = 99.5
Read the rest
%. When you switch between two models with warm cache, hit rate instead becomes 200k/(200k+2k) = 99%. Model routers work the same way. Keep the cache warm, replicate it in two places. For this reason, when you set up your model pool for routing, you want to keep the model pool small and differentiated. First principles of model routing: https://try.works/first-principles-of-model-routing role-model router and protocol: https://github.com/try-works/role-model note: edited to keep the answer to the below message clearer
In Nvidia Nemotron 3.5 Lightning and NeMo Switchyard
the repo is here and you can also find my twitter in my profile: https://github.com/try-works/role-model you can also read this: https://try.works/first-principles-of-model-routing cache hit rate is kept high by 1) keep the number of models small, for coding there should only be two. 2) keeping cache warm for both models. the cache hit rate is only 0 the first time a model is used in a session. after that, cache is preserved. the losses are small, here is an example: you have a 200k cache. your message delta for each turn is an additional 1k tokens. you have two models and just for the thought exercise, lets say we route between them each request. 1k/200k means if you never switched models, you would always have a 99.5% cache hit. when you route between the two models each turn, now the message delta for each model per turn is 1k+1k. the
Read the rest
cache hit rate then becomes 2k/200k = 99% instead of 99.5%. is it worth it? depends on the models in your pool. If you have GPT 5.6 and DeepSeek, it's worth it because the cost difference is vast.
In The session you cannot take with you

Show HN: role-model, a router for hybrid local/cloud AI

Hey everyone, I'm launching role-model today: a routing protocol, a reference router runtime, and an extension for Pi that allows for better informed routing decisions. role-model is mostly deterministic, with fallback to a controller model, that routes requests based on a chosen routing strategy. the protocol is structured around assigning domains and roles to models, where requests sent by consumer applications like Pi have task types to enrich routing metadata and thereby accuracy. you can to run the built-in benchmark to compare performance of models across speed, quality and cost, as well as observed performance on real tasks. I have a diagram on how routing works in [0]. The runtime supports local models, either directly to your local endpoint (LM Studio, llama.cpp etc), or routing between multiple local models via vendored llama-sw
Read the rest
ap. Since there was another model router post yesterday where people discussed the basics of routing, I will focus on discussing some of the interesting learnings I've made building and testing this: 1. Model routing is essentially trying to predict the future: which model will perform optimally (based on criteria defined by the user) on this request? 2. After you have routed the request, you want to evaluate if it was the right decision or if some other model would have performed better 3. You also realize that having the router assess difficulty (among other things) to make decisions by itself is far from ideal - we'd prefer to have the consumer application work with the router to define what the request needs 4. You also realize that it becomes much easier, decisions become much accurate, and the outcomes of routing becomes more impactful when there is more of a distinction between models For point 2, I will be launching evals that you can run locally to benchmark models in your pool on the same requests. The outcomes here can then be used for point 1, as input when routing new requests. For point 3, I've built the pi-role-model package for Pi, which lets the Pi agent inject role_model.intent metadata including difficulty, preferred roles or even specfic model ids, required capabilities (say tool use or image input) and so on. You should be able to customized this further in Pi, and route in additional ways by changing metadata. This is why I've also built the role-model routing protocol. For point 4, what model routing really does as a second order effect is create a market for specialized models - models that may or may not be smaller, could be cheaper or more expensive, may be locally runnable. It makes little sense to route between two frontier models (GPT 5.5 and Opus 4.8); it makes more sense to route between models where one of the factors of quality, speed, cost is a multiple of the other candidate models, and it makes even more sense to have specialized domain models: code, prose, math and science, visuals and so on. It is at this stage model routing becomes really valuable. While role-model has a reference runtime that I'm continuously building out (there's lots to do to improve routing, as well as give users more granular control over routing decisions, and also ways to improve cross-model caching and also add techniques like FastContext), the ultimate goal of role-model is for there to be a standard protocol for inference requests that is used by consumer applications, so that the provider, be it a router middleware or an inference provider, will be able to route to a model that strikes the best balance between cost, speed and quality and also respects user choices, and even lets the user control these preferences to use local models for some tasks and allow cloud for others. Links: [0] role-model - the case for a model routing protocol: https://try.works/role-model-the-case-for-a-model-routing-pr... [1] GitHub: https://github.com/try-works/role-model [2] Docs: https://role-model.dev/
3 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.