Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Codex DeepSeek Worker
# Codex DeepSeek

Run DeepSeek V4 Flash as a native text-only worker inside Codex while keeping your existing Codex model as the orchestrator.

This project is for developers who want more parallel coding capacity, a low-cost long-context worker, or an independent model pass without replacing their primary Codex workflow.

## Why a worker instead of a model switch?

Codex remains responsible for task decomposition, visual inputs, integration decisions, and final verification. `DeepSeekWorker` receives bounded text tasks such as:
Codex remains responsible for task decomposition, visual inputs, integration decisions, and final verification. `DeepSeek` receives bounded text tasks such as:

- exploring a large repository and returning evidence;
- implementing one isolated change;
- generating or extending focused tests;
- reviewing a diff with a second model;
- drafting technical documentation from source files.

The worker is deliberately not the final decision-maker. Its agent contract requires a compact `WORKER_REPORT` with changed files, verification evidence, risks, and follow-ups.
The subagent is deliberately not the final decision-maker. Its agent contract requires a compact `WORKER_REPORT` with changed files, verification evidence, risks, and follow-ups.

## What V1 installs

- Native Codex role: `DeepSeekWorker`
- Native Codex role: `DeepSeek`
- Model: `deepseek-v4-flash`
- Provider: official DeepSeek API
- Reasoning effort: `high`
Expand Down Expand Up @@ -54,26 +54,30 @@ The Skill checks the current state before writing anything. If a credential is m

After setup returns `ready`, restart Codex and open a new task so the native role is loaded.

Existing installations that used the former `DeepSeekWorker` role are migrated by
`repair`: the manager backs up the old agent file, installs `DeepSeek`, removes only
the old file it owns, and repeats direct plus native-routing verification.

## Use the worker

Ask the parent Codex agent to delegate a bounded task:

```text
Use DeepSeekWorker to inspect the authentication module, identify the failure path,
Use DeepSeek to inspect the authentication module, identify the failure path,
and return an evidence-based fix recommendation. Do not edit files.
```

For implementation:

```text
Use DeepSeekWorker to implement the approved parser change and run the focused parser tests.
Use DeepSeek to implement the approved parser change and run the focused parser tests.
Return the diff summary, verification, risks, and follow-ups to the parent agent.
```

Codex delegates through the native agent mechanism:

```text
spawn_agent(agent_type="DeepSeekWorker", fork_turns="none", ...)
spawn_agent(agent_type="DeepSeek", fork_turns="none", ...)
```

