Guides · Other tools

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.

ToolConfigured inAPI base
opencodeopencode.jsonhttps://api.layerx1.in/v1
Crushcrush.jsonhttps://api.layerx1.in/v1
Gooseenv / goose configurehttps://api.layerx1.in
Hermes Agent~/.hermes/config.yamlhttps://api.layerx1.in/v1
OpenClaw~/.openclaw/openclaw.jsonhttps://api.layerx1.in/v1
Qwen Code.qwen/.envhttps://api.layerx1.in/v1
OpenHandsSettings → LLM (Advanced)https://api.layerx1.in/v1
Aider~/.aider.conf.ymlhttps://api.layerx1.in/v1
Zedsettings.jsonhttps://api.layerx1.in/v1
Continue~/.continue/config.yamlhttps://api.layerx1.in/v1
ClineGUI settingshttps://api.layerx1.in/v1
Kilo CodeGUI settingshttps://api.layerx1.in/v1
Note

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.json
Note

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" }
  }
}
crush.json (project root)

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 session
Note

Goose 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-120b
~/.hermes/config.yaml

The /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" }
        ]
      }
    }
  }
}
~/.openclaw/openclaw.json

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-120b
.qwen/.env

On 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_key
Note

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):

model: openai/lx1-gpt-oss-120b
openai-api-base: https://api.layerx1.in/v1
openai-api-key: lx1_your_key
~/.aider.conf.yml

Or 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 }
        ]
      }
    }
  }
}
settings.json
Note

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-5 for heavy coding or lx1-gpt-oss-120b for 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_key
~/.continue/config.yaml

Add 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-120b and lx1-glm-5 (manual entry is the guaranteed path; leave provider id lowercase).
Note

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 /v1 unless 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 an Authorization: Bearer or x-api-key header, 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, not glm-5).
Note

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.