Using OpenAI Models
August 12, 2026 · View on GitHub
Open-Inspect supports OpenAI Codex models in addition to Anthropic Claude models. This guide covers how to configure your deployment to use them.
Note: This setup process is temporary and will be streamlined in a future release.
Supported Models
For the full model list, including Claude Fable 5 and other Anthropic models, see Available Models.
| Model | Description |
|---|---|
| GPT 5.4 | Flagship model |
| GPT 5.5 | Latest flagship model |
| GPT 5.3 Codex | Latest codex variant |
| GPT 5.3 Codex Spark | Lightweight Codex variant |
OpenAI models support reasoning effort levels: none, low, medium, high, and extra high (default: high for Codex models).
Setup
Step 1: Obtain OpenAI OAuth Credentials
You'll use OpenCode locally to authenticate with OpenAI and retrieve the required tokens.
- Install OpenCode if you haven't already
- Launch OpenCode:
opencode - Inside OpenCode, run
/connect setup - Select ChatGPT and complete the OAuth login flow in your browser
- After authenticating, open the credentials file:
cat ~/.local/share/opencode/auth.json - From the
openaisection, copy the values for:refresh— the refresh tokenaccountId— your ChatGPT account ID
Step 2: Add Secrets to Your Deployment
-
Go to your Open-Inspect web app's Settings page
-
Add the following repository secrets:
Secret Name Value OPENAI_OAUTH_REFRESH_TOKENThe refreshtoken from Step 1OPENAI_OAUTH_ACCOUNT_IDThe accountIdfrom Step 1
Step 3: Select an OpenAI Model
When creating a new session, choose any OpenAI model from the model dropdown. Sessions using OpenAI models will automatically use your configured credentials.
How It Works
Your refresh token is stored securely in the control plane and is never exposed to sandboxes. When a sandbox needs to make an OpenAI API call, it requests a short-lived access token from the control plane, which handles token refresh and rotation automatically. Only the temporary access token is present inside the sandbox.
Credentials are scoped per repository, so different repos can use different OpenAI accounts.
Troubleshooting
Model doesn't appear in the dropdown
Ensure your deployment is up to date. OpenAI model support requires the latest version of Open-Inspect.
Session fails to start with an OpenAI model
Verify that both OPENAI_OAUTH_REFRESH_TOKEN and OPENAI_OAUTH_ACCOUNT_ID are set in your
repository secrets (Settings page). The refresh token may have expired — repeat Step 1 to obtain
fresh credentials.
"Token refresh failed" errors
The OAuth refresh token may have been revoked or expired. Re-authenticate by repeating Step 1 and updating the secrets in your Settings page.