Grok Build operates with one current model profile: its live configuration
points to one active connection. Its default directory is ~/.grok, and OcHub
can also manage its MCP servers. Start from the official xAI preset, fill the
form manually, or choose a configured model provider.
-
Define the profile. It is the client configuration name used by
[models].default. -
Enter the upstream model. This is the model ID sent to the provider; the display name is only for readability.
-
Enter the Base URL. Use the base address for the selected protocol.
-
Choose credentials. API Key writes the secret to configuration. Environment variable stores only a name such as
XAI_API_KEY, which must exist in Grok Build’s runtime environment. -
Choose an API backend. Select OpenAI Responses, OpenAI Chat Completions, or Anthropic Messages to match the upstream.
-
Set the context window. Use the actual token limit supported by the upstream model.
-
Review
config.tomland switch. Restart Grok Build and make a real request.
If environment-variable mode works in an OcHub check but not in Grok Build, the two processes probably inherited different environments. Launch from the same terminal or define the variable in the environment Grok Build actually reads.
One-click model provider
At the top of the connection editor, change the source from Direct connection to Model provider. After you pick a configured model provider, OcHub fills in the local gateway address, issues a key, and pins the API backend to OpenAI Responses. You only set the profile name, upstream model, and display name. Dialect conversion happens in the gateway, so a Chat Completions-only upstream does not need to be written as a Grok Build direct connection.
You can also apply the same model provider to Grok Build from the Model providers page after saving it.
After saving, follow the verification checklist to confirm the switch. For effective configuration, custom backends, permissions, sandboxing, and compatibility imports, see Advanced Grok Build pitfalls.

