Run the Grok CLI on Ollama Cloud and custom providers XAI's open-source terminal AI coding agent grok now supports custom model endpoints, allowing users to run models like GLM 5.2, DeepSeek V4 Pro, and Kimi K2 via Ollama Cloud or any OpenAI-compatible provider by editing a single config file. The feature, documented in a blog post by xAI, uses a ~/.grok/config.toml file where users specify model id, base URL, authentication, and protocol, with a critical caveat that dots in model names must be quoted in TOML headers to avoid parsing errors. What this is grok is the open-source terminal AI coding agent from xAI - a full-screen TUI that edits files, runs shell commands, searches the web, and drives long tasks, headless or interactive. The source lives at grok-build https://github.com/xai-org/grok-build ; the released binary installs as grok . Out of the box it talks to grok.com. The interesting part is that the model layer is bring-your-own-endpoint : grok speaks three wire protocols - OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages - and any base url + model id + key triple works. There is no per-vendor SDK and no provider enum. You point it at a provider with one config file edit, no rebuild, no code. The practical payoff: a single Ollama Cloud key gives you GLM 5.2 /models/glm-5-2 , DeepSeek V4 Pro /models/deepseek-v4-pro and V4 Flash /models/deepseek-v4-flash , Kimi K2 /models/kimi-k2 , GPT-OSS, Qwen, and more through one OpenAI-compatible endpoint - and the same mechanism adds local Ollama, OpenRouter, Moonshot, Anthropic, or any vLLM/llama.cpp server. Switch between them live with Ctrl+M . grok driving a session on GLM 5.2 via Ollama Cloud - the model picker, scrollback, and prompt all work as they do with the default grok.com backend. The one file: ~/.grok/config.toml Custom models live in ~/.grok/config.toml under model.