Every other agent — exact config.
If a tool has an OpenAI-compatible setting, it runs on Layer X1: an API base pointed at the gateway, an lx1_ key, and an lx1 model id. Copy-paste config for a dozen popular agents below — terminal-first, then editors.
Compatibility at a glance
Every tool here speaks the OpenAI Chat Completions dialect, which the gateway serves at https://api.layerx1.in/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.
| Tool | Configured in | API base |
|---|---|---|
| opencode | opencode.json | https://api.layerx1.in/v1 |
| Crush | crush.json | https://api.layerx1.in/v1 |
| Goose | env / goose configure | https://api.layerx1.in |
| Hermes Agent | ~/.hermes/config.yaml | https://api.layerx1.in/v1 |
| OpenClaw | ~/.openclaw/openclaw.json | https://api.layerx1.in/v1 |
| Qwen Code | .qwen/.env | https://api.layerx1.in/v1 |
| OpenHands | Settings → LLM (Advanced) | https://api.layerx1.in/v1 |
| Aider | ~/.aider.conf.yml | https://api.layerx1.in/v1 |
| Zed | settings.json | https://api.layerx1.in/v1 |
| Continue | ~/.continue/config.yaml | https://api.layerx1.in/v1 |
| Cline | GUI settings | https://api.layerx1.in/v1 |
| Kilo Code | GUI settings | https://api.layerx1.in/v1 |
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.
Terminal agents
opencode
Add a provider to opencode.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.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"layerx1": {
"npm": "@ai-sdk/openai-compatible",
"name": "Layer X1",
"options": {
"baseURL": "https://api.layerx1.in/v1",
"apiKey": "lx1_your_key"
},
"models": {
"lx1-gpt-oss-120b": { "name": "Layer X1 fast" },
"lx1-glm-5": { "name": "Layer X1 coding" }
}
}
},
"model": "layerx1/lx1-gpt-oss-120b"
}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.in/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-local crush.json. Register the provider as openai-compat and point the top-level modelsblock at it so it's used by default:
{
"$schema": "https://charm.land/crush.json",
"providers": {
"layerx1": {
"type": "openai-compat",
"base_url": "https://api.layerx1.in/v1",
"api_key": "lx1_your_key",
"models": [
{ "id": "lx1-gpt-oss-120b", "name": "Layer X1 fast" },
{ "id": "lx1-glm-5", "name": "Layer X1 coding" }
]
}
},
"models": {
"large": { "provider": "layerx1", "model": "lx1-glm-5" },
"small": { "provider": "layerx1", "model": "lx1-gpt-oss-120b" }
}
}Prefer the project-local file — it's unambiguous on every OS. The machine-wide path is ~/.config/crush/crush.json (on Windows, %USERPROFILE%\.config\crush\crush.json).
Goose
Block's Goose uses the built-in openai provider with a custom host. Set four variables and start a session — or run goose configure → Configure Providers → openai and enter the same values:
export GOOSE_PROVIDER=openai
export GOOSE_MODEL=lx1-gpt-oss-120b
export OPENAI_HOST=https://api.layerx1.in
export OPENAI_API_KEY=lx1_your_key
goose sessionGoose is the exception to the /v1 rule: OPENAI_HOST takes the bare origin (https://api.layerx1.in, no /v1) — Goose appends /v1/chat/completions itself.
Hermes Agent
Nous Research's Hermes Agent takes a custom provider in ~/.hermes/config.yaml — or run hermes model and pick "Custom endpoint" to write the same YAML from prompts:
model:
provider: custom
base_url: https://api.layerx1.in/v1
api_key: lx1_your_key
default: lx1-gpt-oss-120bThe /v1 in base_url is required — Hermes does not add it. Swap default to lx1-glm-5 for heavy coding, or any other catalog id.
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):
{
"models": {
"providers": {
"layerx1": {
"api": "openai-completions",
"baseUrl": "https://api.layerx1.in/v1",
"apiKey": "lx1_your_key",
"models": [
{ "id": "lx1-gpt-oss-120b", "name": "Layer X1 fast" },
{ "id": "lx1-glm-5", "name": "Layer X1 coding" }
]
}
}
}
}Then select 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:
OPENAI_API_KEY=lx1_your_key
OPENAI_BASE_URL=https://api.layerx1.in/v1
OPENAI_MODEL=lx1-gpt-oss-120bOn first launch pick Custom Provider if prompted (or start with --auth-type openai). Switch OPENAI_MODEL to lx1-glm-5 for heavy sessions.
OpenHands
In OpenHands, open Settings → LLM, click see advanced settings, toggle Advanced, and fill in:
Custom Model: openai/lx1-glm-5 (or openai/lx1-gpt-oss-120b)
Base URL: https://api.layerx1.in/v1
API Key: lx1_your_keyThe 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):
model: openai/lx1-gpt-oss-120b
openai-api-base: https://api.layerx1.in/v1
openai-api-key: lx1_your_keyOr per-invocation: aider --model openai/lx1-glm-5 --openai-api-base https://api.layerx1.in/v1.
Editors & IDE extensions
Zed
Zed reads an openai_compatible provider from settings.json (Command Palette → zed: open settings):
{
"language_models": {
"openai_compatible": {
"layerx1": {
"api_url": "https://api.layerx1.in/v1",
"available_models": [
{ "name": "lx1-gpt-oss-120b", "display_name": "Layer X1 fast", "max_tokens": 128000 },
{ "name": "lx1-glm-5", "display_name": "Layer X1 coding", "max_tokens": 200000 }
]
}
}
}
}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.in/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 a models entry to ~/.continue/config.yaml using the OpenAI provider type pointed at the gateway:
models:
- name: Layer X1
provider: openai
model: lx1-gpt-oss-120b
apiBase: https://api.layerx1.in/v1
apiKey: lx1_your_keyAdd one entry per model you want in the picker — chat, edit, and autocomplete roles can each point at a different lx1 id.
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.in/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.in/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.in/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, Aider, Continue, Cline) — see CLI. For the tools above, paste the config by hand; every one is a single provider block.