Grok Build setup (Grok 4.5)
How to run Grok Build CLI/TUI against the gateway withgrok-4.5.
Recommended settings
0. Disable data training (required)
Using the relay does not mean you can skip client privacy settings.- Start Grok Build (TUI).
- Run:
- Review privacy / data-retention status.
- Turn off options related to training / improve-the-model / data sharing for training.
- Run
/privacyagain to confirm.
Optional: disable client telemetry
In~/.grok/config.toml:
/privacy controls privacy / retention / training participation; [features].telemetry controls anonymous usage telemetry.If you still use an xAI / X account, also disable Grok training options under X → Settings → Privacy and safety → Grok.
1. Prepare an API key
- Create a key in the console
- Prefer an environment variable:
2. Edit ~/.grok/config.toml
Windows:
Recommended full config
Option B: override built-in grok-4.5
When overriding a built-in model, only set fields you change. Still set
supports_backend_search = true for web_search.Option C: shared endpoint base
models_base_url, Grok can list models via API key auth and usually does not need grok login.
3. Launch and switch models
4. Verify
web_search check
Ask in Grok Build:- Success: search summaries returned
- 402 / spending-limit: check
web_searchmodel section andsupports_backend_search
Field reference
Context window (important)
Practice:
- Set
context_window = 200000— do not default to500000just because the spec allows it. - Start a new session / compact mid-task instead of stacking endless history.
- Avoid dumping entire monorepos; scope files to the task.
- Only raise to
500000temporarily when you truly need the hard window and accept lower quality.
Optional: Chat Completions backend
supports_backend_search for web_search.
FAQ
Model list missing arona-grok45
- Validate TOML syntax
- Restart terminal / Grok Build
- Run
grok models
401 Unauthorized
- Env var visible in the current shell
- Full key copied
- Key not written to the wrong field
Chat works, web_search fails
[models].web_searchpoints at your relay model- That section’s
base_urlis the gateway supports_backend_search = true- Both chat and search use a working
grok-4.5
Context compresses too soon / quality drops on long sessions
- Prefer quality: set
context_windowto200000so the client compacts near ~200k instead of waiting for 500k. - Grok 4.5 hard max is ~500k, but quality drops past ~200k. Larger
context_windowis not “smarter”. - If you already set
500000and the session is huge: new session, drop unrelated history, shrink attached files. - Only use
500000temporarily for rare ultra-long dumps, then set it back to200000.
Confirm data training is off
/privacy→ training / retention off/settingsPrivacy / Data controls- Optional
[features] telemetry = false - Account-side Grok training toggles on X if logged in