omp packages

pi-openai-codex-compat0.0.39

OpenAI Codex compatibility for Pi with native compaction, Fast and Ultrafast speeds, and Codex-optimized capabilities

GitHub Actions Published 5 days ago MIT ~5.6K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-openai-codex-compat

OpenAI Codex compatibility for Pi, combining Fast and Ultrafast speeds, native Codex compaction, and Codex-optimized model features in one Pi package.

Features

  • Request-level speed: keeps the canonical openai-codex provider id and models selected while adding service_tier: "priority" (Fast) or service_tier: "ultrafast" (Ultrafast) at the request boundary.
  • Native compaction: uses Codex remote_compaction_v2 for /compact, Pi threshold compaction, context-overflow recovery, and an optional percentage threshold.
  • Codex apply_patch: provides an optional patch tool with the Codex grammar, parser, fuzzy matcher, overwrite semantics, filesystem behavior, model-facing result format, structured history, and diff-oriented TUI rendering. Pi sends it as an OpenAI custom grammar tool when the model supports that protocol and as a normal function tool otherwise.
  • Codex command tools: replaces an active Pi bash tool with either the persistent exec_command + write_stdin pair or the one-shot shell_command tool. Unified exec is the default and supports optional PTY sessions through node-pty.
  • Opt-in patch diagnostics: records failed apply_patch requests with pre-execution text snapshots or binary metadata for every instruction, outcomes, and Pi/Codex identifiers.
  • Standalone image generation: exposes Pi's dotted image_gen.imagegen tool as a native Responses namespace and executes generation or edits through the Codex Images endpoints.
  • Standalone web search: exposes Pi's dotted web.run tool as a native Responses namespace and executes search and browsing through Codex alpha/search.
  • Dedicated Codex tool UI: renders command tools, apply_patch, image_gen.imagegen, and web.run on a shared configurable surface with compact summaries and Ctrl+O expansion.
  • Hosted web-search fallback: injects native web_search only when web.run is inactive, with cached, indexed, or live modes.
  • Native request controls: configures Responses API text verbosity and reasoning summaries.
  • Draft settings pane: /codex-settings stages edits before applying them. Apply to session stores them with the session without changing configuration files. Ctrl+S saves and applies them. Escape discards only unapplied drafts.
  • Session-aware footer: shows the current Pi session ID on the first line and appends non-default Codex request modes to the model side of Pi's normal second line.

Pi provides the Codex OAuth flow and model catalog. At session start, this package overrides the built-in openai-codex runtime under the same provider id so ordinary responses and remote compaction share one transport, parser, native-history store, and sticky WebSocket session.

Requirements

  • Node.js 22.19 or newer
  • Pi >=1.7.0 <1.8.0
  • An OpenAI Codex login in Pi

Restart Pi after upgrading its runtime. /reload reloads extensions but cannot upgrade the running Pi process. At load time, the extension requires the host's transcript APIs, the Pi 0.99 APIs SessionManager.getEntryCount() and ExtensionAPI.getSettings(), and a reported Pi version of at least 1.7.0. It refuses to load otherwise. The load check does not reject newer releases: the <1.8.0 bound is the package's peer range, which Pi does not enforce when it installs packages. PI_PACKAGE_DIR can point an older executable at newer package metadata, so the reported version alone does not establish compatibility. The API checks detect missing capabilities from before Pi 0.99. They do not distinguish a Pi 0.99 executable from Pi 1.7.0 when its metadata points at the newer installation.

Authenticate through Pi if needed:

/login openai-codex

The extension sets up each session when Pi starts it (session_start). A prompt or compaction that starts earlier, such as a prompt sent while another extension is still starting, waits until that setup is done. Pi's interactive, print, JSON, and RPC modes start every session. An SDK host must call session.bindExtensions(), also after replacing the session. Without it, Pi never starts the session for extensions, and a prompt waits forever.

Pi's virtual models are not supported. The package's features check the selected model, not the model that answers a request. Pi's experimental virtual models, registered with pi.registerVirtualModel(), stay selected while Pi routes each request to a physical model. With a virtual model selected, the package deactivates its tools, omits the speed and the other request controls, and leaves compaction and output-limit continuation to Pi. This holds even for a virtual model listed under openai-codex or one that routes every request to an openai-codex model. Routed openai-codex requests still use the package's transport. Select an openai-codex model directly to use the package's features.

