Config Fields

July 17, 2026 · View on GitHub

This document summarizes the current config fields that matter for oc-codex-multi-auth.

Top-Level Fields

plugin

Use the plain package name in OpenCode config:

{
  "plugin": ["oc-codex-multi-auth"]
}

The installer normalizes to this unpinned value on purpose.

model

Sets the default selected model. Compact modern installs use base IDs plus OpenCode variants:

{
  "model": "openai/gpt-5.5"
}

With --full or --legacy, explicit preset IDs also work:

{
  "model": "openai/gpt-5.5-medium"
}

provider.openai.options

These are the global defaults the plugin receives for every OpenAI request.

Common fields:

FieldPurpose
reasoningEffortdefault reasoning depth
reasoningSummaryreasoning summary style
textVerbosityoutput verbosity
includeextra response fields, typically reasoning.encrypted_content
storemust stay false for this plugin

Example:

{
  "provider": {
    "openai": {
      "options": {
        "reasoningEffort": "medium",
        "reasoningSummary": "auto",
        "textVerbosity": "medium",
        "include": ["reasoning.encrypted_content"],
        "store": false
      }
    }
  }
}

provider.openai.models

This field differs slightly between the modern and legacy shipped templates.

Modern template fields

Modern templates define 12 base model families and expose 53 presets through variants.

Example:

{
  "provider": {
    "openai": {
      "models": {
        "gpt-5.5": {
          "name": "GPT 5.5 (OAuth)",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "variants": {
            "none": { "reasoningEffort": "none" },
            "medium": { "reasoningEffort": "medium" },
            "xhigh": { "reasoningEffort": "xhigh" }
          }
        },
        "gpt-5.6-sol": {
          "name": "GPT 5.6 Sol (OAuth)",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "variants": {
            "low": { "reasoningEffort": "low" },
            "medium": { "reasoningEffort": "medium" },
            "high": { "reasoningEffort": "high" },
            "xhigh": { "reasoningEffort": "xhigh" },
            "max": { "reasoningEffort": "max" },
            "ultra": { "reasoningEffort": "ultra" }
          }
        }
      }
    }
  }
}

Important fields:

FieldPurpose
model key (gpt-5.5, gpt-5.6-sol, …)base model family exposed to OpenCode
namehuman-readable picker label
limitcontext/output metadata shown to OpenCode
modalitiesallowed input/output types
variantsreasoning/verbosity presets selected with --variant
optionsper-model defaults when needed

If your OpenCode release exposes bare base entries, modern selection looks like:

opencode run "task" --model=openai/gpt-5.5 --variant=high
opencode run "task" --model=openai/gpt-5.6-sol --variant=medium

Legacy template fields

Legacy templates expose each preset as its own model key (53 explicit entries).

Example:

{
  "provider": {
    "openai": {
      "models": {
        "gpt-5.5-high": {
          "name": "GPT 5.5 High (OAuth)",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "reasoningEffort": "high",
            "reasoningSummary": "detailed",
            "textVerbosity": "medium",
            "include": ["reasoning.encrypted_content"],
            "store": false
          }
        }
      }
    }
  }
}

Legacy selection example:

opencode run "task" --model=openai/gpt-5.5-high

Model Normalization

The plugin normalizes selected model IDs before the upstream API call.

Examples:

Selected modelEffective upstream family
openai/gpt-5.5 + variant mediumgpt-5.5
openai/gpt-5.5-mediumgpt-5.5
openai/gpt-5.6-sol + variant highgpt-5.6-sol
openai/gpt-5.6-sol-xhighgpt-5.6-sol
openai/gpt-5.6gpt-5.6-sol
openai/gpt-5.6-terra-mediumgpt-5.6-terra
openai/gpt-5.6-luna-maxgpt-5.6-luna
openai/gpt-5.4-mini-xhighgpt-5.4-mini
openai/gpt-5.1-codex-highgpt-5.1-codex
openai/gpt-5-minigpt-5.4-mini
openai/gpt-5-nanogpt-5.4-nano

