Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I Use Grok Build to Run Free Models Alongside Grok-4.6

Description and use

Users can run local and free OpenRouter models in Grok Build by editing ~/.grok/config.toml and switching with /model, keeping a single harness.

Problem

Users want to extend Grok Build to use open‑weight or free models beyond the built‑in Grok lineup.

Outcome

Users can run local or free OpenRouter models in Grok Build without leaving the harness, enabling offline, private, or cost‑free workflows.

Workflow

  • 1. Ensure a local model server exposes /v1/chat/completions (e.g., llama.cpp, LM Studio, Ollama).
  • 2. Add a model entry to ~/.grok/config.toml with model id, base_url, name, api_backend, and context_window.
  • 3. Start the local server and restart Grok Build.
  • 4. In Grok Build, switch to the local model with /model <model-id> or launch grok with -m <model-id>.
  • 5. For OpenRouter free models, export OPENROUTER_API_KEY, define a provider in config.toml, and add model entries with :free suffix.
  • 6. Switch to an OpenRouter model with /model <model-id> or use grok models to list available models.
  • 7. Verify connectivity with curl against the model endpoint; fix typos if Grok Build fails to connect.

Evidence

Grok Build talks to anything that speaks an OpenAI-compatible chat API.

Source

You can start grok directly with the model as an argument: grok -m gemma-4-12b-local

Source

  • Record date: 2026-09-06T13:52:45.401Z