Open-Inspect supports OpenAI Codex models in addition to Anthropic Claude models. This guide covers how to configure your deployment to use them.
OpenAI subscriptions are managed as installation-wide provider accounts. Sessions and automations can use the installation default, select a specific account, or explicitly use API-key mode.
See Available Models — OpenAI for supported model IDs, reasoning effort options, and defaults.
- Open Settings > Provider Accounts.
- Choose Add account > ChatGPT. Device authorization starts automatically.
- Use Open ChatGPT Settings and enable device code authorization for Codex.
- Use Open Device Authorization, then enter the code shown by Open-Inspect when OpenAI asks for it.
- Keep the dialog open while Open-Inspect waits for authorization. The new account appears after OpenAI confirms the connection.
Open-Inspect creates the account as ChatGPT account by default. Use Rename afterward if you want a different display name. Provider accounts are shared by all admitted users in this single-tenant deployment; they are not repository-scoped or private to their creator.
In the OpenAI section of Settings > Provider Accounts:
- Choose the Default account used when an interactive session follows provider policy.
- Choose Unattended mode:
- Use default account makes Slack, GitHub, Linear, and unpinned automation runs use the subscription account.
- Use API key keeps unattended launches on the existing API-key path.
Defaults are resolved when a session starts. Changing them does not move a running session to a different paid account.
Choose an OpenAI model when creating a session and use the OpenAI authentication selector to
choose provider policy, a specific connected account, or Use API key. Account mode overrides
OPENAI_API_KEY for that session.
Automation editors expose the same choices for every subscription provider. Use defaults when each run starts resolves current policy for every run; selecting an account or API-key mode pins that choice for future runs.
The OpenAI device authorization result is encrypted with PROVIDER_ACCOUNTS_ENCRYPTION_KEY in the
control plane and is never exposed to the browser or sandboxes. A session stores the selected
account ID, not credential material. When the sandbox needs OpenAI access, its runtime plugin calls
the sandbox-authenticated POST /sessions/:id/provider-auth/openai/access-token endpoint. The
control plane refreshes and rotates the account credential and returns only short-lived access
material.
Children inherit their parent's pinned provider authentication. Disabling or archiving an account blocks future broker calls, but an access token already issued to a running sandbox remains usable until it expires.
Legacy scoped OAuth and provider accounts can coexist. Existing sessions retain their legacy binding. Add and verify provider accounts at any time, then set a provider default when new sessions should use that account. Defaults never move existing sessions. The settings page lists remaining legacy OAuth key locations; remove them only after dependent legacy-bound sessions are no longer needed. Older manually provisioned credentials continue to work, but new ChatGPT accounts should use the first-party device authorization flow in Settings. Do not copy the same rotating refresh token into both credential systems.
Ensure your deployment is up to date. OpenAI model support requires the latest version of Open-Inspect.
Confirm that the selected/default OpenAI account is active and the account is verified. If the
session explicitly uses API-key mode, confirm OPENAI_API_KEY is available in its secret scope.
The OAuth grant may have been revoked, expired, or rotated elsewhere. Use Reconnect on the existing account and complete the same device authorization flow. Reconnect preserves the account's display name and must authenticate the same OpenAI account identity; connect a new provider account if the identity changed.