Codex CLI with LiteLLM gateway now failing with: "stream disconnected before completion: builder error"

Resolved 💬 3 comments Opened Feb 23, 2026 by BTheunissen Closed Feb 24, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

Since this morning getting the following error for all chat commands when using Codex with LiteLLM gateway, can't seem to resolve this by reverting my Codex CLI so this feels like a configuration issue but have been unable to spot the root cause.

stream disconnected before completion: builder error

View original on GitHub ↗

3 Comments

etraut-openai contributor · 6 months ago

Based on your description, I agree this sounds like a config error. Or perhaps a regression in LiteLLM (if you upgraded it recently).

If you use /feedback to upload your logs and session details, then post your thread ID here, I can take a quick look at your logs to see if there's anything that jumps out at me.

BTheunissen · 6 months ago

@etraut-openai I used the /feedback command to open this issue, it looks like the thread ID context isn't being passed through properly even though it appears to be in the GH issue URL that is generated, flagging as a secondary issue.

Uploaded a new feedback thread with ID 019c8cfd-118d-7b22-a743-9c3c39771765. Thanks!

etraut-openai contributor · 6 months ago

@BTheunissen, you need to paste the thread ID directly into the bug report. It's a limitation of the github issue tracker.

From your logs, I can see that you have an environment variable OPENAI_BASE_URL. It contains the value "OPENAI_BASE_URL" rather than the URL for your proxy server. If you set it to the proper value, it should start working for you again.

As a side note, the OPENAI_BASE_URL env variable is a foot gun and a continual support issue for us, so we plan to deprecate it in favor of a config key.