This document describes the current config surfaces used by oc-codex-multi-auth on main.
The installer writes and updates:
~/.config/opencode/opencode.json
That file is the primary global config surface used by the shipped install flow in this repository.
Project-specific overrides can live in:
<project>/.opencode.json
Use that when you want per-project model or provider overrides without changing the global install.
OpenCode can also accept override content at process start:
OPENCODE_CONFIG=/path/to/config.json opencode
OPENCODE_CONFIG_CONTENT='{"model":"openai/gpt-5.4"}' opencodePlugin-specific runtime settings live outside the OpenCode config file:
~/.opencode/openai-codex-auth-config.json
That file controls plugin behavior such as retry policy, beginner safe mode, fallback policy, TUI output, and per-project account storage.
scripts/install-oc-codex-multi-auth.js performs these steps:
- Load the selected template set (
fullby default,config/opencode-modern.jsonwith--modern,config/opencode-legacy.jsonwith--legacy). - Back up an existing
~/.config/opencode/opencode.json. - Normalize the plugin list so it ends with plain
oc-codex-multi-auth. - Replace
provider.openaiwith the selected shipped template block. - Clear the cached OpenCode plugin copy under
~/.cache/opencode/.
Important detail:
- The installer intentionally writes the plugin entry as
oc-codex-multi-auth, notoc-codex-multi-auth@latest. - The default
fullinstall mode merges the modern base-model template with the explicit legacy preset entries so users can access--variantworkflows and still see the full shipped preset catalog directly.
config/opencode-modern.json is the compact variant-based template for OpenCode v1.0.210+.
It currently ships:
- 9 base model families
- 34 total variants
gpt-5.4andgpt-5.4-proat 1,050,000 context / 128,000 outputgpt-5.4-mini,gpt-5.4-nano, and Codex families at 400,000 context / 128,000 outputgpt-5.1at 272,000 context / 128,000 outputstore: falseplusinclude: ["reasoning.encrypted_content"]
The default installer mode combines:
- the 9 modern base model entries from
config/opencode-modern.json - the 34 explicit preset entries from
config/opencode-legacy.json
That hybrid install mode is what fixes the "only 9 models" complaint without removing --variant support.
Example shape:
{
"plugin": ["oc-codex-multi-auth"],
"provider": {
"openai": {
"options": {
"reasoningEffort": "medium",
"reasoningSummary": "auto",
"textVerbosity": "medium",
"include": ["reasoning.encrypted_content"],
"store": false
},
"models": {
"gpt-5.4": {
"name": "GPT 5.4 (OAuth)",
"variants": {
"medium": { "reasoningEffort": "medium" },
"high": { "reasoningEffort": "high" }
}
}
}
}
}
}Modern OpenCode selection uses:
opencode run "task" --model=openai/gpt-5.4 --variant=highconfig/opencode-legacy.json is for OpenCode v1.0.209 and earlier.
It currently ships:
- 34 explicit model entries
- separate model IDs such as
gpt-5.4-highandgpt-5.4-mini-xhigh - the same OpenAI provider defaults (
store: false,reasoning.encrypted_content)
Legacy OpenCode selection uses:
opencode run "task" --model=openai/gpt-5.4-highAt runtime, OpenCode passes provider.openai.options and provider.openai.models into the plugin loader. The plugin then:
- Reads global provider options.
- Reads per-model definitions.
- Applies request-shaping behavior (
nativeby default,legacywhen explicitly enabled). - Normalizes selected model IDs to canonical upstream Codex/ChatGPT model families before the final API call.
Examples:
openai/gpt-5.4staysgpt-5.4openai/gpt-5.4-mini-xhighnormalizes togpt-5.4-mini- legacy aliases such as
gpt-5-mininormalize togpt-5.4
Use these commands when checking the effective config:
opencode debug config
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode run "ping" --model=openai/gpt-5.4Important runtime behavior:
opencode debug configshows merged provider models from your config.opencode models openaicurrently shows OpenCode's built-in provider catalog only.- Because of that, config-defined entries such as
gpt-5.4-minican appear inopencode debug configwhile being omitted fromopencode models openai.
| Path | Purpose |
|---|---|
~/.config/opencode/opencode.json |
global OpenCode config used by the installer |
<project>/.opencode.json |
project-local OpenCode override |
~/.opencode/openai-codex-auth-config.json |
plugin runtime config |
~/.opencode/auth/openai.json |
OAuth token storage |
~/.opencode/oc-codex-multi-auth-accounts.json |
global account storage |
~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json |
per-project account storage |
~/.opencode/logs/codex-plugin/ |
plugin request/debug logs |