Using OrcaRouter with Helix via lsp-ai and aichat #15818
Unanswered
zhenjunchen-png
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Sharing a setup in case it is useful to others: how to use OrcaRouter with Helix.
OrcaRouter is an OpenAI-compatible LLM gateway: one
API key and endpoint give you access to models from many providers, plus an
adaptive router (
orcarouter/auto) that picks the best upstream per request.Helix has no built-in LLM support by design, and the recommended paths are LLM
language servers and CLI tooling. OrcaRouter plugs into both: an AI language
server (lsp-ai) for in-editor completion, and a CLI in a pipe (aichat) for
transforming selections. Both work with zero changes to Helix itself.
Get an API key
Sign up at https://www.orcarouter.ai
Create a key in the console: https://www.orcarouter.ai/console (keys start with
sk-orca-)Export it so the tools below can read it:
export ORCAROUTER_API_KEY=sk-orca-xxxxxxxxxxxxFull model catalog: https://www.orcarouter.ai/models
Option A: In-editor completion via lsp-ai
lsp-ai is an OpenAI-compatible AI
language server. Point it at OrcaRouter and Helix gets AI completions through the
normal LSP completion menu. Add this to
~/.config/helix/languages.toml(keepyour existing language servers and add
lsp-aialongside them):Restart Helix and edit a Python file. Completions are served by OrcaRouter.
Notes:
<CURSOR>technique, sono
/v1/completionsFIM endpoint is needed.temperature. Reasoningmodels (
anthropic/claude-opus-4.8, thegpt-5family,deepseek-reasoner,...) reject
temperaturewith a 400, andorcarouter/automay route to one.A fast non-reasoning model such as
openai/gpt-4.1-miniacceptstemperatureand suits low-latency inline completion.
Option B: Transform selections via aichat (Unix pipe)
aichat is an LLM CLI. With Helix's
|command (pipe the selection through a shell command and replace it with the
output) you get inline rewrite/explain/fix without any language server.
Save this as
~/.config/aichat/config.yaml. aichat reads the API key from theenvironment variable named after the client (
ORCAROUTER_API_KEY), so do not putthe key in this file:
Add a role that returns only code (aichat 0.30+ loads roles from files). Save
this as
~/.config/aichat/roles/code.md:In Helix: select code, press
|, and run:The selection is sent to OrcaRouter and replaced with the result. You can also
keep an interactive
aichatsession open in a split terminal.Verify your key and endpoint
Limitations
extensions such as
extra_bodyrouting preferences and attribution headersare not exposed by lsp-ai or aichat today;
orcarouter/autorouting stillworks because it is selected by model name.
is still under development and not part of a stable release.
All reactions