codex icon indicating copy to clipboard operation
codex copied to clipboard

Add support for grok4

Open vitatea2023 opened this issue 1 year ago • 4 comments

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
Image

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

vitatea2023 avatar Jul 11 '25 17:07 vitatea2023

I would run it with RUST_LOG=debug and then tail -F ~/.codex/log/codex-tui.log to see if that tells you anything interesting. I can't say why it does not appear to be responding to the chat completions request.

bolinfest avatar Jul 12 '25 22:07 bolinfest

I would run it with RUST_LOG=debug and then tail -F ~/.codex/log/codex-tui.log to see if that tells you anything interesting. I can't say why it does not appear to be responding to the chat completions request.

Image

when i am using v0.7.0 it works good

vitatea2023 avatar Jul 14 '25 18:07 vitatea2023

I would run it with RUST_LOG=debug and then tail -F ~/.codex/log/codex-tui.log to see if that tells you anything interesting. I can't say why it does not appear to be responding to the chat completions request.

Image

when i am using v0.5.0 it also works good now, i do not know why this

vitatea2023 avatar Jul 14 '25 18:07 vitatea2023

I would run it with RUST_LOG=debug and then tail -F ~/.codex/log/codex-tui.log to see if that tells you anything interesting. I can't say why it does not appear to be responding to the chat completions request.

I installed the v0.5.0 version in a brand new environment, but still cannot reproduce my previous error, so I tend to think that this may be an issue with the initial grok4 API interface service.

vitatea2023 avatar Jul 14 '25 18:07 vitatea2023