Access OpenAI models via a Codex subscription
Project description
llm-openai-codex
LLM plugin for accessing ChatGPT/Codex-backed OpenAI models through the Responses API.
This project is forked from and based on Simon Willison's llm-openai-via-codex.
Changes from the original plugin
- Package renamed to
llm-openai-codex. - Model prefix changed to
codex/. - Plugin-owned auth is stored in LLM's user config directory as
auth-codex.json, with read-only fallback to${CODEX_HOME:-~/.codex}/auth.json. llm codexauth commands manage login, import, status, refresh, and logout.- Explicit
verbosityoption maps to Responses APItext.verbosity. - Extra Responses API options are forwarded when LLM accepts them.
- Missing
account_idvalues are derived from OAuth JWT claims when possible. - Added
llm codex usageshowing current Codex plan usage.
Installation
Install this plugin in the same environment as LLM.
llm install llm-openai-codex
Usage
Authenticate the plugin:
llm codex login [--device-code]
If you already use Codex CLI, the plugin can fall back to ${CODEX_HOME:-~/.codex}/auth.json when auth-codex.json does not exist. You can also copy those tokens into plugin-owned auth with llm codex import.
List available Codex-backed models:
llm models -q codex
Run a prompt:
llm -m codex/gpt-5.5 "Hello"
Use Responses API verbosity:
llm -m codex/gpt-5.5 -o verbosity low "Summarize this"
Auth commands
llm codex login
llm codex login --device-code
llm codex status
llm codex refresh
llm codex usage
llm codex import
llm codex logout
Auth source order:
- Plugin-owned
auth-codex.json - Read-only Codex CLI auth at
${CODEX_HOME:-~/.codex}/auth.json
llm codex import copies ChatGPT OAuth tokens from Codex CLI auth into plugin-owned auth-codex.json. It refuses to overwrite an existing auth-codex.json; run llm codex logout first if you want to replace plugin-owned auth.
When using Codex CLI auth fallback, this plugin does not refresh or delete the shared Codex CLI auth file. If those tokens expire, run Codex CLI to refresh them, or run llm codex login [--device-code] to create plugin-owned auth. llm codex status shows which auth source is active.
When authentication is missing or expired, run llm codex login [--device-code] or llm codex import.
Development
uv run pytest
uv run llm plugins
uv run llm codex status
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_openai_codex-0.2.1.tar.gz.
File metadata
- Download URL: llm_openai_codex-0.2.1.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1565ad42f25350ff06e0cb2594e6f8f0c7493790e8ed25cb83964dc918932d73
|
|
| MD5 |
3ab846ea4aa369b665f50b75677aba02
|
|
| BLAKE2b-256 |
acf7667a11bbefe474e0053de9f3a3e53df584d6a40bb4fd62f177b9c70b6118
|
Provenance
The following attestation bundles were made for llm_openai_codex-0.2.1.tar.gz:
Publisher:
publish.yml on rdslw/llm-openai-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_openai_codex-0.2.1.tar.gz -
Subject digest:
1565ad42f25350ff06e0cb2594e6f8f0c7493790e8ed25cb83964dc918932d73 - Sigstore transparency entry: 1413451951
- Sigstore integration time:
-
Permalink:
rdslw/llm-openai-codex@dd8f2635c7fdbc7ee8661b57607b49e564039455 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/rdslw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dd8f2635c7fdbc7ee8661b57607b49e564039455 -
Trigger Event:
release
-
Statement type:
File details
Details for the file llm_openai_codex-0.2.1-py3-none-any.whl.
File metadata
- Download URL: llm_openai_codex-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d680dd93df95f9b5d2717d573061a35f259702ef0689cdd6410fec4c8b94d1b6
|
|
| MD5 |
7bd180b1fc1d2317d05030db9b988247
|
|
| BLAKE2b-256 |
2997325bcebb71ef416e616b451d909a2c0771052302262062a541335adab98b
|
Provenance
The following attestation bundles were made for llm_openai_codex-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on rdslw/llm-openai-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_openai_codex-0.2.1-py3-none-any.whl -
Subject digest:
d680dd93df95f9b5d2717d573061a35f259702ef0689cdd6410fec4c8b94d1b6 - Sigstore transparency entry: 1413452017
- Sigstore integration time:
-
Permalink:
rdslw/llm-openai-codex@dd8f2635c7fdbc7ee8661b57607b49e564039455 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/rdslw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dd8f2635c7fdbc7ee8661b57607b49e564039455 -
Trigger Event:
release
-
Statement type: