Add support for grok4

Resolved 💬 4 comments Opened Jul 11, 2025 by vitatea2023 Closed Jul 15, 2025

What version of Codex is running?

codex-cli 0.5.0

Which model were you using?

grok4

What platform is your computer?

Linux 6.14.3-x86_64-linode168 x86_64 unknown

What steps can reproduce the bug?

(base) root@localhost:~# cat ~/.codex/config.toml
# Codex CLI 配置文件

[model_providers.xai]
name = "xAI"
base_url = "https://api.x.ai/v1"
env_key = "XAI_API_KEY"

[profiles.xai-grok4]
model_provider = "xai"
model = "grok-4"
(base) root@localhost:~# export XAI_API_KEY="xai-vYi4MiPxxxxxxxxxxxxxxxxxxxxxxxxxxx09Bm2iv"
(base) root@localhost:~# mkdir -p code/codex
(base) root@localhost:~# cd code/codex
(base) root@localhost:~/code/codex# codex --profile xai-grok4

<img width="1027" height="527" alt="Image" src="https://github.com/user-attachments/assets/46e4e9fd-013f-40fa-864b-299bca98aa74" />

What is the expected behavior?

be able to execute command

What do you see instead?

nothing happened if ask to execute command

Additional information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