Skip to content

How to use uncensored abliterated models with Grok Build

A config.toml that adds abliterated Kimi, GLM and DeepSeek models to Grok Build as custom models, with no Grok login. Tested on Grok Build 1.0.97.

Published 5 min read

Grok Build, the terminal coding agent from xAI, accepts custom models in its config file, so you can run it on an uncensored, abliterated model instead of Grok. We set up Grok Build 1.0.97 against CommentLLM's abliterated Kimi K3.1 Pro model and gave it a real bug to fix. It fixed it, the tests passed, and it then called an MCP server and read a web page.

The short version: add a [model.<name>] section to ~/.grok/config.toml with base_url set to https://api.commentllm.com/v1, api_backend = "chat_completions" and env_key = "COMMENTLLM_API_KEY", then set default under [models] to that name. You do not need a Grok account.

How a coding agent connects to an abliterated model: the agent sends prompts to the CommentLLM API, which passes them to the model and returns its tool calls

What you need

  • Grok Build. We used version 1.0.97, installed with curl -fsSL https://x.ai/cli/install.sh | bash. The installer puts the grok binary in ~/.grok/bin, so add that folder to your PATH.
  • A CommentLLM API key. Create one under Keys in the console after you sign up and add credit.

Step 1: put your key in an environment variable

export COMMENTLLM_API_KEY="cllm_..."

The config names this variable in env_key, so the key never goes in the file. A custom model with its own key also replaces grok login: we never signed in to Grok.

Step 2: write ~/.grok/config.toml

[models]
default = "commentllm-kimi"
session_summary = "commentllm-glm-flash"

[model.commentllm-kimi]
model = "kimi-k3.1-pro-abliterated"
name = "Kimi K3.1 Pro Abliterated"
base_url = "https://api.commentllm.com/v1"
env_key = "COMMENTLLM_API_KEY"
api_backend = "chat_completions"
context_window = 1048576
max_completion_tokens = 32768
supports_backend_search = false

[model.commentllm-glm]
model = "glm-5.3-abliterated"
name = "GLM 5.3 Abliterated"
base_url = "https://api.commentllm.com/v1"
env_key = "COMMENTLLM_API_KEY"
api_backend = "chat_completions"
context_window = 1048576
max_completion_tokens = 32768
supports_backend_search = false

[model.commentllm-glm-flash]
model = "glm-5.3-flash-abliterated"
name = "GLM 5.3 Flash Abliterated"
base_url = "https://api.commentllm.com/v1"
env_key = "COMMENTLLM_API_KEY"
api_backend = "chat_completions"
context_window = 1048576
max_completion_tokens = 32768
supports_backend_search = false

[model.commentllm-deepseek]
model = "deepseek-v4.1-flash-abliterated"
name = "DeepSeek V4.1 Flash Abliterated"
base_url = "https://api.commentllm.com/v1"
env_key = "COMMENTLLM_API_KEY"
api_backend = "chat_completions"
context_window = 1048576
max_completion_tokens = 32768
supports_backend_search = false

[model.commentllm-deepseek-fast]
model = "deepseek-v4.1-flash-abliterated-fast"
name = "DeepSeek V4.1 Flash Abliterated Fast"
base_url = "https://api.commentllm.com/v1"
env_key = "COMMENTLLM_API_KEY"
api_backend = "chat_completions"
context_window = 1048576
max_completion_tokens = 32768
supports_backend_search = false
Setting Why
api_backend = "chat_completions" Tells Grok Build to call the OpenAI Chat Completions endpoint
env_key The environment variable that holds the key for this model
context_window Grok Build assumes 200,000 tokens for a custom model unless you set it. These models take 1,048,576
max_completion_tokens The most output CommentLLM returns per request
supports_backend_search = false Grok's web search runs on xAI's servers, which this endpoint does not have
models.default The model Grok Build starts with
models.session_summary The model for session summaries. We set it to the fastest model

Check the result with grok models. It lists the five models next to the built-in Grok ones and prints Model 'commentllm-kimi' is using its own API key.

