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.
  • Registers known hidden/fallback Codex models such as gpt-5.3-codex-spark.

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

Models are discovered from the Codex API, plus known hidden/fallback slugs such as gpt-5.3-codex-spark. Some listed fallback models may still fail at request time if your plan lacks access.

Run a prompt:

llm -m codex/gpt-5.3-codex-spark "Hello"

Use Responses API verbosity:

llm -m codex/gpt-5.3-codex-spark -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.2.tar.gz (21.0 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.2-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file llm_openai_codex-0.2.2.tar.gz.

File metadata

  • Download URL: llm_openai_codex-0.2.2.tar.gz
  • Upload date:
  • Size: 21.0 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.2.tar.gz
Algorithm Hash digest
SHA256 e64b6fe47c0a2a4ca78115695bedc138ad3c50d908bedab8cdf69ac9ca8364a7
MD5 6a235033fc7dd25689cafe87f4bf9ce5
BLAKE2b-256 d9f09c4a6f2a4d3e9717a1373c3767fbcc92bf5af4ec3978df97c67c97556d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_openai_codex-0.2.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_openai_codex-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 75d7cba45d1c09af1276240de9811781f66302b0f990abe9c3b7573334ea2246
MD5 f6b5e90e23814bf35637a00dd2429326
BLAKE2b-256 3c0b80e30bc21bfceaba91bdf5b34b4c0fc48309404f4a1bf69fcf46f07f8683

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_openai_codex-0.2.2-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