frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Rayline routes Claude Code subagents to on-device and cheaper models

https://rayline.ai/
8•davidvgilmore•1h ago
Hi HN,

I’m one of the builders of Rayline.

Rayline is a Claude Code compatible LLM gateway. It intercepts and overrides claude code’s internal routing and lets you route subagent calls to different models instead. For example, you can run the main agent on Opus, some subagents on cloud-hosted open models, and other subagents on-device.

We’ve seen others implement routing for claude code as tools the agent can invoke. In our experience, that doesn’t work well because it requires the main agent to use tokens to think about + call the tools, and LLMs are generally a very inefficient way to make routing decisions. By implementing Rayline as a gateway, we let users deterministically configure routing decisions, and you can optionally use our ML model to make routing decisions.

We built it after noticing that Claude Code sessions contain a lot of subagent calls that don’t all need the same model. Other routers exist, but we built Rayline to let us continue using claude code (no separate harness), route tasks at a subagent level, and route across cloud and on-device. The main agent often benefits from Opus. But many delegated calls have narrow scope: search the repo, summarize context, inspect an error, poll for CI updates, etc.

The thing we’re exploring is subagent-level routing. The main cost lever in coding agents is usually cached vs non-cached input. Subagent delegations are a natural point to make routing decisions because you avoid busting cache. We look at the message-thread context for a delegated call and choose a model for that call. At a task level, Sonnet and Haiku are almost always less capability-per-dollar than open models, so the main advantage is better + (much) cheaper subagents (60-90% in our private beta).

The whole world seems to have started talking about model routing in the past two weeks, so apparently others agree it’s a relevant product area.

We’d love to get feedback from the HN community!

Comments

camomileandmilk•1h ago
Can you elaborate on this "Sonnet and Haiku are almost always less capability-per-dollar than open models"?
davidvgilmore•1h ago
Yes - in short, open models like Deepseek, Mimo, Kimi, and GLM tend to complete tasks with less tokens and cost less per token than both Sonnet and Haiku. So those models are more cost efficient, and we often think of that as them having higher "capability-per-dollar" than Sonnet or Haiku.

Much of Claude Code's internal model routing ends up delegating tasks to Sonnet or Haiku, so by intercepting those calls and using open models instead, we often see better performance at a better price.

camomileandmilk•43m ago
yeah, I get you now. but those are all Chinese hosted right? Don't think my company will enable us using them.
davidvgilmore•38m ago
Many of them are produced by Chinese labs. Some, like Neomotron, are U.S. made. And we support inference providers in both the U.S. and overseas.

If geography is important, we can restrict which geos inference takes place in. And if you don't want to use Chinese-trained models, you can use others like Mistral, Neomotron, Google's, or OpenAI's.

oypass•1h ago
How is this different from open router?
davidvgilmore
•
55m ago
Four ways: (1) We are built specifically for Claude Code model routing. (2) We route at a subagent/subtask level. (3) We support on-device routing. (4) We have a built-in ML router trained specifically to route Claude Code subagent tasks. Its use is optional.
oypass•41m ago
What is the benefits of on device routing? How do you decide if the task can be run on device?
davidvgilmore•37m ago
For those that have capable enough hardware, it's effectively free to run subtasks on-device. (just the marginal cost of additional electricity).

With Google's most recent 12b param Gemma model, even Mac users with just 16gb of unified memory can offload some tasks on-device.

Apple Core AI Framework

https://developer.apple.com/documentation/coreai/
2•hmokiguess•4m ago•0 comments

The Archetypes of Liberal Womanhood Under Empire

https://yohana444.substack.com/p/the-archetypes-of-liberal-womanhood
1•abaymado•6m ago•0 comments

The Economist Who Solved the Free-Rider Problem

https://developingeconomics.org/2025/06/24/the-economist-who-solved-the-free-rider-problem/
2•xeonmc•8m ago•0 comments

NFCore – NFC Tag Reader Writer

https://play.google.com/store/apps/details?id=com.echopersona.nfcore&hl=en_US
1•dimitriaces•8m ago•1 comments

Ask HN: Options for critical thinking and learning outside work?

1•hnthrow10282910•9m ago•0 comments

Reeed – a read-it-later app for iOS, built after Pocket shut down