Compatibility baseline and differences

The compatibility baseline is official Codex CLI 0.149.1, released August 24, 2026, at commit ff29a44391deccde0aba0f8390337d7f3c319ea4. It retains the 0.147.0 Responses Lite contract that groups direct function and custom declarations into one canonical functions namespace for namespace-capable providers. The 0.148.0–0.149.0 review adopted typed misalignment-policy failures while recording official unbounded connection recovery as an intentional bounded-transport deviation. The 0.149.1 review retained this package's checkpoint shape rather than exposing official Codex's new default-disabled retained-image budget. The official release compatibility log is the canonical release-by-release record of protocol and apply_patch alignment, intentional deviations, and excluded runtimes. This section is the package's user-facing compatibility contract. See the Responses Lite compatibility report and Codex caching and transport comparison for detailed request-path findings and live cache trajectories.

Configurable defaults that differ from Codex

Area This package by default Official Codex Configuration
Generated-image detail sent back to the model Sends image tool-result content with input_image.detail: "auto". On GPT-5.6, auto uses original-size image accounting. Uses high. imageDetail: auto, low, high, or original.
Image-generation tool Enabled whenever an openai-codex model is selected. Backend capability and account failures surface when the tool executes. Stable and enabled by default, but additionally gated by plan, model, provider, authentication, image-generation, and namespace capabilities. imageGeneration: boolean.
Standalone web.run Disabled by default; when enabled, preferred over hosted web_search and sent with the complete reserved schema and description. Enabled by default for gpt-5.6-sol through Responses Lite; otherwise subject to standalone-search feature and runtime gates. webRun: boolean.
Hosted web search Disabled by default; when enabled, injected only for ordinary Responses while web.run is inactive. Responses Lite omits hosted tools. Omitted for gpt-5.6-sol while standalone web.run is available; otherwise defaults to cached mode when hosted search is supported. webRun and webSearch: disabled, cached, indexed, or live.
Coding mutation tools Enables apply_patch and suppresses Pi's active edit and write tools. Chooses its tool surface from model metadata and runtime capabilities; there are no Pi edit or write tools to suppress. applyPatch: boolean.
Command tools Replaces an active Pi bash tool with exec_command and write_stdin. Chooses unified exec or legacy shell from model metadata, platform, execution environment, and runtime capabilities. shellTool: unified_exec or shell_command.
apply_patch debug output Disabled; collapsed results show the normal visual summary and instruction rows. Not applicable to Pi's tool-result renderer. applyPatchDebug: boolean.
apply_patch diagnostics capture Disabled; no separate request or filesystem snapshot artifacts are retained. Codex owns its rollout diagnostics rather than writing this package's artifact format. applyPatchDiagnostics: boolean.
Codex tool background Uses a subtle theme-derived surface for extension-owned Codex tools. Uses Codex's own TUI activity cells rather than Pi tool rows. toolBackground: subtle, status, or none.
Auto-compaction trigger Relies on Pi's reserve-token threshold unless a percentage is configured. Tracks Codex's model/token-budget state before and between sampling steps. autoCompactAtPercent: percentage or unset. Mid-response percentage boundaries use Pi's bounded compact-and-continue lifecycle, so Pi auto-compaction must remain enabled.
Speed Uses the Standard tier. Uses the configured Codex service tier when the model's catalog entry offers it. speed: standard, fast, or ultrafast, and speedByModel for individual models.
Responses Lite Disabled; supported models use ordinary Responses. Enabled according to Codex model metadata. responsesLite: boolean; true enables Responses Lite.
Text and reasoning request controls Sends low text verbosity and automatic reasoning summaries, and omits reasoning.mode, which the Codex endpoint rejects. Models with mid-conversation effort, such as GPT-6 and GPT-6.2, send the first reply's thinking level as reasoning.effort and later changes as configuration_update input items, as Pi AI's Codex adapter and official Codex do, so a change keeps the prompt cache. Off is sent as effort none. Resolves these controls through Codex configuration, model metadata, and turn state. textVerbosity and reasoningSummary.

web.run is a reserved GPT-5.6 tool name. Its declaration therefore reproduces the complete current Codex post-normalization SearchCommands schema and official tool description instead of using Pi's normal compact tool schema. This intentionally omits generated annotations such as format and minimum that Codex removes before sending the declaration to Responses.

