HuaimaoCy/dsh-codex-chatgpt ↗★ 0
dsh-codex-chatgpt
Use the ChatGPT models from the local Codex desktop app inside DeepSeek Harness: a first-class LLM provider plus conversation-access tools, backed by the Codex app-server and the desktop app's own ChatGPT sign-in. 适合已安装Codex桌面端并希望在DSH中使用其模型的人群。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HuaimaoCy/dsh-codex-chatgptドキュメント
README 全文を読む ↗Configuration
All keys are optional; the defaults below are what cordis.patch.yml ships and what CONFIG_DEFAULTS in src/config.js encodes. approvalPolicy, sandbox, turnTimeoutMs and startupTimeoutMs are validated and rejected at load when invalid.
| Key | Default | Meaning |
|---|---|---|
provider | codex-chatgpt | Provider route key registered on ctx.llm. Non-empty string. |
providerName | ChatGPT (Codex) | Display name shown in the model picker. Non-empty string. |
codexExecutable | '' (auto-detect) | Absolute path to the Codex executable. Resolution order: configured value → DSH_CODEX_EXECUTABLE env var → newest build under %LOCALAPPDATA%\OpenAI\Codex\bin\\codex.exe. |
codexHome | '' → ~/.dsh/codex-chatgpt | Private CODEX_HOME. Must not be ~/.codex; the desktop app holds that directory's sqlite state runtime exclusively. |
authSource | '' → ~/.codex | Directory the ChatGPT credential (auth.json) is copied from. Also the directory codex_desktop_sessions reads session_index.jsonl from. |
cwd | '' → process.cwd() | Workspace passed to thread/start and used as the child's working directory. Resolved to an absolute path. |
approvalPolicy | never | One of never, on-request, on-failure, untrusted. |
sandbox | read-only | One of read-only, workspace-write, danger-full-access. |
reasoningEffort | '' (inherit) | Default effort for a turn when the DSH request does not name one. Empty means "inherit the model's own default". A per-request effort always wins. |
baseInstructions | null | Fallback system prompt for a thread when the request carries none. null means Codex uses its own agent system prompt. |
turnTimeoutMs | 900000 (15 min) | Hard ceiling for one Codex turn. Positive finite number. |
startupTimeoutMs | 120000 (2 min) | Ceiling for the handshake, for thread/start, and for each individual protocol request such as turn/start and model/list. Positive finite number. |
ephemeralThreads | true | When true, thread/start is asked for an ephemeral thread, keeping DSH-driven conversations out of the app's shared thread history. Any value other than exactly false resolves to true. |
environmentId | null | Optional app-server environment selector, passed to thread/start only when it is a non-empty string. |
httpTransport | true | When true, the private CODEX_HOME's config.toml declares a provider with supports_websockets = false, so Codex goes straight to HTTPS and skips the 115-second WebSocket prewarm wait that used to precede the first turn of every session. When false the file is written empty, restoring upstream behaviour. Must be a boolean. |
The system prompt
A request's system text is taken from options.system first, then from a leading system message. It becomes the Codex thread's baseInstructions, which replaces Codex's own agent system prompt for that thread. When the request carries no system text, baseInstructions from the config is used instead; when that is null or empty, nothing is sent and Codex applies its own prompt.
Because the system text is part of the thread's identity, changing the DSH system prompt invalidates the cached thread and forces a new one.