ready. Connect supports automatic setup.
Check the active configuration path before connecting. If you use an OpenClaw profile, pass its directory to Connect through
OPENCLAW_STATE_DIR. Keep the same path environment for on and off.Connect OpenClaw
Have OpenClaw installed, a workspace API key, and available RunInfra credits.on. In an interactive terminal, Connect starts login if needed. Review and approve the proposed changes. Connect saves a snapshot, writes the model settings, and makes a real Chat Completions request that uses credits.
To choose a model during setup:
What Connect writes
Connect uses the first nonempty path setting in this order:
Empty overrides are ignored. A leading
~ expands to your home directory. Connect refuses relative paths. Use an absolute path or a home-relative path beginning with ~.
Check the file OpenClaw actually uses:
--profile p1, run Connect with OPENCLAW_STATE_DIR set to ~/.openclaw-p1. More generally, --profile <name> uses ~/.openclaw-<name>. Connect cannot see OpenClaw’s profile flag. Use the same path environment for setup and disconnect.
Connect sets models.mode to merge. It adds models.providers.runinfra with baseUrl: https://api.runinfra.ai/v1, apiKey, api: openai-completions, and the catalog model list. Each model uses its exact id, name, reasoning support, contextWindow, and maxTokens, with input: ["text"].
Connect selects runinfra/<model-id> through agents.defaults.model.primary. Existing providers remain available. Other settings, including modelPolicy.allow, stay unchanged.
Key placement
Literal mode writes the key tomodels.providers.runinfra.apiKey. For an environment reference:
${RUNINFRA_API_KEY}. Start OpenClaw with RUNINFRA_API_KEY in its actual process environment. A value exported in another terminal does not reach an already running process.
Pass the helper key to the app
Pass the helper key to the app
Export
RUNINFRA_API_KEY with your RunInfra API key in the environment that launches the app. Restart GUI apps and background services with that environment.On Windows, set RUNINFRA_API_KEY in your user environment, then fully restart the app. GUI and Start menu launches do not receive a terminal-only $env:RUNINFRA_API_KEY value. Connect does not change your external environment.Verify
OpenClaw 2026.9.2 on WSL completed a verified round trip on September 8, 2026, after Connect’s config-path correction. WithOPENCLAW_STATE_DIR set, Connect wrote the file reported by openclaw config file. Configuration validation passed. The local agent request succeeded with stopReason: stop and was confirmed in RunInfra usage.
Validate the active configuration:
meta.lastTouchedAt or commands.ownerDisplay, review the changes before letting OpenClaw migrate its own configuration:
deepseek-v4-flash. Connect prints it but does not execute it:
Restart
Check the active OpenClaw provider and model. Restart OpenClaw if reload is disabled or fails. Start a new chat. A successful Connect API probe does not verify OpenClaw.Known behaviours
Connect edits JSON/JSONC only, not full JSON5. Still check reply routing after selecting the corrected file, reload behavior, helper credential resolution, and restoration after OpenClaw saves changes.Use OpenClaw's controls when Connect refuses JSON5
Use OpenClaw's controls when Connect refuses JSON5
If Connect refuses JSON5 syntax or a structure it cannot rewrite safely, review the non-secret settings before applying them through this command:Supply the reviewed setting and value yourself. Set
models.mode to merge, models.providers.runinfra.baseUrl to https://api.runinfra.ai/v1, and models.providers.runinfra.api to openai-completions. Set agents.defaults.model.primary to runinfra/<model-id>.Use the catalog’s exact model ids, names, reasoning support, context windows, and output limits for models.providers.runinfra.models. Connect uses input: ["text"].Enter your API key through OpenClaw’s Control UI Settings > Models. Keep a backup of manual changes. Do not put the key in command arguments.Troubleshooting
Revert
Keep the same path environment you used foron, including OPENCLAW_STATE_DIR for a profile:
off restored the original absent-file state. With intact state and snapshots, off restores the original bytes from before the first on in the active connection. If the file did not exist then, Connect removes it. Later on calls and key rotations keep that restore point.
If OpenClaw or another editor changed the file, Connect refuses to overwrite it. Back up and review the edits before choosing to discard them:
Related
Connect
Set up, inspect, and restore your coding agent.
Chat completions
Read the request contract.
Models
Find model ids and context windows.