Non-configurable implementation differences

Area Difference
Session storage Pi remains the canonical session owner. Opaque Codex compaction checkpoints are stored in Pi compaction entries, otherwise lossy Responses output is stored in sparse custom native-response entries, and each change to the tools a turn request sends is stored in a custom request-tools entry. Official Codex owns a rollout/thread store directly.
Branching Checkpoints and native response overrides follow Pi's active session branch. Official Codex uses its own thread, turn, rollback, fork, and context-window lineage.
Model switching This package rejects model switches while the active Pi branch contains a native Codex checkpoint because the checkpoint is model-specific.
System instructions Send the leading Pi system message as the prompt, as Pi AI's Codex adapter and official Codex do: the first developer message in input, after additional_tools on Responses Lite models, and no top-level instructions. From GPT-6.2 on, Codex places instructions after input, so the prompt would miss the cache on every turn. The payload other extensions receive in before_provider_request still carries the prompt in instructions, and the package moves it when sending. Later Pi system messages (/reload, section changes) travel inline as developer items on models that accept mid-conversation system messages and collapse into the leading prompt otherwise. Request history is rebuilt from the stored session, and system messages that another extension adds to only one request, such as pi-compact-assistant instructions, are inserted after the stored message they follow. A forced prompt replaces the leading message. Compaction snapshots and resumed sessions lead with Pi's replayed prompt without rewriting old checkpoints.
Dynamic tool declarations Send the complete current tool set, replayed from Pi's toolsAdded and toolsRemoved system messages, in the top-level tools field on every request, as the official Codex client does. Tool declarations never travel inside input: inline additional_tools items and synthetic tool-search pairs made the Codex backend unreliable about which tools exist. A mid-session tool change costs one prompt-cache miss, and native checkpoints need no declaration rebase.
Turn metadata Requests send a persisted installation id plus Pi-derived session, thread, context-window, source, sandbox, request-kind, and nested compaction-operation metadata in client_metadata and compatible headers. The in-memory context-window number advances after successful compaction. Requests carry no turn id, unlike official Codex: Codex answers a burst of requests that carry one, such as ten turns in 25 seconds, with HTTP 429 turn_rate_limit_exceeded. First-party requests also carry Codex's model-and-tier routing hint. The provider captures the server-issued x-codex-turn-state once per agent run, replays it on WebSocket retries, SSE requests, and WebSocket-to-SSE fallback, and records all identity values in transport diagnostics. Pi does not reconstruct prior window number after extension reload/session resume or reproduce workspace Git/parent/subagent/Code Mode metadata. Each marked Pi tree branch receives its own persisted thread UUID.
Cache preparation Before the first cache-enabled WebSocket turn, the package prewarms only the stable instruction/tool prefix: ordinary Responses sends the developer prompt as its only input, while Responses Lite uses additional_tools plus the developer prompt. The first generated request then contributes only dynamic conversation input to the continuation. No explicit prompt-cache breakpoints are added.
Mid-turn compaction Provider-boundary percentage compaction preserves a successful end_turn:false prefix as its own Pi assistant message, installs a checkpoint, and continues without synthetic model input. Pi threshold compaction normally runs after the agent response; after Codex output-token truncation, the extension queues a hidden continuation so threshold compaction completes before sampling resumes. Official Codex owns this sampling and compaction loop directly.
Provider-owned follow-up Completed responses with end_turn: false continue immediately from completed native output without synthetic user input. Retryable response.failed and all response.incomplete events are resampled with the official five-retry stream budget, preserving completed output and cumulative usage while excluding unfinished attempt content. A max_output_tokens response that exhausts this budget still becomes Pi stopReason: "length" and uses the extension's unbounded host-level continuation recovery.
Transport recovery WebSocket failures before model-visible output receive five fresh-connection retries before sticky SSE fallback; SSE transport failures receive five retries. Official Codex 0.149.1 separately retries sampling connection-establishment failures indefinitely with delays capped at 60 seconds. The package remains bounded because Fetch does not expose Reqwest's narrower connection-error category, and a phase-only approximation could indefinitely repeat requests that reached the server.
Compaction lifecycle events Pre-turn percentage compaction writes through Pi's mutable session manager and cannot emit Pi's internal session_compact event through the public extension API. Mid-response percentage boundaries and manual, threshold, or overflow compactions initiated by Pi emit the normal lifecycle.
Header hooks An internal percentage-compaction request reuses the already transformed provider headers. It cannot independently rerun Pi's before_provider_headers hook.
Native retained context Deliberately differs from current Codex. The package retains recent user messages under a text-only 64k budget before the opaque compaction item, and keeps every developer and system message in place outside that budget so prompt updates are never compacted away. Current Codex applies a second installed-history filter that drops developer/system wrappers and non-real-user messages, can retain eligible structured agent commentary, and trims oversized function outputs before compaction. Codex 0.149.1 also adds a default-disabled mode that charges retained images to the budget and keeps each image with adjacent harness labels as an atomic boundary unit. Pi keeps its existing checkpoint shape by design.
Tool namespaces Responses Lite groups Pi's ordinary function/custom declarations into upstream's canonical functions namespace and maps that default namespace back to bare Pi names. Pi registers dotted names such as web.run as exact flat identifiers, so the provider converts only the fixed extension-owned allowlist into non-default Responses namespace/member identities and rejects unknown or ambiguously flat namespaced calls.
Capability gating Tool activation is based on the selected openai-codex provider plus package settings. It does not reproduce every official model-metadata, plan, feature-stage, executor, mode, or account gate.
Sandbox and approvals Pi extensions run with full process permissions. Command tools, apply_patch, local image reads, generated-image writes, and sibling Codex endpoints do not use Codex's sandbox, permission-profile, environment, or approval lifecycle.
Image tool instructions The package retains the server-reserved image-generation schema while replacing Rust-specific path annotations and Codex Code Mode instructions with model-facing descriptions, a prompt snippet, and system-prompt guidelines. Image-count bounds and selector exclusivity are enforced before execution.
Image artifact hint When image saving succeeds, this package always returns the path hint, says “the generated image,” and has no 1,024-byte cutoff. Official Codex says “a generated image” and omits the hint when it exceeds 1,024 UTF-8 bytes.
Image artifacts Generated files use Pi's agent directory and the Pi session/tool-call IDs. Official Codex uses its own artifact/output-directory lifecycle.
Web references web.run structured results are retained branch-locally in Pi tool-result details rather than Codex extension events, and hosted native items are preserved for provider replay. Reference IDs are resolved remotely by alpha/search, as in Codex. Hosted citation annotations remain a separate unimplemented path.
UI Pi renders its own conversation, footer, settings pane, branches, and compaction lifecycle. Extension-owned Codex tools have dedicated Pi renderers, but do not reproduce Codex app-server WebSearchItem or image-generation lifecycle notifications.

