Rayline

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

Last verified:

Visit Rayline

What is Rayline?

Rayline is a Claude Code-compatible LLM gateway that routes agent workloads across frontier models, specialist models, and your Mac through one endpoint. It intercepts and overrides Claude Code's internal routing mechanism, allowing users to route subagent calls to different models instead of relying on Claude Code's default routing to Sonnet or Haiku.

The tool enables subagent-level routing where users can run the main agent on Opus while routing some subagents to cloud-hosted open models and others to on-device models. This approach works better than implementing routing as tools the agent invokes, since it avoids requiring the main agent to use tokens for thinking about and calling tools. Rayline lets users deterministically configure routing decisions and optionally uses an ML model to make routing decisions automatically.

Rayline is designed for developers and teams using Claude Code for coding agents who want to optimize costs and performance. The tool is particularly valuable for tasks like searching repos, summarizing context, inspecting errors, and polling for CI updates, where narrower scope calls don't need the same capability as the main agent. Users can achieve 60-90% cost savings on subagents compared to using Sonnet or Haiku.

Key capabilities include geographic restrictions for inference locations, filtering out Chinese-trained models if desired, and support for models from Mistral, Neomotron, Google, and OpenAI. Mac users with 16GB unified memory can offload tasks on-device using models like Google's 12B parameter Gemma.

Rayline pricing

Pricing model: Freemium

Pricing details not publicly disclosed on the website. The tool is currently available in private beta. Cost savings of 60-90% on subagents compared to Sonnet/Haiku were reported in private beta testing.

Rayline pros

  • Claude Code compatible without requiring separate harness
  • Intercepts and overrides Claude Code's internal routing automatically
  • Subagent-level routing for finer cost optimization
  • One endpoint accesses every model
  • Routes across frontier models, specialist models, and on-device Mac
  • Deterministic configurable routing decisions
  • Optional ML model for automatic routing decisions
  • 60-90% cost savings on subagents in private beta
  • Better capability-per-dollar than Sonnet and Haiku for subagents
  • Avoids cache busting during subagent delegations
  • Works with main agent on Opus while subagents use cheaper models
  • Geographic restrictions available for inference locations
  • Can filter out Chinese-trained models
  • Supports Mistral, Neomotron, Google, and OpenAI models
  • Mac users with 16GB RAM can run on-device with Gemma 12B
  • No tokens wasted on routing tool calls
  • Natural routing point at subagent delegations
  • Message-thread context analysis for model selection

Rayline cons

  • Currently in private beta only
  • Primarily designed for Claude Code users only
  • May not work well with other coding agents
  • Requires understanding of subagent routing concepts
  • Limited model selection documentation publicly available
  • No public pricing information disclosed
  • Geographic restrictions may limit model availability
  • On-device routing requires Mac with sufficient RAM

Frequently asked questions about Rayline

What is Rayline?

Rayline is a Claude Code-compatible LLM gateway that intercepts and overrides Claude Code's internal routing, letting you route subagent calls to different models. It provides one endpoint to access every model including frontier models, specialist models, and on-device models on your Mac.

How does Rayline differ from routing implemented as tools?

Routing as tools requires the main agent to use tokens to think about and call tools, which is inefficient for routing decisions. Rayline implements routing as a gateway, allowing deterministic configuration of routing decisions without consuming agent tokens for routing logic.

What cost savings does Rayline provide?

In private beta, Rayline achieved 60-90% cost savings on subagents compared to using Sonnet or Haiku. At a task level, Sonnet and Haiku are almost always less capability-per-dollar than open models.

How does Rayline make routing decisions?

Rayline looks at the message-thread context for a delegated call and chooses a model for that call. Users can deterministically configure routing decisions or optionally use Rayline's ML model to make routing decisions automatically.

Can I run the main agent on one model and subagents on different models?

Yes. For example, you can run the main agent on Opus while routing some subagents to cloud-hosted open models and other subagents to on-device models on your Mac.

Why is subagent-level routing important?

Claude Code sessions contain many subagent calls with narrow scope like searching repos, summarizing context, inspecting errors, or polling for CI updates. These don't all need the same model capability as the main agent, making subagent-level routing a natural point for cost optimization.

Does Rayline avoid cache busting?

Yes. Subagent delegations are a natural point to make routing decisions because they avoid busting cache, which is the main cost lever in coding agents (cached vs non-cached input).

Can I restrict where inference takes place geographically?

Yes. If geography is important, Rayline can restrict which geos inference takes place in.

Can I exclude Chinese-trained models?

Yes. If you don't want to use Chinese-trained models, you can use others like Mistral, Neomotron, Google's models, or OpenAI's models.

What Mac hardware is needed for on-device routing?

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

Categories

Use cases

Browse all AI tools on NeedAnAI