Daily work does not run the setup Skill again.
Expand Down Expand Up @@ -117,7 +121,7 @@ A successful direct API call is not enough. Native verification must confirm bot
model_provider = deepseek
model = deepseek-v4-flash
reasoning_effort = high
agent_role = DeepSeekWorker
agent_role = DeepSeek
```

Only then does the manager return `status: ready`.
Expand Down Expand Up @@ -146,7 +150,7 @@ python3 /path/to/skill-creator/scripts/quick_validate.py codex-deepseek-worker

## Project ownership

Codex DeepSeek Worker is an open-source developer tool maintained by [BeatAPI](https://beatapi.io). It does not require a BeatAPI account or API key and is not affiliated with or endorsed by OpenAI or DeepSeek.
Codex DeepSeek is an open-source developer tool maintained by [BeatAPI](https://beatapi.io). It does not require a BeatAPI account or API key and is not affiliated with or endorsed by OpenAI or DeepSeek.

## License

Expand Down
12 changes: 6 additions & 6 deletions codex-deepseek-worker/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ name: codex-deepseek-worker
description: Configure, inspect, test, repair, disable, or uninstall DeepSeek V4 Flash as a native text-only Codex worker. Use when a user asks to add a DeepSeek worker or native DeepSeek subagent to Codex, verify its actual provider routing, repair it after a parent-model change, or remove its managed configuration. Do not trigger for general DeepSeek API questions or ordinary coding tasks after the worker is configured.
---

# Codex DeepSeek Worker
# Codex DeepSeek

Manage the native `DeepSeekWorker` configuration only. Do not use this Skill as a substitute execution path for daily coding work. Delegate deterministic configuration, catalog, credential, backup, and verification operations to `scripts/deepseek_worker.py`; do not hand-edit TOML, JSON, agent files, or credential stores.
Manage the native `DeepSeek` configuration only. Do not use this Skill as a substitute execution path for daily coding work. Delegate deterministic configuration, catalog, credential, backup, and verification operations to `scripts/deepseek_worker.py`; do not hand-edit TOML, JSON, agent files, or credential stores.

## Preserve these contracts

- Use the Codex desktop app's bundled runtime. Treat its version as diagnostic information and require a real native-routing test.
- Read the current parent model from Codex configuration. Do not hardcode or replace the user's primary model or login.
- Run `repair` after the parent model changes, then verify again.
- Treat `DeepSeekWorker` as text-only. Convert relevant visual evidence to a textual task package before delegation.
- Treat `DeepSeek` as text-only. Convert relevant visual evidence to a textual task package before delegation.
- For daily work, have the parent Codex agent call:

```text
spawn_agent(agent_type="DeepSeekWorker", fork_turns="none", ...)
spawn_agent(agent_type="DeepSeek", fork_turns="none", ...)
```

- If the active tool schema does not expose `DeepSeekWorker`, ask the user to restart Codex and open a new task. Do not use the manager script or `codex exec` to perform the user's coding task.
- If the active tool schema does not expose `DeepSeek`, ask the user to restart Codex and open a new task. Do not use the manager script or `codex exec` to perform the user's coding task.
- Read [references/worker-routing.md](references/worker-routing.md) when deciding what to delegate. Read [references/compatibility.md](references/compatibility.md) for configuration, routing, and rollback details.

## Follow this workflow
Expand All @@ -41,7 +41,7 @@ python3 <skill-dir>/scripts/deepseek_worker.py <command> --json

- `status`: Inspect runtime, configuration, catalog, credential, role, and manifest without changing them.
- `setup`: Install the managed provider/catalog/role and perform live verification.
- `test`: Run a direct provider test followed by native `DeepSeekWorker` routing verification.
- `test`: Run a direct provider test followed by native `DeepSeek` routing verification.
- `repair`: Reapply the managed configuration for the current parent model and verify it.
- `disable`: Disable the managed worker while preserving provider data and credentials.
- `uninstall`: Remove managed configuration. Pass `--remove-credential` only when explicitly requested.
Expand Down
6 changes: 3 additions & 3 deletions codex-deepseek-worker/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface:
display_name: "Codex DeepSeek Worker"
short_description: "Install and verify a native DeepSeek coding worker"
default_prompt: "Use $codex-deepseek-worker to configure and verify DeepSeek as a native Codex worker."
display_name: "Codex DeepSeek"
short_description: "Install and verify a native DeepSeek coding subagent"
default_prompt: "Use $codex-deepseek-worker to configure and verify DeepSeek as a native Codex subagent."
8 changes: 4 additions & 4 deletions codex-deepseek-worker/evals/evals.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"id": 1,
"prompt": "Configure DeepSeek as a native Codex worker. Here is the API key: sk-test-placeholder.",
"expected_output": "Run status first. Pass the key only through standard input, preserve the primary Codex model, install DeepSeekWorker, and require direct plus native routing verification before returning ready.",
"expected_output": "Run status first. Pass the key only through standard input, preserve the primary Codex model, install DeepSeek, and require direct plus native routing verification before returning ready.",
"files": []
},
{
Expand All @@ -27,20 +27,20 @@
},
{
"id": 5,
"prompt": "DeepSeekWorker is not in spawn_agent yet. Use the manager script to finish my code change anyway.",
"prompt": "DeepSeek is not in spawn_agent yet. Use the manager script to finish my code change anyway.",
"expected_output": "Do not use the manager or codex exec as a substitute coding path. Ask the user to restart Codex and open a new task.",
"files": []
},
{
"id": 6,
"prompt": "Have DeepSeekWorker inspect this screenshot and reproduce the UI.",
"prompt": "Have DeepSeek inspect this screenshot and reproduce the UI.",
"expected_output": "Explain that V1 is text-only. The parent agent must inspect the visual and provide a bounded textual task package.",
"files": []
},
{
"id": 7,
"prompt": "After setup, how should I use the worker for a repository review?",
"expected_output": "The parent Codex agent delegates a bounded text task with spawn_agent(agent_type=DeepSeekWorker, fork_turns=none). The worker returns a WORKER_REPORT and the parent verifies the evidence.",
"expected_output": "The parent Codex agent delegates a bounded text task with spawn_agent(agent_type=DeepSeek, fork_turns=none). The subagent returns a WORKER_REPORT and the parent verifies the evidence.",
"files": []
},
{
Expand Down
16 changes: 12 additions & 4 deletions codex-deepseek-worker/references/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ The default `CODEX_HOME` is `~/.codex`:

- Codex config: `$CODEX_HOME/config.toml`
- Merged model catalog: `$CODEX_HOME/models-with-deepseek.json`
- Worker role: `$CODEX_HOME/agents/DeepSeekWorker.toml`
- Subagent role: `$CODEX_HOME/agents/DeepSeek.toml`
- Manifest and backups: `$CODEX_HOME/codex-deepseek-worker/`
- Credential target: `codex-deepseek-worker-api-key`

The manager does not change the top-level `model` or `model_provider`.

## Role-name migration

Version 1 originally installed `$CODEX_HOME/agents/DeepSeekWorker.toml`. A current
`repair` recognizes that file only when its content hash matches the manager's
manifest, includes it in the transaction backup, replaces it with
`$CODEX_HOME/agents/DeepSeek.toml`, and verifies the new `DeepSeek` role. An
unrecognized or user-modified legacy file is reported as a conflict and preserved.

## Native routing

On macOS, the manager discovers the desktop app's bundled Codex runtime from the standard app locations. It does not search `PATH` or trust environment-variable install roots. On Windows, the caller must pass the exact trusted desktop runtime path explicitly with `--codex-bin`; the manager never automatically executes a discovered file.
Expand All @@ -33,7 +41,7 @@ The manager reads the active parent model, disables `features.multi_agent_v2`, a
Daily tasks must be delegated by the parent Codex agent:

```text
spawn_agent(agent_type="DeepSeekWorker", fork_turns="none", ...)
spawn_agent(agent_type="DeepSeek", fork_turns="none", ...)
```

If the current task does not recognize the custom role, restart Codex and open a new task. The management script is not a fallback coding agent.
Expand All @@ -48,7 +56,7 @@ If the current task does not recognize the custom role, restart Codex and open a
model_provider = deepseek
model = deepseek-v4-flash
reasoning_effort = high
agent_role = DeepSeekWorker
agent_role = DeepSeek
```

2. the exact child response `NATIVE_DEEPSEEK_WORKER_OK`.
Expand All @@ -67,4 +75,4 @@ Do not silently overwrite incompatible existing DeepSeek provider or role config

## Visual inputs

`DeepSeekWorker` is text-only in V1. The parent agent must inspect images, screenshots, or video and provide only the relevant textual facts. The worker must not imply that it saw the original visual input.
`DeepSeek` is text-only in V1. The parent agent must inspect images, screenshots, or video and provide only the relevant textual facts. The subagent must not imply that it saw the original visual input.
2 changes: 1 addition & 1 deletion codex-deepseek-worker/references/worker-routing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Worker routing guide

Use `DeepSeekWorker` when the task is bounded, text-only, and benefits from long-context reading, parallel capacity, or an independent model pass.
Use `DeepSeek` when the task is bounded, text-only, and benefits from long-context reading, parallel capacity, or an independent model pass.

## Good worker tasks

Expand Down
Loading