Skip to content

Fall back to read 'reasoning_content' when 'reasoning' to support VLLM-served gpt-oss #3721

@borishim

Description

@borishim

What version of Codex is running?

codex-cli 0.34.0

Which model were you using?

gpt-oss-120b

What platform is your computer?

Darwin Sangwoos-MacBook-Pro-10.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64

What steps can reproduce the bug?

Serve gpt-oss-120b on vllm with the following options:

vllm serve openai/gpt-oss-120b \
--tensor-parallel-size 1 \
--tool-call-parser openai --reasoning-parser openai_gptoss --enable-auto-tool-choice \
--gpu-memory-utilization 0.95 \
--max-num-batched-tokens 1024

And put the following entries to ~/.codex/config.toml

[model_providers.vllm]
name = "OpenAI using Chat Completions"
base_url = "OUR_INTERNAL_URL"
env_key = "OPENAI_API_KEY"
wire_api = "chat"

[profiles.gpt-oss-120b-vllm]
model_provider = "vllm"
model = "openai/gpt-oss-120b"                                  

Then run codex with --profile=gpt-oss-120b-vllm.

codex answers simple questions, but does not respond to reasoning response, because with VLLM chat completion API, reasoning content is delivered with 'reasoning_content' key, but codex expect 'reasoning' key.

What is the expected behavior?

codex should work with VLLM-served gpt-oss-120b model, especially for reasoning and tool_call.

What do you see instead?

codex cannot support reasoning responses with chat completion.

Additional information

I will submit a PR to fix the behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions