Skip to main content
Add RunInfra models to Grok Build’s user model picker. Support level: ready. Connect supports automatic setup.
Literal mode is the default. Only the selected model stores your API key. Other models need RUNINFRA_API_KEY in the environment before you select them.

Connect Grok Build

Have Grok Build installed, a workspace API key, and available RunInfra credits.
The bare agent command is an alias for 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:
See Connect for status, diagnostics, and key replacement.

What Connect writes

When GROK_HOME is set, Connect writes config.toml inside that directory. Check which configuration Grok Build loads before use. Connect adds a [model.runinfra-<model-id>] table for each catalog model. It writes the exact API model id, base_url = "https://api.runinfra.ai/v1", the catalog name and context_window, and api_backend = "chat_completions". Connect sets [models] default to runinfra-<model-id> for the selected model. Unrelated model settings are preserved. A table name alone does not establish ownership of its credentials or destination.

Key placement

Literal mode writes api_key only in the selected model’s table and removes its env_key. That selected model does not need RUNINFRA_API_KEY in the environment. Other RunInfra model tables use env_key = "RUNINFRA_API_KEY". For helper mode:
Helper mode uses env_key = "RUNINFRA_API_KEY" instead of a literal api_key. Set the variable securely in the environment that launches Grok Build.
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

Grok Build 1.0.13 on Windows completed verified round trips on September 8, 2026, with both literal api_key and helper env_key settings. Both returned RUNINFRA_OK and were confirmed in RunInfra usage. The literal-key run succeeded with RUNINFRA_API_KEY absent from the environment. Inspect the loaded configuration:
In an authorized isolated environment, run the follow-up command for deepseek-v4-flash. Connect prints it but does not execute it:
The no-tools prompt is not a permission boundary. Confirm the selected RunInfra model and request destination separately. The output format is plain, not text. Other supported choices are json, streaming-json, and streaming-messages-json.

Restart

Restart Grok Build. Run grok inspect to check which configuration is loaded. Confirm the selected RunInfra model and request destination separately. Connect’s API probe does not verify Grok Build.

Known behaviours

Still check GROK_HOME edge cases, precedence when both credential forms are present, parser edge cases, and restoration after Grok saves changes. Connect replaces owned literal credentials on other RunInfra model tables with environment references. Before selecting another model, ensure that the actual Grok Build process has RUNINFRA_API_KEY.

Troubleshooting

Revert

In both recorded key-mode runs, off restored the original config.toml byte for byte. 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 Grok Build or another editor changed the file, Connect refuses to overwrite it. Back up and review the edits before choosing to discard them:
Connect saves the current contents in a recovery snapshot and prints its id before restoring the origin. Keep the snapshots. If the origin snapshot is missing, cleanup does not guarantee original-byte restoration. See Connect recovery. Restore manual environment changes yourself. Restoring config.toml does not restore your external environment.

Connect

Set up, inspect, and restore your coding agent.

Chat completions

Read the request contract.

Models

Find model ids and context windows.