Mitome
Providers

Codex subscription

Authenticate a ChatGPT subscription through the best-effort Codex Provider.

Warning: @mitome/providers/openai-codex uses OpenAI's unofficial, undocumented chatgpt.com/backend-api. Compatibility is best effort; the backend can change without notice. This is not the official OpenAI API and carries a higher maintenance and breakage risk.

Codex uses a ChatGPT subscription Credential and an SSE-only transport. It is not openai() with another base URL, and an OpenAI API key does not authenticate it.

import { defineAgent } from "@mitome/sdk";
import { codex } from "@mitome/providers/openai-codex";

const agent = defineAgent({
  providers: [codex()],
  model: "openai-codex/gpt-5.4-mini",
  extensions: [],
});

Authenticate

Select Codex during mitome init, or authenticate an existing selected Definition:

mitome auth login

The Auth capability opens a browser PKCE flow. If browser return cannot complete automatically, paste the redirect URL when prompted. The resulting OAuth Credential is stored under the Codex Provider entry in <config-dir>/auth.json; the file is written atomically with mode 0600. mitome auth logout removes only that entry.

Treat auth.json as a secret: never commit, copy into Instructions, log, or share it. Access and refresh credentials are not configured through OPENAI_API_KEY, so CLI .env precedence does not apply to Codex. The config directory must resolve so the Provider can locate its Credential.

Model-hint maintenance

Codex Model hints are hand-maintained from OpenAI's Codex documentation because models.dev has no ChatGPT-backend Provider record. Maintainers must review and update packages/providers/src/openai-codex/models.ts when Codex releases change. See Providers and Models for catalog semantics.

See ADR-0011 and ADR-0028 for rationale.

On this page