feat(plugin-codex-cli): ChatGPT Codex model provider via OAuth token cache#7464
feat(plugin-codex-cli): ChatGPT Codex model provider via OAuth token cache#74640xSolace wants to merge 0 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6fcfad2 to
63b838d
Compare
Runtime load failure: peerDependency
|
63b838d to
cbf79b4
Compare
|
Closing — content of this PR was cherry-picked onto develop in commit Rebase confirms zero commits ahead of develop. Functionally identical to what's on develop already. Thanks @lalalune for landing this cleanly. |
Summary
Proposes
@elizaos/plugin-codex-cli, a model provider plugin that lets Eliza agents use a user's ChatGPT Plus/Pro subscription as a frontier-model provider through the officialcodexCLI auth cache.This is the CodexBackend piece salvaged from closed PR #7435 after Wave 1 superseded the native-reasoning runtime work. It is intentionally scoped as a model provider plugin alongside
plugin-openaiandplugin-anthropic, not a reasoning runtime, planner, loop, or context architecture change.Mechanism
The plugin reads OAuth credentials from
~/.codex/auth.jsonby default, then talks to:It sends the codex-style headers used by the CLI path:
Authorization: Bearer <access_token>originator: codex_cli_rsUser-Agent: codex_cli_rs/...chatgpt-account-id: <account_id>when presentOpenAI-Beta: responses=v1Supported models:
gpt-5gpt-5-codexgpt-5.4gpt-5.5gpt-5.5-proProvider surface
Registers handlers for:
ModelType.TEXT_SMALLModelType.TEXT_NANOModelType.TEXT_MEDIUMModelType.TEXT_LARGEModelType.TEXT_MEGAModelType.RESPONSE_HANDLERModelType.ACTION_PLANNERModelType.OBJECT_SMALLModelType.OBJECT_LARGETool-capable calls pass provider-neutral
tools,toolChoice, andmessages; the plugin forwards tools to OpenAI Responses API native function-tool format and returns native tool-call results for V5 planner/native-tool-calling paths.Usage
With native tools:
Configuration
CODEX_AUTH_PATH=~/.codex/auth.json CODEX_BASE_URL=https://chatgpt.com/backend-api/codex CODEX_MODEL=gpt-5.5 CODEX_JITTER_MS_MAX=200 CODEX_ORIGINATOR=codex_cli_rsCODEX_BASE_URLis restricted tochatgpt.comor localhost to avoid accidental OAuth bearer-token exfiltration.Soft mitigation
CODEX_JITTER_MS_MAXpre-request jitter, default max 200msNotes
fs/cryptoauth code into browser builds.develop; does not modifypackages/coreor V5 architecture.Validation
Also ran Codex review against the uncommitted diff and addressed the medium findings it surfaced.
Tags:
kind/feat,area/plugin,status/proposal