Skip to content

By PromptFission2 min read

pi-arc gives Pi one virtual model that picks local or cloud on each turn

Rayline's extension asks a small routing model which backend should answer each user message. The rules for when it does not ask are the interesting part.


pi-arc is an extension for the Pi coding agent that adds a single model to pick from, rayline/arc. Behind it, a routing model called ARC decides on each turn whether your own local model can handle the request or whether it should go to a cloud model. What we liked is how much of the README is about when not to route.

How it works

On a new user message, the extension sends the conversation, the system prompt, and the active tool schemas to Rayline’s routes API. The request lists the candidate models, says where each one runs, and prices every local model at zero. The policy is a prefer-local preset with min_p_pass set to 0.5: use the local model when ARC expects it to do the job and the conversation fits.

Then come the exceptions, laid out as a table in the README:

  • A tool follow-up stays on the same model with no lookup, which keeps the prompt cache.
  • A retry after an error stays put, unless the provider is overloaded, in which case ARC is asked again without that provider.
  • After compaction, ARC chooses again and is told the history was compacted.
  • If ARC is unreachable, slow, or rate limited, the turn stays on the last model and warns.
  • A bad key or an empty balance fails the turn outright.

The check for whether a conversation fits the local model’s context window uses no tokenizer. The API notes give it as the prompt’s size in bytes times 1.05, plus 512, plus a reply allowance. The README calls this an upper bound, so local models are handed off early instead of late. If the conversation contains an image, the estimate is not counted as a fit at all.

What it costs you

ARC reads the whole conversation on every lookup, lookups are billed per token read, and so routing costs more as a session grows. A lookup takes about one to two seconds by the README’s account.

The larger caveat is where the router lives. Every lookup goes to Rayline’s hosted API, so a turn that ends up on your local model has still sent its conversation off the machine first. Rayline’s separate vllm-arc plugin says the ARC weights are published on Hugging Face and that the encoders derive from Qwen3.5-0.8B. That same README warns that “end-to-end serving is not yet supported”: it can load the encoders and score with the first-stage head, but not the decision API. We could not open the Hugging Face page or Rayline’s technical report from our environment, so we are reporting no benchmark figures for ARC.

Try it yourself

The repo is MIT licensed and seven commits old, all dated 13 November. You need Pi 1.1.0 or later and a Rayline API key, plus any OpenAI-compatible local server if you want the local half:

pi install git:github.com/rayline-ai/pi-arc
export RAYLINE_API_KEY=rlk-...
pi --model rayline/arc

We have not installed or run pi-arc; this is based on the two READMEs and the API notes in the repo.

Spotted via @davidvgilmore on X.