P02 · LLM Protocol Infrastructure
Codex-Shim
A deliberately narrow Responses-to-Chat compatibility layer that lets Codex CLI use OpenAI-compatible Chat Completions providers while keeping unsupported control-plane behavior explicit.
Translate semantics, not just JSON fields.
Useful compatibility surface
Instructions, token controls, function tools, function-call outputs, previous-response continuation, reasoning content and buffered Responses SSE.
Remote compact is not faked
The compact control-plane request is handled as unsupported instead of being blindly forwarded or misrepresented as provider failure.
Small API surface, visible failure semantics.
Tool call mapping
Chat tool calls become Responses function-call items, and function-call output is translated back into Chat tool messages.
Continuation
Previous response IDs are supported through an in-memory continuation model appropriate to the shim's narrow scope.
Verifiable artifacts
Release archives are accompanied by checksums and build information, making the open-source evidence easier to inspect.