The ChatGPT desktop app owns and rewrites ~/.codex/config.toml, so symlinking that file into the repo leaked the app's own config (model, [desktop], [plugins], [mcp_servers]) into git and got clobbered on launch. - Stop symlinking ~/.codex/config.toml; keep it app-owned and merge the repo fragment home/.codex/config.toml into it on every activation (home.activation.codexOpenCodeGo + home/bin/codex-opencode-go-sync). - Replace requires_openai_auth with a command-backed token (~/.local/bin/opencode-go-token reads the key from the opencode store), so ~/.codex/auth.json stays in ChatGPT mode and ChatGPT sign-in coexists with Go. - Add the Codex 0.160+ profile file home/.codex/luna.config.toml (gpt-6-luna). - Declare the chatgpt + codex casks; document the decision in AGENTS.md. Verified: default deepseek-v4.1-flash and --profile luna both return over the Go Responses API while auth.json remains in chatgpt mode.
28 lines
1.3 KiB
TOML
28 lines
1.3 KiB
TOML
# Codex -> OpenCode Go subscription (fragment, NOT the live config).
|
|
#
|
|
# The ChatGPT desktop app owns and rewrites ~/.codex/config.toml, so home-manager
|
|
# must not symlink this file into place. Instead
|
|
# home.activation.codexOpenCodeGo merges the keys below into the live file on
|
|
# every rebuild (home/bin/codex-opencode-go-sync). The app's own sections
|
|
# ([desktop], [plugins], [mcp_servers], [marketplaces], ...) are preserved.
|
|
#
|
|
# No secret lives here. Auth is command-backed: the provider runs
|
|
# ~/.local/bin/opencode-go-token, which prints the key from the opencode auth
|
|
# store. That leaves ~/.codex/auth.json in ChatGPT mode, so the ChatGPT app and
|
|
# the Go subscription coexist in the same Codex install.
|
|
#
|
|
# Only models Go serves over the Responses API work here. Verified 2026-10-03:
|
|
# deepseek-v4.1-flash, gpt-6-luna, gpt-5.6-luna, grok-4.7, grok-4.6.
|
|
model = "deepseek-v4.1-flash"
|
|
model_provider = "opencode-go"
|
|
|
|
# Switch models with `codex --profile luna` (settings in luna.config.toml; Codex
|
|
# 0.160+ no longer accepts a [profiles.*] table here).
|
|
[model_providers.opencode-go]
|
|
name = "OpenCode Go"
|
|
base_url = "https://opencode.ai/zen/go/v1"
|
|
wire_api = "responses" # Codex only supports the Responses API
|
|
|
|
[model_providers.opencode-go.auth]
|
|
command = "/Users/laptran/.local/bin/opencode-go-token"
|