# GPT-5.6 Codex compatibility kit

Version 1.0.0, published 2026-07-23.

This kit separates four questions that are often confused during troubleshooting:

1. Does the API key list `gpt-5.6-sol`, `gpt-5.6-terra`, and `gpt-5.6-luna`?
2. Does each selected model complete a minimal Responses API request?
3. Do streaming and strict function calls preserve their response contracts?
4. Can the installed Codex CLI complete a turn through the same custom provider?

The report contains a result for each layer, so a Codex-only failure is not mistaken for a
model-access or API failure.

## Safety and cost boundaries

- The script reads the API key only from an environment variable and never accepts it as a
  command-line argument. Before persistence, it redacts the exact key plus common `Bearer` and
  `sk-...` forms from every provider-controlled string field. Review the report before sharing it.
- Codex runs with a temporary `CODEX_HOME`, an empty temporary working directory, a read-only
  sandbox, no approvals, and a fixed prompt that forbids tool calls. It receives only the API key
  and an allowlist of runtime, locale, temporary-directory, proxy, and TLS environment variables.
  The temporary directory is removed after every run. Existing Codex configuration, rules, and
  sessions are not read or changed.
- Read-only sandboxing prevents writes; it does not make the no-tool prompt a security boundary for
  reads. The kit supplies no project path or source code, but use `--skip-codex` or an isolated
  container/VM if the machine has files that the Codex process must not be able to read.
- Direct requests use `store: false`, fixed markers, and small output limits. The kit does not
  intentionally supply source code or user-authored prompt content.
- Direct API retries and both Codex provider retry limits are set to zero. There is no intentional
  rate-limit test.
- API usage may still be billed. The default run makes five fixed direct generations plus one
  isolated Codex turn when Codex is installed. `--full` makes nine direct generations plus three
  Codex turns. A Codex turn can make another model request if the model ignores the no-tool
  instruction and starts a tool loop; the report marks that run as failed.
- The report includes the endpoint origin, model IDs, timestamps, request IDs, usage, and error
  messages. Review it before sharing; request IDs are not API keys but may be useful to support.

## Requirements

- Node.js 20 or newer
- An OmniaKey API key in `OMNIAKEY_API_KEY`
- Codex CLI on `PATH` for the end-to-end Codex check (optional)

## macOS and Linux

Download `check.mjs` and `run.sh` into the same directory. In Bash or Zsh, read the key without
putting its literal value in shell history, then run the check:

```bash
chmod +x run.sh
printf 'OmniaKey API key: ' >&2
IFS= read -r -s OMNIAKEY_API_KEY
printf '\n' >&2
export OMNIAKEY_API_KEY
./run.sh
unset OMNIAKEY_API_KEY
```

Run every streaming, function-tool, and Codex check:

```bash
./run.sh --full
```

Test only one model or skip Codex:

```bash
./run.sh --model gpt-5.6-terra --skip-codex
```

## Windows PowerShell

Download `check.mjs` and `run.ps1` into the same directory, then use a silent prompt:

```powershell
$secureKey = Read-Host 'OmniaKey API key' -AsSecureString
$env:OMNIAKEY_API_KEY = [System.Net.NetworkCredential]::new('', $secureKey).Password
.\run.ps1
Remove-Item Env:OMNIAKEY_API_KEY
$secureKey = $null
```

Full check:

```powershell
.\run.ps1 --full
```

## Options

```text
--base-url URL       Responses-compatible base URL
--api-key-env NAME   API-key environment variable (default: OMNIAKEY_API_KEY)
--model ID           Select a model; repeat the option to select several
--full               Deep-check every selected model
--skip-codex         Do not invoke Codex CLI
--timeout MS         Direct API timeout (default: 30000)
--codex-timeout MS   Codex timeout (default: 120000)
--output FILE        Write the sanitized report to this path
--help               Print built-in help
```

Exit code `0` means every executed check passed. Exit code `1` means at least one executed check
failed. Exit code `2` means the command line, key environment, or another prerequisite was invalid.
A skipped Codex check is visible in the report but does not by itself make the run fail.

## Interpreting a split result

| Result | Meaning | Next check |
| --- | --- | --- |
| `/models` fails with 401 | The endpoint rejected the credential | Generate or select the correct key; do not paste it into a bug report |
| A model is absent from `/models` | This key cannot currently select that model | Verify model access before changing Codex configuration |
| Direct Responses fails with 404 | The base path or model ID is wrong | Confirm that the base URL ends in `/v1` and use the exact model ID |
| Direct calls pass but Codex fails with a 400 mentioning Responses-Lite or `collaboration` | The API is reachable; Codex/provider metadata is the likely compatibility boundary | Record the Codex version and compare the open Codex issues linked in the article |
| 429 | A real request hit an assigned rate limit | Respect `retry-after` or reset headers; this kit does not retry automatically |
| 5xx | The provider failed while handling a valid request | Keep the request ID, wait briefly, and retry manually once |

## Report integrity

`report.schema.json` validates the report's structure, field types, allowed check IDs, and
pass/fail summary relationship. It cannot recompute the summary counts or prove that a report was
produced by an untampered run.

To verify the kit itself, download all five files listed in `SHA256SUMS` into the same directory as
the checksum file, then run:

```bash
shasum -a 256 -c SHA256SUMS
```

On Windows PowerShell, verify every listed file:

```powershell
Get-Content .\SHA256SUMS | ForEach-Object {
  if ($_ -notmatch '^([0-9a-f]{64})  (.+)$') { throw "Invalid checksum line: $_" }
  $expected = $Matches[1]
  $file = $Matches[2]
  $actual = (Get-FileHash -LiteralPath (Join-Path $PWD $file) -Algorithm SHA256).Hash.ToLowerInvariant()
  if ($actual -ne $expected) { throw "SHA-256 mismatch: $file" }
  Write-Host "OK  $file"
}
```

## Primary references

- GPT-5.6 guide: https://developers.openai.com/api/docs/guides/model-guidance?model=gpt-5.6
- Sol: https://developers.openai.com/api/docs/models/gpt-5.6-sol
- Terra: https://developers.openai.com/api/docs/models/gpt-5.6-terra
- Luna: https://developers.openai.com/api/docs/models/gpt-5.6-luna
- Codex configuration: https://developers.openai.com/codex/config-reference
- Codex provider authentication: https://learn.chatgpt.com/docs/auth#alternative-model-providers
- Codex issue 31870: https://github.com/openai/codex/issues/31870
- Codex issue 31882: https://github.com/openai/codex/issues/31882

The two GitHub issues are field reports, not API capability documentation. Both were still open
when this kit was published. Recheck their state and retest after every Codex upgrade.