Nested compaction metadata uses the official Responses Compaction v2 implementation and memento strategy. Manual compaction is user-requested and standalone; threshold and provider-boundary compaction are automatic context-limit operations in the pre-turn phase; overflow recovery is the corresponding mid-turn operation.

When a finalized user prompt creates a new /tree branch, the extension inserts a hidden, context-free custom marker as that prompt's parent. Navigation alone writes nothing. The marker is hidden by Pi's default, no-tools, and user-only tree filters and appears only in the all-entries filter. Root session_id and prompt_cache_key remain stable, while the branch gets a UUID thread_id, forked_from_thread_id, and thread-scoped window number. Switching threads closes the old WebSocket and discards its incompatible previous_response_id baseline; the new full-history request remains eligible to reuse the common backend-cached prefix under the unchanged cache key.

Tool and runtime coverage

The package implements the Codex-specific pieces that fit a provider compatibility extension:

  • native Responses transport and history;
  • remote compaction v2;
  • exec_command, write_stdin, and shell_command;
  • apply_patch;
  • hosted web_search;
  • web.run;
  • image_gen.imagegen;
  • namespaced tool serialization;
  • text verbosity, reasoning summaries/mode, and the priority and ultrafast service tiers.

The following official Codex facilities are not exact equivalents in this package:

