runinfra provider.
Support level: preview.
Kilo Code needs live stream/tool, override, IDE activation and post-start restoration checks before promotion from preview.
on requires --preview. Preview is not a dry run: it writes settings and sends a request using credits. It does not certify those remaining checks.Connect Kilo Code
Have Kilo Code installed, a workspace API key, and available RunInfra credits. This adapter targets the shared CLI/current IDE configuration in Kilo Code 7.5.15, not legacy extension storage.on. In an interactive terminal, Connect starts login if needed. Review and approve the proposed changes. Connect saves a snapshot, writes the provider settings and model selection, and makes a real Chat Completions request that uses credits.
To choose a model during setup:
What Connect writes
An absolute
XDG_CONFIG_HOME applies on all three platforms. Connect appends kilo/kilo.jsonc; it does not use %APPDATA% on Windows.
Connect merges catalog models and options into provider.runinfra, using @ai-sdk/openai-compatible and https://api.runinfra.ai/v1. It writes actual context/output limits, tool-calling and reasoning flags, and selects runinfra/<slug>. Other built-in or configured models can remain visible, so choose the explicit Connect catalog model.
The catalog supplies no modality list, so Connect does not invent modality capabilities. Existing RunInfra model entries absent from the current catalog, comments, and unrelated provider bytes are kept unchanged. Review retained models before selection.
Connect puts a missing $schema before other fields. It adds the first-start permission.bash: "allow" block only when none of Kilo’s five global configuration files exists: config.json, kilo.json, kilo.jsonc, opencode.json, and opencode.jsonc. If any exists, Connect adds no permission block and keeps existing policy unchanged. A newly created kilo.jsonc alone does not establish a fresh installation. Connect discloses this permission change before approval when it applies.
Key placement
Literal mode writes the key toprovider.runinfra.options.apiKey. For an environment handoff:
options.apiKey and writes exactly one discovery variable in provider.runinfra.env. It does not write an empty apiKey placeholder, which would block credential fallback.
Helper mode writes RUNINFRA_API_KEY as the discovery variable. Connect does not switch automatically to RUNINFRA_GATEWAY_KEY; set RUNINFRA_API_KEY in the launching environment. Kilo’s built-in provider also recognizes RUNINFRA_GATEWAY_KEY, but Connect keeps the configured helper variable. If the helper variable is unset, Kilo may use a stored auth.json key or fail authentication. Review stored credentials separately.
Restart GUI apps and background services with the required environment. On Windows, set RUNINFRA_API_KEY in the user environment and fully restart the app. GUI and Start menu launches do not inherit a terminal-only assignment.
Verify
Kilo Code CLI 7.5.15 produced a verified response through RunInfra withkilo run --model runinfra/deepseek-v4-flash, using the Connect-written kilo.jsonc.
For that selected model, this manual verification template is docs-only. Connect does not execute it:
Restart
Restart Kilo Code fully. In the IDE, open a new chat and confirm the selected RunInfra model.Troubleshooting
Connect inventories global files in this order:config.json, kilo.json, kilo.jsonc, opencode.json, and opencode.jsonc. It writes only kilo.jsonc and refuses competing global model or RunInfra provider definitions.
The wider configuration order starts with legacy .kilocodemodes, remote well-known settings, those global files, KILO_CONFIG, then the project kilo.json/kilo.jsonc/opencode.json/opencode.jsonc search. Also review .kilo and .kilocode directories, KILO_CONFIG_DIR, inline KILO_CONFIG_CONTENT, and organization settings. Project, inline, and organization settings can override the user file.
Revert
off restores the original bytes from before the first on in the active connection. If kilo.jsonc did not exist then, Connect removes it. Later on calls and key rotations keep that restore point.
If Kilo or another editor changed the file, Connect refuses to overwrite it. Back up and review the edits before choosing to discard them:
RUNINFRA_GATEWAY_KEY or a stored auth.json credential. Those credentials are not edited and can still authenticate Kilo’s built-in provider. Restore manual environment changes separately.
Related
Connect
Set up, inspect, and restore your coding agent.
Chat completions
Read the request contract.
Models
Find model ids and context windows.