This normalization is why legacy aliases and snapshot-like IDs can still route to a stable family while preserving the user-facing config surface. GPT-5.6 tiers also trigger the responses-lite request shape after normalization.

Plugin Runtime Config

Path: ~/.opencode/openai-codex-auth-config.json

Defaults come from lib/config.ts / lib/schemas.ts. Environment overrides win over file values. Boolean env values are truthy only for "1".

FieldDefaultEnv overridePurpose
codexModetrueCODEX_MODELegacy bridge prompt behavior when requestTransformMode=legacy
requestTransformModenativeCODEX_AUTH_REQUEST_TRANSFORM_MODEnative preserves host payload; legacy rewrites for older SDKs
codexTuiV2trueCODEX_TUI_V2Codex-style terminal UI output
codexTuiColorProfiletruecolorCODEX_TUI_COLOR_PROFILEtruecolor / ansi256 / ansi16
codexTuiGlyphModeasciiCODEX_TUI_GLYPHSascii / unicode / auto
maskEmailfalseCODEX_TUI_MASK_EMAILMask account emails on display surfaces
maskEmailInQuotaDetailsfalseCODEX_TUI_MASK_EMAIL_DETAILSAlso mask email in quota details
beginnerSafeModefalseCODEX_AUTH_BEGINNER_SAFE_MODEConservative retries and recovery
fastSessionfalseCODEX_AUTH_FAST_SESSIONForce low-latency reasoning/verbosity
fastSessionStrategyhybridCODEX_AUTH_FAST_SESSION_STRATEGYhybrid or always
fastSessionMaxInputItems30CODEX_AUTH_FAST_SESSION_MAX_INPUT_ITEMSMax input items kept in fast mode
rotationStrategyhybridCODEX_AUTH_ROTATION_STRATEGYhybrid, sticky, or round-robin account selection
modelAccountPools{}(file only)Preferred stable account IDs per effective model
retryProfilebalancedCODEX_AUTH_RETRY_PROFILEconservative / balanced / aggressive
retryBudgetOverrides{}(file only)Per-class budget overrides
retryAllAccountsRateLimitedtrueCODEX_AUTH_RETRY_ALL_RATE_LIMITEDWait/retry when every account is limited
retryAllAccountsMaxWaitMs0CODEX_AUTH_RETRY_ALL_MAX_WAIT_MSMax wait ms (0 = unlimited)
retryAllAccountsMaxRetriesInfinityCODEX_AUTH_RETRY_ALL_MAX_RETRIESMax all-account retries
unsupportedCodexPolicystrictCODEX_AUTH_UNSUPPORTED_MODEL_POLICYstrict or fallback
fallbackOnUnsupportedCodexModelfalseCODEX_AUTH_FALLBACK_UNSUPPORTED_MODELLegacy fallback toggle
fallbackToGpt52OnUnsupportedGpt53trueCODEX_AUTH_FALLBACK_GPT53_TO_GPT52Legacy 5.3→5.2 edge
unsupportedCodexFallbackChain{}(file only)Per-model fallback chain overrides
tokenRefreshSkewMs60000CODEX_AUTH_TOKEN_REFRESH_SKEW_MSRefresh tokens this many ms before expiry
rateLimitToastDebounceMs60000CODEX_AUTH_RATE_LIMIT_TOAST_DEBOUNCE_MSDebounce rate-limit toasts
toastDurationMs5000CODEX_AUTH_TOAST_DURATION_MSToast visibility duration
perProjectAccountstrueCODEX_AUTH_PER_PROJECT_ACCOUNTSProject-scoped account pools
sessionRecoverytrueCODEX_AUTH_SESSION_RECOVERYAuto-recover common API errors
autoResumetrueCODEX_AUTH_AUTO_RESUMEAuto-resume after thinking-block recovery
autoUpdatetrueCODEX_AUTH_AUTO_UPDATEDaily npm update check + cache refresh
parallelProbingfalseCODEX_AUTH_PARALLEL_PROBINGConcurrent account health probes
parallelProbingMaxConcurrency2CODEX_AUTH_PARALLEL_PROBING_MAX_CONCURRENCYMax concurrent probes (1–5)
emptyResponseMaxRetries2CODEX_AUTH_EMPTY_RESPONSE_MAX_RETRIESRetries after empty SSE bodies
emptyResponseRetryDelayMs1000CODEX_AUTH_EMPTY_RESPONSE_RETRY_DELAY_MSDelay between empty-response retries
pidOffsetEnabledfalseCODEX_AUTH_PID_OFFSET_ENABLEDSmall PID-based hybrid score offset for multi-process spread
fetchTimeoutMs60000CODEX_AUTH_FETCH_TIMEOUT_MSUpstream fetch timeout
streamStallTimeoutMs45000CODEX_AUTH_STREAM_STALL_TIMEOUT_MSSSE stall abort timeout

