Background
First, thanks for building ds-cli. It matches exactly the workflow we needed: keep Codex/Claude Code as the planner and delegate bounded implementation or review work to DeepSeek through a simple ds-cli run path. The ds-agent wrapper is also a good fit for keeping the main Codex session clean while the delegated run finishes in the background.
default_model, pro_model, and ds-cli run --pro already cover the model-selection side well. The missing piece I ran into is making Claude Code's effort level configurable without forcing it onto every internal Claude Code request.
Problem
DeepSeek's Claude Code integration docs recommend using:
CLAUDE_CODE_EFFORT_LEVEL=max
with deepseek-v4-pro[1m].
This works for the top-level Claude Code request. However, if users put that env var directly into backend_template.env or a backend's env, it is inherited by all Claude Code child requests as well.
In a local smoke test:
ds-agent -> ds-cli run -> Claude Code/DeepSeek worked.
- The delegated run successfully used
Read and Bash.
- But Claude Code's internal
Agent / subagent tool failed before doing any work when CLAUDE_CODE_EFFORT_LEVEL=max was set:
API Error: 400 thinking options type cannot be disabled when reasoning_effort is set
The subagent result showed subagent_tokens: 0 and tool_uses: 0, so this looks like a request-parameter compatibility issue rather than a tool execution failure.
Proposal
Make effort level a first-class ds-cli option instead of asking users to hardcode CLAUDE_CODE_EFFORT_LEVEL in backend env.
Possible config shape:
default_model: deepseek-v4-flash
pro_model: deepseek-v4-pro[1m]
default_effort: null
pro_effort: max
# Optional, only if Claude Code provides a clean way to separate subagent requests.
subagent_model: deepseek-v4-flash
subagent_effort: null
Possible CLI:
ds-cli run --pro --effort max prompt.txt
ds-cli run --effort none prompt.txt
Suggested resolution order:
CLI --effort > backend effort override > pro_effort/default_effort > unset
When effort is null, none, or unset, ds-cli should not export CLAUDE_CODE_EFFORT_LEVEL.
Implementation Sketch
The current model resolution path already does most of the needed work:
- resolve
default_model / pro_model
- pass the resolved model into
set_backend_env()
- use
{model}, {default_model}, and {pro_model} placeholders
The same pattern could be used for effort:
- add
default_effort and pro_effort to config
- add optional per-backend
effort
- add optional
--effort to ds-cli run
- resolve effort next to model in
commands/run.py
- pass
resolved_effort into set_backend_env()
- only set
CLAUDE_CODE_EFFORT_LEVEL when effort is explicitly configured
If Claude Code does not expose a way to keep internal Agent/subagent requests from inheriting this env var, it would still help to make effort opt-in per run and document that max may break nested Agent/subagent calls on DeepSeek's Anthropic-compatible endpoint.
Background
First, thanks for building
ds-cli. It matches exactly the workflow we needed: keep Codex/Claude Code as the planner and delegate bounded implementation or review work to DeepSeek through a simpleds-cli runpath. Theds-agentwrapper is also a good fit for keeping the main Codex session clean while the delegated run finishes in the background.default_model,pro_model, andds-cli run --proalready cover the model-selection side well. The missing piece I ran into is making Claude Code's effort level configurable without forcing it onto every internal Claude Code request.Problem
DeepSeek's Claude Code integration docs recommend using:
with
deepseek-v4-pro[1m].This works for the top-level Claude Code request. However, if users put that env var directly into
backend_template.envor a backend'senv, it is inherited by all Claude Code child requests as well.In a local smoke test:
ds-agent -> ds-cli run -> Claude Code/DeepSeekworked.ReadandBash.Agent/ subagent tool failed before doing any work whenCLAUDE_CODE_EFFORT_LEVEL=maxwas set:The subagent result showed
subagent_tokens: 0andtool_uses: 0, so this looks like a request-parameter compatibility issue rather than a tool execution failure.Proposal
Make effort level a first-class ds-cli option instead of asking users to hardcode
CLAUDE_CODE_EFFORT_LEVELin backend env.Possible config shape:
Possible CLI:
Suggested resolution order:
When effort is
null,none, or unset, ds-cli should not exportCLAUDE_CODE_EFFORT_LEVEL.Implementation Sketch
The current model resolution path already does most of the needed work:
default_model/pro_modelset_backend_env(){model},{default_model}, and{pro_model}placeholdersThe same pattern could be used for effort:
default_effortandpro_effortto configeffort--efforttods-cli runcommands/run.pyresolved_effortintoset_backend_env()CLAUDE_CODE_EFFORT_LEVELwhen effort is explicitly configuredIf Claude Code does not expose a way to keep internal Agent/subagent requests from inheriting this env var, it would still help to make effort opt-in per run and document that
maxmay break nested Agent/subagent calls on DeepSeek's Anthropic-compatible endpoint.