https://www.reeed.io/
1•theiskaa•9m ago•0 comments

Experience using AI software to prove Euler sum results [pdf]

https://www.davidhbailey.com/dhbpapers/Chatbots.pdf
1•cpp_frog•9m ago•0 comments

The FatFIRE Subreddit Is the Internet's Best Sideshow

https://www.vanityfair.com/story/fatfire-reddit-early-retirement
1•littlexsparkee•10m ago•1 comments

Show HN: AST-guard – Fast, zero-cost structural checks for LLM code execution

https://github.com/Nick-is-building/ast-guard
1•thinking-nick•10m ago•0 comments

Mental Defrag

https://tracydurnell.com/2026/06/05/mental-defrag/
1•speckx•11m ago•0 comments

Instead of Taking Your Job, A.I. Might Transform It

https://www.newyorker.com/culture/open-questions/instead-of-taking-your-job-ai-might-transform-it
2•zdw•11m ago•0 comments

Why Isn't AI Taking Our Jobs?

https://calnewport.com/why-isnt-ai-taking-our-jobs/
3•zdw•11m ago•0 comments

Man jailed for a month despite Flock showing he was 5 miles from crime scene

https://arstechnica.com/tech-policy/2026/06/man-jailed-for-a-month-despite-flock-showing-he-was-5...
4•Cider9986•12m ago•0 comments

watchOS 27 drops support for Apple Watch Series 6/7/8/9 and Ultra 1

https://www.apple.com/os/watchos/
1•JoshGlazebrook•12m ago•1 comments

Show HN: Stop returning raw JSON from MCP servers, build rich inline UIs

https://medium.com/towards-artificial-intelligence/mcp-apps-build-interactive-apps-directly-insid...
1•muhammad-shafat•14m ago•0 comments

The Problem with Political Pearl-Clutching

https://www.playboy.com/read/sex/the-problem-with-political-pearl-clutching
1•bushwart•17m ago•0 comments

Show HN: AI Pair Programmer for Emacs

https://github.com/jaketothepast/codetutor
1•jakewindle47•17m ago•0 comments

Microsoft Hacked to Deliver Malware to Claude and Gemini Users

https://www.404media.co/microsoft-hacked-to-deliver-malware-to-claude-and-gemini-users/
3•guessmyname•17m ago•0 comments

Client-side PDF audiobook reader with AI voice

https://audiobook.vedgupta.in/
1•innovatorved•17m ago•0 comments

LLM Are Universal Simulators

https://invertedpassion.com/llm-are-universal-simulators/
1•speckx•18m ago•0 comments

Show HN: Wallie – Open-source AI streamer that watches and hears your screen

https://github.com/Alradyin/wallie-V2
1•Alrady•18m ago•0 comments

A Dumb Harness: Fundamentals of running coding agents on a loop

https://www.beontheloop.com/deck
1•shekharupadhaya•19m ago•0 comments

Could Switzerland Become the First Country to Cap Its Population?

https://www.newyorker.com/magazine/2026/06/15/could-switzerland-become-the-first-country-to-limit...
2•xnx•19m ago•0 comments

8 years in crypto: Etherean to Crypto Moderate

https://cstein.xyz/posts/2026/4/28/crypto_evolution_part1
1•cstein2•21m ago•0 comments

The Seven Habits That Lead to Happiness in Old Age (2022)

https://www.theatlantic.com/family/archive/2022/02/happiness-age-investment/622818/
1•zdw•21m ago•0 comments

Building Stuff I don't Want to

https://amxmln.com/blog/2026/building-stuff-i-don-t-want-to/
1•speckx•24m ago•0 comments

Ask HN: How do you handle "what did user X do yesterday" from customer support?

2•dezsirazvan•24m ago•1 comments

The Cattle Empire That Turned Out to Be a Giant Ponzi Scheme

https://www.wsj.com/finance/cattle-empire-ponzi-scheme-3d245791
2•bequanna•24m ago•0 comments

Sam Bankman-Fried applies for a pardon from Trump

https://techcrunch.com/2026/06/08/sam-bankman-fried-applies-for-a-pardon-from-trump/
22•pseudolus•25m ago•3 comments

Taleb's Turkey

https://peteweishaupt.medium.com/talebs-tu-e406eb8859a8
1•thunderbong•25m ago•0 comments