OpenTritium/dsh-codex-shim ↗★ 2
@opentritium/dsh-codex-shim
适用于 DSH 的路由感知 Codex 环境模拟插件,可提高 GPT 等适配了 Codex 的模型的工具调用可靠性。
AI 分析
核心用途是模拟 Codex 环境以优化工具调用。适合在使用 GPT 等模型时遇到工具调用不稳定、需要提升兼容性的用户。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:OpenTritium/dsh-codex-shim说明文档
阅读完整 README ↗Configure through a configuration file
Configure this plugin through the profile's settings provider. The default file-backed provider uses $DSH_HOME/settings.yaml (normally ~/.dsh/settings.yaml); create or edit its codex-shim: section. The bundled gpt-5.6-* automatic rule remains in force until modelPatterns is explicitly set.
codex-shim:
enabled: true
modelPatterns:
- gpt-5.6-*
- deepseek-v4-*
modelOverrides:
- provider: openai
model: gpt-5.6-luna
enabled: true
- provider: example-provider
model: experimental-model
enabled: false
enabled: false turns the shim off globally. modelPatterns replaces the automatic-rule list; use modelPatterns: [] to disable automatic matching. Each modelOverrides row is an exact provider/model decision and takes precedence over the patterns. Omit the row to let that model follow the automatic rules. Provider and model must exactly match the resolved DSH route.
The file-backed settings provider watches valid edits, so the route policy updates live. If a profile uses another settings provider, configure the same namespace through that provider instead.
Patch the WebUI for visual configuration (optional)
DSH 47f943859bef60e4160492346772ded9b24f765a does not yet let an external bundle expose a settings namespace to the WebUI. Install the tarball and use settings.yaml above if a settings card is unnecessary. For the better GUI experience, the matching release includes deepseek-harness-settings-client-exposure-47f9438.patch: a general WebUI settings allowlist extension with no OpenTritium or Codex behavior.
Apply the patch only to that exact clean DSH commit, rebuild DSH, then install the release tarball:
gh release download --repo OpenTritium/dsh-codex-shim --pattern 'opentritium-dsh-codex-shim-*.tgz' --pattern 'deepseek-harness-settings-client-exposure-47f9438.patch'
git clone https://github.com/deepseek-ai/deepseek-harness.git deepseek-harness
cd deepseek-harness
git checkout 47f943859bef60e4160492346772ded9b24f765a
git apply --check ../deepseek-harness-settings-client-exposure-47f9438.patch
git apply ../deepseek-harness-settings-client-exposure-47f9438.patch
pnpm install && pnpm run build
pnpm dsh plugin --profile web add ../opentritium-dsh-codex-shim-*.tgz
pnpm dsh --profile web --dump-config
The patch gives settings owners an explicit expose: 'client' option. It does not load this bundle, add an OpenTritium row, or alter model/tool behavior. Do not apply it to a dirty checkout or a different commit; wait for the upstream equivalent instead.
Route and configuration
The bundle mounts the gate globally, but the Codex surface is applied only when all of these are true:
- the global switch is enabled;
- the resolved model matches an automatic pattern or an exact model override enables it;
- the current scope contains at least one shim tool.
The default automatic pattern is gpt-5.6-*. Users can replace it with patterns such as deepseek-v4-*, set it to an empty list to disable automatic matching, or use explicit provider/model overrides. The UI exposes the same settings through the DSH settings slot.