Compatibility at a glance
Every tool here speaks the OpenAI Chat Completions dialect, which the gateway serves athttps://api.layerx1.com/v1/chat/completions. The only thing that
differs between tools is where you set the three values and whether the API base carries
the /v1 suffix.
Almost every tool wants the base URL to include
/v1 — it appends the method path
(/chat/completions) itself. Goose is the one exception on this page: its
OPENAI_HOST takes the bare origin and adds /v1/chat/completions for you. Claude Code
and Codex have their own pages — Claude Code,
Codex CLI, Cursor. Cursor CLI (agent), Antigravity
(agy), and Kiro CLI have no OpenAI-compatible hook — npx layerx1 setup --tool cursor-cli,antigravity,kiro prints that and a Hermes/Codex/Claude one-liner instead of
writing a fake config.Terminal agents
opencode
Add a provider toopencode.json (project root, or
~/.config/opencode/opencode.json for a global default). The
@ai-sdk/openai-compatible package handles the wire format; the model keys must match
catalog ids exactly.
opencode.json
opencode has had intermittent issues wiring custom OpenAI-compatible providers across
versions. After setup, confirm the values landed with
opencode debug config. If you hit
a 401 or a URL-parse error, move the URL to a top-level
"api": "https://api.layerx1.com/v1" field instead of options.baseURL, and/or register
the key via opencode auth login → “Other” → id layerx1.Crush
Charm’s Crush reads a project-localcrush.json. Register the provider as
openai-compat and point the top-level models block at it so it’s used by default:
crush.json (project root)
~/.config/crush/crush.json (on Windows, %USERPROFILE%\.config\crush\crush.json).
Goose
Block’s Goose uses the built-inopenai provider with a custom host. Set four variables
and start a session — or run goose configure → Configure Providers → openai and enter
the same values:
Goose is the exception to the
/v1 rule: OPENAI_HOST takes the bare origin
(https://api.layerx1.com, no /v1) — Goose appends /v1/chat/completions itself.Hermes Agent
provider: custom with an inline api_key. Bare custom still falls through to
OpenRouter on some agent-run paths, and secrets belong in ~/.hermes/.env.
~/.hermes/config.yaml
~/.hermes/.env
/v1 in api is required — Hermes does not add it. Swap default /
default_model to lx1-glm-5 for heavy coding, or any other catalog id.
Then run hermes. Switch later with hermes model or /model inside a session.
OpenClaw
OpenClaw registers custom providers in~/.openclaw/openclaw.json under
models.providers. Use api: "openai-completions" (the Responses variant is not yet
reliable for custom providers):
~/.openclaw/openclaw.json
layerx1/lx1-gpt-oss-120b as your agent model. Keep the provider key
(layerx1) and the model prefix in sync — a mismatch is the usual cause of a “no API key
found” error. The file is JSON5, so you can also paste this in the Config tab of the local
UI at http://127.0.0.1:18789.
Qwen Code
Qwen Code auto-loads a.qwen/.env file (project-level, or ~/.qwen/.env for a user-wide
default). Three variables:
.qwen/.env
--auth-type openai). Switch OPENAI_MODEL to lx1-glm-5 for heavy sessions.
OpenHands
In OpenHands, openSettings → LLM, click see advanced settings, toggle Advanced,
and fill in:
The
openai/ prefix on the model is required — it tells OpenHands’ routing layer to use
the Chat Completions client (our /v1/chat/completions surface), not a provider-native
one.Aider
Configure~/.aider.conf.yml with an openai/-prefixed model id and the gateway as the
API base (including /v1):
~/.aider.conf.yml
aider --model openai/lx1-glm-5 --openai-api-base https://api.layerx1.com/v1.
Editors & IDE extensions
Zed
Zed reads anopenai_compatible provider from settings.json (Command Palette →
zed: open settings):
settings.json
Don’t put the key in
settings.json. Zed reads it from the provider’s Settings UI or
from a LAYERX1_API_KEY environment variable (the provider id, upper-cased, plus
_API_KEY). The settings file lives at ~/.config/zed/settings.json on macOS and Linux,
and %APPDATA%\Zed\settings.json on Windows.Cline
Cline is configured in its GUI. In the model settings choose:- API Provider: OpenAI Compatible.
- Base URL:
https://api.layerx1.com/v1. - API key: your
lx1_key. - Model id: any catalog model, e.g.
lx1-glm-5for heavy coding orlx1-gpt-oss-120bfor speed.
Continue
Add amodels entry to ~/.continue/config.yaml using the OpenAI provider type pointed
at the gateway:
~/.continue/config.yaml
Kilo Code
Kilo Code is configured in its VS Code GUI:Settings → Providers → Custom provider. In
the dialog:
- Provider API: OpenAI Compatible.
- Base URL:
https://api.layerx1.com/v1. - API key: your
lx1_key. - Models: add
lx1-gpt-oss-120bandlx1-glm-5(manual entry is the guaranteed path; leave provider id lowercase).
Migrating from Roo Code? Roo Code was archived in May 2026 and its repo is read-only. If
you still run an existing install, the same OpenAI Compatible recipe applies (Base URL
https://api.layerx1.com/v1, your lx1_ key, a catalog model id). New setups should use
Cline or Kilo Code above.Anything OpenAI-compatible
The universal recipe, for tools not listed here:- Base URL:
https://api.layerx1.com/v1(append/v1unless the tool documents that it adds it — as Goose and Claude Code do). - API key: an
lx1_key, usually in the tool’s “OpenAI API key” field. The gateway accepts it as either anAuthorization: Bearerorx-api-keyheader, so whichever the client sends works. - Model: any id from the catalog — the tool does not need to know the list in
advance. Model ids are exact (
lx1-glm-5, notglm-5).
The
npx layerx1 CLI automates the common setups (Claude Code, Codex, Hermes, Aider,
Continue, Cline, Cursor, Windsurf) — see CLI. Cursor CLI, Antigravity (agy),
and Kiro CLI are recognized --tool ids too; they have no custom OpenAI hook, so
setup prints that limit instead of writing a config that would fail. For the tools
above, paste the config by hand if you are not using the installer.