modelAccountPools

The plugin runtime config can map effective model IDs to preferred stable account IDs:

{
  "modelAccountPools": {
    "gpt-5.6-sol": ["org-example-account-id"],
    "gpt-5.5": ["org-another-account-id"]
  }
}

The request pipeline resolves the pool after model normalization. All rotation strategies restrict selection to healthy accounts in the preferred pool while one is available. If the configured IDs are unknown or every preferred account is disabled, cooling down, rate-limited, or locally depleted, selection falls back to the general account pool. Empty lists and unmapped models use the general pool directly.

codex-pool is the supported mutation surface. It accepts 1-based account numbers for set, add, and remove, but resolves and atomically persists only stable account IDs. clear removes a model mapping, and every mutation supports a dry-run preview. Writes preserve unrelated raw config fields and refuse to replace malformed JSON or an invalid existing pool.

The config file is global while account storage is per-project by default. Consequently, status may report unresolved references for the current project; the tool does not automatically prune them because they may be valid elsewhere.

Verification Notes

Use these commands when validating config fields.

Compact modern (default install)

opencode debug config
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode run "ping" --model=openai/gpt-5.5 --variant=medium
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode run "ping" --model=openai/gpt-5.6-sol --variant=medium

Full / legacy explicit selectors

npx -y oc-codex-multi-auth@latest --full
opencode debug config
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode run "ping" --model=openai/gpt-5.5-medium

Important behavior:

  • opencode debug config shows merged config-defined models and variants.
  • Default compact installs expose base OAuth entries such as gpt-5.5, gpt-5.5-fast, and gpt-5.6-sol.
  • Bare openai/gpt-5.5 works with --variant=medium on compact modern installs.
  • Explicit IDs such as openai/gpt-5.5-medium require --full or --legacy unless you added them manually.
  • Do not use gpt-5.5-medium for verification unless the full/legacy catalog is installed.

Advanced / non-schema environment variables

Not part of PluginConfigSchema, but used by runtime modules:

EnvEffect
CODEX_THREAD_IDOptional correlation / prompt-cache seed on outbound requests
OPENCODE_CODEX_PROMPT_URLOverride OpenCode→Codex bridge prompt catalog URL (legacy transform)
OPENCODE_SKIP_EMAIL_HYDRATE=1Skip email hydrate during account bootstrap
FORCE_INTERACTIVE_MODE=1Force interactive menu paths for tests/special shells
CODEX_AUTH_SYNC_CODEX_CLI=0Disable ~/.codex account hydrate (on unless "0")
CODEX_CONSOLE_LOG=1Mirror plugin logs to console
CODEX_COLLABORATION_MODE / OPENCODE_COLLABORATION_MODECollaboration mode hint for request shaping
OPENCODE_STATE_DIROverride state directory for TUI quota cache

Account Metadata Fields

Account storage also includes user-facing metadata fields used by the codex-* tools:

FieldPurpose
accountLabeldisplay label
accountTagsgrouping/filter tags
accountNoteshort reminder text

These fields are updated by codex-label, codex-tag, and codex-note.

See Also