We open-sourced a local gateway for Claude Code.
The goal is simple: keep the Claude Code experience you already know, but use it with the models you want.
With the open-source gateway, you can connect Claude Code to other models using your own provider keys, whether that’s directly with model providers, through something like OpenRouter, or with local models running on your machine.
This is the more configurable version of what Rayline managed gives you out of the box: smarter model selection while preserving the coding-agent workflow you already like.
Rayline managed handles routing + inference for you.
The open-source gateway gives you control and lets you bring your own model connections.
GitHub repo link in thread.
[Example video below: Claude Code running with hybrid cloud + on-device AI. The main agent runs Opus in the cloud and orchestrates an Explore subagent that Rayline Local routes to a model running fully on device (Qwen3.6-35B-A3B, Q4), seamlessly, in a single session.]
There's a spectrum of model routing complexity.
Optimally routing hierarchical agents (with nested subagent tasks) across cloud and on-device is highly complex.
But will that be valuable?
David's article suggests that yes, it will be.
Model routing for coding agents must happen at the subagent point of delegation.
Doing so is the highest point of leverage for quality-neutral cost efficiency, and it will become more important as frontier models become better managers of deep agent hierarchies.
It's implemented as an AI gateway, yes. Just a one-link change and you can run Claude Code as a multi-model, multi-provider agent harness
Introducing Rayline: a model router built specifically for Claude Code.
Claude Code's API rates are 8-10x its subscription rates.
Most of those tokens are going to easy subtasks.
Plug in Rayline, and subagents get routed to open source and on-device models instead of burning Opus-level spend on grunt work.
Quality holds. Costs drop 60-90%.
What makes Rayline different:
- Routes at the subagent/subtask level
- On-device routing via MLX (Qwen 3.6 and others)
- Built-in ML router trained for Claude Code tasks
- Cloud fallback when Anthropic has outages
- Works with OpenAI models inside Claude Code
You keep using Claude Code exactly as you do today. Rayline handles the routing underneath.
We're already routing billions of tokens per day for individual developers and publicly traded companies.
Public beta is live now. Try it at Rayline[.]ai



