AK-blank/dsh-codex-bridge ↗★ 0
dsh-codex-bridge
Quota-aware Codex CLI bridge for DSH: reads the 5-hour and weekly ChatGPT-plan windows, defaults to gpt-6.1-sol/high, falls back to gpt-5.6-sol at 10% left, and runs codex exec tasks. 适合使用Codex CLI且需要根据剩余额度自动降级模型以节省开销的用户。
同名パッケージの別リポジトリ
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AK-blank/dsh-codex-bridgeドキュメント
README 全文を読む ↗Configuration
Override the row in the profile's cordis.patch.yml:
- id: codex-bridge
name: dsh-codex-bridge
config:
minModel: gpt-5.6-sol
defaultModel: gpt-6.1-sol
expensiveModel: gpt-6-astra
minEffort: medium
defaultEffort: high
reservePercent: 10
stopPercent: 95
statusCacheSeconds: 30
defaultSandbox: read-only
ephemeral: true
maxTimeoutSeconds: 1800
maxOutputChars: 16000
codexCommand: codex
codexHome: ''
| Key | Default | Meaning |
|---|---|---|
minModel | gpt-5.6-sol | model floor and reserve fallback |
defaultModel | gpt-6.1-sol | normal default (may be configured even when not listed by the CLI) |
expensiveModel | gpt-6-astra | explicit opt-in only |
minEffort | medium | lowest reasoning level ever used |
defaultEffort | high | reasoning level for ordinary and hard work |
reservePercent | 10 | fall back when either window has this much or less left |
stopPercent | 95 | block ordinary runs at this used percentage |
statusCacheSeconds | 30 | quota snapshot cache |
defaultSandbox | read-only | Codex sandbox unless the caller overrides it |
ephemeral | true | do not persist each delegation under ~/.codex/sessions |
maxTimeoutSeconds | 1800 | hard wall-clock limit per delegation |
maxOutputChars | 16000 | answer characters returned to the model |
codexCommand | codex | executable name or absolute path |
codexHome | empty | empty inherits the host environment |
Usage
Ask the agent:
Check the Codex quota, then delegate this hard problem to Codex with the right model and effort.
The agent calls codex_status, picks a complexity (or passes explicit model / reasoning_effort), then calls codex_delegate. The task must be self-contained: Codex cannot see the DSH conversation, so include absolute paths, symptoms, constraints, and the exact deliverable.
Default sandbox is read-only. Pass sandbox: "workspace-write" and a cwd only when Codex must edit files.