Official Codex facility Pi/package behavior
view_image Pi read already accepts images; no canonical view_image alias is registered.
update_plan, request_user_input, permissions, and environment tools Not implemented by this package.
send_user_message_async Not implemented; Pi owns visible assistant output and user-message history, while this package does not own Codex's asynchronous message-injection lifecycle.
Context-window and clock tools Not implemented. Compaction remains host/provider managed rather than model managed.
MCP resources and dynamic MCP tools Pi does not provide this package with Codex's MCP runtime.
Plugin/connector installation Not implemented; package installation remains an explicit Pi/user operation.
Searchable tool_search catalog This package declares every tool at the top level and does not implement Codex's searchable deferred-tool catalog and ranking runtime.
Multi-agent V1/V2 coordination Out of scope; no Codex agent tree, mailbox, task-path, or fork-depth runtime is implemented.
JavaScript Code Mode and yielded cells Out of scope; no V8 isolate, nested tool namespace, cell storage, or wait lifecycle is implemented.
Goals, memories, and remote skill-resource tools Not implemented; Pi's sessions, files, and native skills remain separate systems.
Remote/deferred execution environments Not implemented.

Each tool declares Pi tool annotations, which permission extensions can use to decide which calls to confirm:

Tool Read-only Destructive Open world
exec_command, write_stdin, shell_command No Yes Yes
apply_patch No Yes No
image_gen.imagegen No No Yes
web.run Yes n/a Yes

None of the tools is idempotent. Pi does not verify annotations.

The provider passes every event of a turn request, over WebSocket and SSE, to Pi's provider_stream_event hook as the server sent it. Forwarding happens before the transport drops WebSocket response.metadata events, renames response.done to response.completed, or turns an error event into a failed turn. Prewarm and remote compaction requests are not forwarded. Pi reports a failing hook handler and continues the turn. When an SDK caller passes its own onProviderStreamEvent callback and it throws, the turn ends with an error without a WebSocket retry or the SSE fallback.

See OFFICIAL_CODEX_CLI_TOOL_CATALOG.md for the complete researched Codex tool inventory, and CUSTOM_CODEX_PROVIDER_WEB_REFERENCES.md for the unimplemented citation/reference design.

Install

From npm after a release is published:

pi install npm:pi-openai-codex-compat

From a local checkout:

pi install .

For a temporary development run:

pi --no-extensions -e .

Speed

Keep using an openai-codex model and choose a Default speed in /codex-settings:

  • standard sends no service tier.
  • fast adds service_tier: "priority".
  • ultrafast adds service_tier: "ultrafast".

The extension adds the tier to ordinary and native-compaction requests without introducing another provider id or changing the selected model.

The ChatGPT plan decides which models get each speed. Ultrafast covers GPT-6.2 Sol and Astra, GPT-6 Astra, and GPT-6.1 Sol: Pro $200 includes it only for GPT-6.2 Sol, and Pro $500 and eligible Enterprise and Edu workspaces include it for all four. Plus, Pro $100, and Business do not include it. Codex accepts a tier the plan lacks and silently answers at Standard speed, so the extension checks the account's model catalog first, as the Codex CLI does. The catalog is the Codex backend's /codex/models list, and it names the tiers the signed-in account has on each model. A request keeps its tier only when the catalog lists it for the model. Otherwise the request runs, and is priced, at Standard, and a warning names the model once per session.

The extension loads the catalog when a session starts with an openai-codex model and before the first Fast or Ultrafast request. After five minutes it reloads the catalog in the background, and the previous catalog answers requests until the new one arrives. When a response reports that the catalog changed, through the x-models-etag header, the next request waits for the new catalog. The extension keeps each account's latest catalog in openai-codex-compat-model-catalog.json in the Pi agent directory, keyed by a hash of the account id. When the catalog cannot be loaded and none was kept, Fast stays on, as the Codex CLI's built-in catalog allows, and Ultrafast runs at Standard until the catalog loads. A failed load is retried after 30 seconds.

The speedByModel setting gives individual models their own speed. It maps a model id to standard, fast, or ultrafast, and only the JSON configuration files set it. A model's entry replaces the default speed, whether the default comes from a file, the environment, or /codex-settings. Other models keep the default speed. For example, the following configuration requests Ultrafast on GPT-6.2 Sol, where every plan with Ultrafast includes it, and Fast on every other model:

{
  "speed": "fast",
  "speedByModel": { "gpt-6.2-sol": "ultrafast" }
}

With speed set to ultrafast instead, every model the plan includes Ultrafast for gets it, and the others run at Standard.

