Skip to main content

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 codex auth commands manage login, import, status, refresh, and logout.
  • Explicit verbosity option maps to Responses API text.verbosity.
  • Extra Responses API options are forwarded when LLM accepts them.
  • Missing account_id values are derived from OAuth JWT claims when possible.
  • Added llm codex usage showing 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:

  1. Plugin-owned auth-codex.json
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_openai_codex-0.2.1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_openai_codex-0.2.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

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

Hashes for llm_openai_codex-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1565ad42f25350ff06e0cb2594e6f8f0c7493790e8ed25cb83964dc918932d73
MD5 3ab846ea4aa369b665f50b75677aba02
BLAKE2b-256 acf7667a11bbefe474e0053de9f3a3e53df584d6a40bb4fd62f177b9c70b6118

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_openai_codex-0.2.1.tar.gz:

Publisher: publish.yml on rdslw/llm-openai-codex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_openai_codex-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_openai_codex-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d680dd93df95f9b5d2717d573061a35f259702ef0689cdd6410fec4c8b94d1b6
MD5 7bd180b1fc1d2317d05030db9b988247
BLAKE2b-256 2997325bcebb71ef416e616b451d909a2c0771052302262062a541335adab98b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page