OSS mode outputting chunks
Resolved 💬 13 comments Opened Dec 4, 2025 by gooberhauser Closed Jan 31, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.64 / 0.65
What subscription do you have?
None
Which model were you using?
ollama's gpt-oss:120b-cloud
What platform is your computer?
Darwin 23.6.0 arm64 arm
What issue are you seeing?
When running codex cli with the --oss flag, every query results in normal functioning except, after the answer is provided, many lines of chunks or tokens (or whatever they're called) are provided - sometimes in the hundreds.
What steps can reproduce the bug?
run: codex --oss
enter any query
What is the expected behavior?
_No response_
Additional information
_No response_
13 Comments
You mentioned that you're using ollama. I presume that means you're using the older "chat/completions" API, since ollama doesn't yet support the newer "responses" API, which was designed for agentic workflows like codex. You might want to try LM Studio, which supports gpt-oss using the "responses" API. Make sure to specify
wire_api = "responses"in your config file.With the new update, my local setup (llama.cpp) with litellm is acting different too. Here's the relevant part of my
~/.codex/config.toml:When I use codex with my local gpt-oss-120b I get:
<img width="853" height="936" alt="Image" src="https://github.com/user-attachments/assets/c90e0cf0-116a-4f5d-95bc-146649a71680" />
After this, I tried:
But this actually results in a worse output as now litellm can't find my model:
There's a good chance that this is a litellm problem. But on the Codex side, is there a way to use the previous endpoint just for providers that don't support responses yet? For now I'm planning to stick with the older codex version.
Also, I tested this with v0.63.0, 64, and 65. This issue first appears on v64.
Are you using the latest version of litellm? My understanding is that it recently added support for "responses".
I can confirm I'm using the latest stable. Will probably open an issue over at the litellm repo as well when I get the time.
This may be the same underlying problem as #7579, which we just fixed in version
0.66.0-alpha.5.I saw this with an earlier version of LM Studio and codex. I'm no longer able to repro this with the latest version of LM Studio and the latest prerelease version of codex (
0.66.0-alpha.10).With
0.66.0released, I think this is now fixed. Let us know if you're still seeing it.This still happens on
v0.71.0:ollama version is 0.13.1
When used without
--oss(via llama.cpp's llama-server using the same model) there is no problem.I can confirm the issue with codex-cli 0.72.0 and ollama 0.13.3 as well.
The bug report seems to be ignored. Should we create new one?
^ please re-open this issue @etraut-openai
As written in https://github.com/openai/codex/issues/8240 the problem seems to be that the "oss mode" is enforcing some fixed configuration (e.g. for Ollama use a localhost connection and the chat API).
By specifying a custom configuration (see below) and using the profile to start it (command
codex -p gpt-oss), the problem with the corrupted chunking is gone.It seems to be a bug related to the
chat APIwhich is probably not going to be fixed.[model_providers.myollama]
name = "My Ollama"
base_url = "http://192.168.64.1:11434/v1"
wire_api = "responses"
[profiles.gpt-oss]
model_provider = "myollama"
model = "gpt-oss:20b"
We've removed support for the chat/completions endpoint, so closing this as "won't fix".