The Default speed row in /codex-settings edits only speed. Its description names the selected model's speedByModel entry, and says when the plan lacks the model's speed. The footer shows the tier that requests to the selected model use.

Pi's usage totals report the tier's API price, including when Codex echoes service_tier: "default" in its response, which it does for every tier. Fast costs 2 times the Standard rate. Ultrafast costs 6 times the Standard rate, and GPT-6.2 models cost 3 times the Standard rate through February 28, 2027, Pacific time.

Configuration

Create a global configuration file at:

~/.pi/agent/openai-codex-compat.json

The extension also creates openai-codex-compat-installation-id in the active Pi agent directory. It contains the stable UUID used for official Codex installation metadata and is reused across sessions. openai-codex-compat-model-catalog.json in the same directory keeps each account's model catalog; see Speed.

A trusted project can override it at:

<project>/.pi/openai-codex-compat.json

Each session inherits the effective file-backed settings. /codex-settings uses the same interaction contract as /anthropic-settings:

  • Enter changes the selected value or opens its editor. It never implicitly saves.
  • Space activates a result or inserts a space when search has focus.
  • Tab / Shift+Tab move between search, results, and action controls.
  • F1 opens scrollable details, full errors, and the exact save target.
  • Edits remain drafts until explicitly applied or saved.
  • Apply to session applies drafts without writing configuration files and stays open.
  • Ctrl+S saves and applies changes without closing.
  • Save and close saves and applies changes, then closes on success.
  • Escape cancels a field editor or discards unapplied drafts and closes the main menu. It does not undo settings already applied to the session.

Search matches labels, configuration keys, and descriptions. The percentage editor supports presets and custom fractional values. Use inherited value removes an override. This differs from Pi default, which explicitly disables an inherited percentage trigger. Rows show configuration sources, environment locks, and model applicability. Pi's remapped selection and cancel keys are respected.

The global file is the normal save target. An existing trusted project override is the target for that project. The target stays fixed while the menu is open. Saving changes only edited overrides, preserves unknown keys and inherited values, and preserves non-conflicting external edits. Conflicting edits are rejected for review. Opening or closing without changes does not create a configuration file. Reopening shows active session values, not freshly read file values. * marks an unapplied draft. ~ marks an active session override or a value that differs from the saved configuration. Details shows the saved value when it differs. Ctrl+S also persists changes previously applied only to the session. Session settings are stored as extension state entries in the Pi session, outside model context. They survive menu closure, tree navigation, extension reload, process restart, and switching away and back. Resuming the same session restores its settings before provider operations. A new session, fork, or clone has a separate identity and starts from configuration files. Pi's --no-session mode cannot be resumed after exit. Pi also defers creating a new session file until its first assistant message. Environment-controlled fields remain locked and take precedence over restored session preferences. Their values are not copied into session settings.

Applying and saving wait for Pi to become idle. Collect pending output with write_stdin or stop running command sessions through /ps before applying or saving a command-tool switch. Browsing settings and discarding drafts never terminate those sessions. Escape cancels a pending operation without discarding the draft. Failures leave the menu open. If a save reaches disk but cannot be applied to the session, the menu reports that distinction and Ctrl+S retries application. Cooperating writers use a .settings-lock file. An interrupted writer can leave a lock that requires review; locks are not automatically deleted. External editors do not participate in that lock. Session overrides retain their original conflict checks across menu reopenings. Conflicting external edits remain protected after reload or restart.

The effective settings are printed once when a TUI session starts. The footer shows the current Pi session ID alongside the working directory and optional session name. It shows fast or ultrafast when requests to the selected model use that tier, after any speedByModel entry for the model, and shows text verbosity or reasoning summary only when they differ from their defaults.

Example:

{
  "speed": "fast",
  "speedByModel": { "gpt-6.2-sol": "ultrafast" },
  "responsesLite": true,
  "toolBackground": "subtle",
  "shellTool": "unified_exec",
  "applyPatch": true,
  "applyPatchDebug": false,
  "applyPatchDiagnostics": false,
  "imageGeneration": true,
  "imageDetail": "auto",
  "webRun": false,
  "autoCompactAtPercent": 90,
  "webSearch": "disabled",
  "textVerbosity": "low",
  "reasoningSummary": "auto"
}

Defaults:

