Hacker Newsnew | past | comments | ask | show | jobs | submit | confusus's commentslogin

Awesome! Any place I can follow the project?

Also, how to achieve these levels when switching mid conv? Don’t you effectively need to read the tokens per model switch?


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 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.


Really cool!! I'm messing with NixOS in VMs too.

One fun thing is that you can use them to let agents iterate, testrun and propose their own next versions. I guess you're even using NixOS to declare the surrounding infrastructure.


Sounds very cool! Is that protocol still around?


Really cool! I’d want something like this for Claude code or other terminal based tools. Basically when working on code sometimes I already interrupt and resume the same session in multiple terminals so I can explore different pathways at the same time without the parallel sessions polluting one another. Currently this is really clunky in Claude Code.

Anyway, great project! Cheers.


Thanks! I totally agree, we want to add CLI agent integration! I often use Gemini CLI (as it's free), and it's so frustrating not being able to easily explore different tangents.

Would you prefer a terminal Claude-Code style integration, or would browser based CLI integration work too?


Definitely terminal! Browser might work but honestly I would just not use it


Imo I’d prefer terminal for this as well. Ie; if I could keep context specific to a branch, or even within a branch switch contexts.


Thanks for the feedback. We will add in CLI integration soon!

Could you please explain what you mean by "within branch" context switches?

The way Twigg works is you can choose exactly what prompt/output pairs (we call them nodes) are sent to the model. You can move 'nodes' from one branch to another. For example, if you do a bug fix in one branch, you can add the corrected solution as context to another branch by moving the node, whilst ignoring the irrelevant context spent trying to fix the bug.

This way you can specify exactly what context is in each branch.


Sure, currently I’m performing a big refactor. As I do this, I find myself switching between refactoring perhaps 2-3 related (but still separate) components in my code. I find claude struggles to separate them if I’m working on one then need to switch tracks. Being able to contain the work on each part (all within the same git branch) but in separate contexts, may be helpful to prevent misinterpretation.


Great thanks. We are working on this.

Wondering why they necessarily have to be on the same git branch?

Take your refactoring example. Start with base branch ‘A’, then for each of the 3 related components, create a new git branch from branch ‘A’.

If we built this on the Twigg interface, would this be useful?


Are you looking for a job where you can work with web components and build PWAs? :)


I mean, I have a job, but I am always on the lookout :-)


Cool, gotcha. ;-)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: