Codex on chat-completions endpoints: LiteLLM bridge and stream shim - #445
Merged
Merged
Conversation
… shim as per-session sidecars Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Round 1 — reviewed head 87a914f0 — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.
terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.
Verdict: nothing blocking — 2 advisory notes.
2 findings attached to the lines below.
Merged two non-blocking findings. No duplicate claims were submitted. Rejected: none; the target source files were not present in this review workspace for independent code verification, but neither supplied finding conflicted with another opinion.
… runtime is ready Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The codex backend could not author or judge on a self-hosted model: codex speaks only the Responses API, and vLLM's Responses endpoint drops these models' tool calls. Claude Code and Hermes already could (endpoint profiles, #438).
What changes
chatbut notresponsesis now valid for codex roles; the kernel then runs a bridge. A profile withresponseskeeps today's direct path, and codex roles without a chat-only endpoint are unchanged.outerloop harness upgradeas its own runtime (like pre-installed Hermes) under the cache/state root, bound read-only into sessions;--usedinstalls it only when a codex role selects a chat-only endpoint. The codex CLI pin is unchanged (tested against 0.130.0).Compatibility (RELEASING.md)
Existing run and session formats are unchanged; no backfill. Codex roles without a chat-only endpoint behave as before. Before rolling back, finish sessions on chat-only endpoints or select a Responses-capable profile.
Tests
Real codex CLI and proxy against a fake chat-completions upstream: tool calls (parallel, stable ids), an
apply_patchround trip with bytes preserved, reasoning replayed on every later turn including after resume, local compaction, empty-opener / tool-first / text-only streams, truncation and cancellation, supervisor cleanup after a forced child failure, keys never in argv, files or logs, profile validation, runtime default placement, interrupt handling scoped to the bridge, andharness upgrade --usedsurviving a misconfigured role. Gate after folding in main: 2722 passed, 10 skipped (four skips need the installed runtime); ruff, format, mypy clean.Not yet run: a live session in the cluster container against a real endpoint. That is the fleet test after merge (one author slot on a chat-only endpoint, watched through its first attempt).
Built by codex from my brief (design consult first); reviewed by an on-prem open model (three findings: runtime defaulting into the home directory, interrupt cleanup scope, upgrade robustness, all fixed) and by me.
🤖 Generated with Claude Code