Step 3: start Grok Build

Run grok in your project. The bar under the prompt shows the model name.

Grok Build 1.0.97 starting with Kimi K3.1 Pro Abliterated as the model

Step 4: give it a task

Our test project had a log-triage script with a bug: it counted failed SSH logins by username instead of by source address, so both tests failed. We asked:

The test suite fails. Run the tests, find the bug in auth_triage.py and fix it. Then run the tests again.

Grok Build read the two files, ran the tests, changed match.group(1) to match.group(2) and ran them again: 2 passed. We ran the task twice. It took 58 seconds the first time and 2 minutes 18 seconds the second.

Grok Build on Kimi K3.1 Pro Abliterated fixing the bug in auth_triage.py, with 2 passed

Type /model to switch between the models in your config.

The Grok Build model picker listing Grok 4.6 and 4.5 and the five abliterated models

MCP servers and web pages

MCP servers go in the same file. Ours was a local ticket server:

[mcp_servers.tickets]
command = "/opt/mcp/.venv/bin/python"
args = ["/opt/mcp/tickets.py"]

grok mcp doctor starts each server and reports whether it answered. Run it before you open a session:

tickets (stdio: /opt/mcp/.venv/bin/python /opt/mcp/tickets.py)
  ✓ command found (/opt/mcp/.venv/bin/python)
  ✓ server started (0.0s)
  ✓ handshake OK (protocol 2025-11-25)
  ✓ 2 tools discovered
Found 1 healthy, 0 failing.

We then asked for a ticket's owner and token, which the model could only get from the server, and for a price from our pricing page. Kimi called the MCP tool, fetched the page with a shell command and answered both correctly in 1 minute 3 seconds.

Grok Build on Kimi K3.1 Pro Abliterated returning a ticket owner from an MCP server and prices fetched from a web page

Grok's built-in web search does not work with a custom model, because it runs on xAI's servers. The model can still read a page you name by fetching it from the shell.

Common problems and fixes

What you see Why Fix
Error: Not signed in COMMENTLLM_API_KEY is not set in the shell that started Grok Build, so it falls back to a Grok login Export it first
The MCP server fails its handshake The command is not the interpreter that has the server's packages. We had python3 where the server needed its virtual environment's Python Run grok mcp doctor, then put the full path to the right executable in command
permission required: ... was not run, as a headless run cannot ask for approval grok -p cannot show an approval prompt, so a command that needs one is refused Run the task in an interactive session
The model does not search the web supports_backend_search = false turns off Grok's server-side search Give it the URL to fetch

Which model to use

Start with kimi-k3.1-pro-abliterated, the model that did everything here. deepseek-v4.1-flash-abliterated costs less and suits most agent work, and deepseek-v4.1-flash-abliterated-fast is the same model served about five times faster. All of them take text only, so image input does not work. The pricing page lists every model and its rate.

Run it in a sandbox

Abliterated models refuse far fewer requests than standard ones, and that includes commands an agent should not run on your machine. Try it first in a throwaway project, as we did, and review what the model writes before you ship it.

Setting up a different agent? Uncensored coding AI lists every agent we tested, with a guide for each.

Questions

Can Grok Build use uncensored or abliterated models?

Yes. Grok Build accepts custom models in ~/.grok/config.toml. We ran Grok Build 1.0.97 on Kimi K3.1 Pro Abliterated through CommentLLM, and it fixed a failing test and called an MCP server.

How do I add a custom model to Grok Build?

Add a [model.name] section to ~/.grok/config.toml with model, base_url, env_key and api_backend, plus context_window and max_completion_tokens. Then set default under [models] to that name, or pick it with /model.

Do I need a Grok or xAI account to use Grok Build with another model?

No. When the default model has its own env_key, Grok Build uses that key and does not ask you to sign in. We never ran grok login.

Does Grok Build web search work with a custom model?

No. Its web search runs on xAI's servers. Set supports_backend_search to false and give the model a URL, which it can fetch with a shell command.

Start building today.

Create an account, tell us what you work on, and send your first request.