How I Use Grok Build to Run Free Models Alongside Grok-4.6
Описание и применение
Пользователи могут использовать локальные и бесплатные модели OpenRouter в Grok Build, редактируя файл конфигурации ~/.grok/config.toml и переключаясь между моделями командой /model, сохраняя единый интерфейс.
Задача
Users want to extend Grok Build to use open‑weight or free models beyond the built‑in Grok lineup.
Результат
Users can run local or free OpenRouter models in Grok Build without leaving the harness, enabling offline, private, or cost‑free workflows.
Рабочий процесс
- 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.
Доказательства
Grok Build talks to anything that speaks an OpenAI-compatible chat API.
You can start grok directly with the model as an argument: grok -m gemma-4-12b-local
- Дата записи: 2026-09-06T13:52:45.401Z