Setting Values Default Behavior
speed standard, fast, ultrafast standard The default speed. Adds service_tier: "priority" (fast) or service_tier: "ultrafast" (ultrafast) to requests whose model has the tier in the account's model catalog, while retaining the current openai-codex provider and model. See Speed.
speedByModel object of model id to standard, fast, ultrafast {} Replaces the default speed for each listed model. Only JSON files set it. A project entry replaces the global entry for the same model. See Speed.
responsesLite boolean false Uses Codex's Responses Lite input envelope on supported models when enabled. By default, those models use ordinary Responses instructions and tools.
toolBackground subtle, status, none subtle Controls the shared self-rendered background for command tools, apply_patch, image_gen.imagegen, and web.run. status uses Pi's pending/success/error backgrounds; none keeps the custom layout transparent.
shellTool unified_exec, shell_command unified_exec Selects the command surface on openai-codex models. The selected Codex command surface replaces Pi bash only when bash was active.
applyPatch boolean true On selected openai-codex models, uses the extension's apply_patch tool instead of Pi's active edit and write tools. Other providers always use their normal Pi tool set.
applyPatchDebug boolean false Shows the exact model-facing tool result while a completed apply_patch result is collapsed. Expanded results continue to show the normal visual summary and complete diffs.
applyPatchDiagnostics boolean false Persists failed patch requests with pre-execution text snapshots or binary metadata for every instruction, outcomes, and trace identifiers. See apply_patch for storage and sensitivity details.
imageGeneration boolean true Enables the extension-owned image_gen.imagegen tool on selected openai-codex models.
imageDetail auto, low, high, original auto Sets input_image.detail when an image tool result is sent back to the model. It does not change gpt-image-2 generation quality.
webRun boolean false Enables the extension-owned web.run tool on selected openai-codex models. When active, it replaces hosted web_search in the Responses tool list.
autoCompactAtPercent number greater than 0 and at most 100, or null unset Adds provider-boundary compaction independently of Pi's normal reserve-token threshold. Mid-response boundaries require Pi auto-compaction. A project value of null disables a global percentage threshold.
webSearch disabled, cached, indexed, live disabled Controls hosted search and standalone-search external access. disabled removes hosted search but leaves an independently enabled web.run in cached-only mode; indexed prefers indexed content; live permits live external access.
textVerbosity low, medium, high low Sets Responses API text.verbosity.
reasoningSummary auto, concise, detailed, off auto Sets reasoning.summary when reasoning is enabled; off omits the summary parameter.

Responses Lite supports exactly gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-6.1-sol, gpt-6.1-terra, gpt-6.2-sol, and gpt-6.2-astra. It remains opt-in.

Invalid JSON setting values are ignored and invalid JSON does not prevent Pi from starting. The settings pane reports malformed JSON instead of overwriting it. Project configuration is read only when the project is trusted.

Every setting except speedByModel can also be overridden for one Pi process with an environment variable:

Setting Environment variable
speed PI_OPENAI_CODEX_COMPAT_SPEED
responsesLite PI_OPENAI_CODEX_COMPAT_RESPONSES_LITE
toolBackground PI_OPENAI_CODEX_COMPAT_TOOL_BACKGROUND
shellTool PI_OPENAI_CODEX_COMPAT_SHELL_TOOL
applyPatch PI_OPENAI_CODEX_COMPAT_APPLY_PATCH
applyPatchDebug PI_OPENAI_CODEX_COMPAT_APPLY_PATCH_DEBUG
applyPatchDiagnostics PI_OPENAI_CODEX_COMPAT_APPLY_PATCH_DIAGNOSTICS
imageGeneration PI_OPENAI_CODEX_COMPAT_IMAGE_GENERATION
imageDetail PI_OPENAI_CODEX_COMPAT_IMAGE_DETAIL
webRun PI_OPENAI_CODEX_COMPAT_WEB_RUN
autoCompactAtPercent PI_OPENAI_CODEX_COMPAT_AUTO_COMPACT_AT_PERCENT
webSearch PI_OPENAI_CODEX_COMPAT_WEB_SEARCH_MODE
textVerbosity PI_OPENAI_CODEX_COMPAT_TEXT_VERBOSITY
reasoningSummary PI_OPENAI_CODEX_COMPAT_REASONING_SUMMARY

Environment variables have the highest precedence: defaults < global JS