fix(sdk-minimal): make the SDK model argument authoritative

Stop narrowing the standalone DeepSeek adapter to a DSH_MODEL-derived one-entry catalog. The direct adapter already accepts model ids outside its advisory catalog, so retain only the DSH_CONTEXT_WINDOW fallback and let the JSON-RPC initialize model be the single runtime selection.

Remove model mirroring from minimal.py and the packaged smoke. The keyless process now initializes deepseek-v4-pro without DSH_MODEL, while the packaged scenario continues to use its unlisted smoke-model; together they prove both cataloged and arbitrary SDK model arguments reach the adapter directly.

Update the bundle, tutorial, SDK/example references, and owning Agent Notes to keep DSH_MODEL only as minimal.py's optional default input, never as a second value callers must synchronize.
This commit is contained in:
Tianyi Cui
2026-08-24 17:28:29 +08:00
parent 7a11f5fde3
commit e2920f0109
23 changed files with 30 additions and 34 deletions
+2 -2
View File
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write examples/python-sdk-agent/README.md
README.md: 5bb958c3e9202642926a0186d055615a895d9586
README.zh.md: 97bfe9e1d19a7cd37ed41fccc64340dc054ecec7
README.md: 46a8dc2384d96db39841c4c1e4cdc88d82ff55eb
README.zh.md: 5e6e2f89f27398dd7404894f15391a6a693d689b
+1 -1
View File
@@ -17,7 +17,7 @@ python examples/python-sdk-agent/minimal.py \
"Inspect the repository and fix the failing tests."
```
Set `DEEPSEEK_BASE_URL` for a compatible proxy, `DSH_MODEL` for the default model, or `DSH_SYSTEM_PROMPT` for the deployment persona. `--model` overrides the model and passes the same value to the profile-owned adapter catalog; `--profile` can select another SDK-serving profile. The selected home stores the generated `sdk-minimal` profile and uncompressed JSONL session logs under `sessions/`; the script never reads `~/.dsh` implicitly.
Set `DEEPSEEK_BASE_URL` for a compatible proxy, `DSH_MODEL` for the script's default model, or `DSH_SYSTEM_PROMPT` for the deployment persona. `--model` is the single runtime model selection; no matching environment variable is required. `--profile` can select another SDK-serving profile. The selected home stores the generated `sdk-minimal` profile and uncompressed JSONL session logs under `sessions/`; the script never reads `~/.dsh` implicitly.
The shipped [`@deepseek-ai/dsh-sdk-minimal` bundle](../../packages/bundle/sdk-minimal/README.md) is the complete explicit Cordis tree for this mode. It exposes exactly:
+1 -1
View File
@@ -17,7 +17,7 @@ python examples/python-sdk-agent/minimal.py \
"Inspect the repository and fix the failing tests."
```
兼容代理使用 `DEEPSEEK_BASE_URL`,默认模型使用 `DSH_MODEL`deployment persona 使用 `DSH_SYSTEM_PROMPT``--model` 会覆盖模型,并将同一值传给 profile 自有的适配器目录`--profile` 可以选择另一个提供 SDK 服务的 profile。所选 home 保存生成的 `sdk-minimal` profile,并在 `sessions/` 下保存未压缩 JSONL 会话日志;脚本绝不会隐式读取 `~/.dsh`
兼容代理使用 `DEEPSEEK_BASE_URL`脚本默认模型使用 `DSH_MODEL`deployment persona 使用 `DSH_SYSTEM_PROMPT``--model` 是唯一运行时模型选择,不要求匹配的环境变量`--profile` 可以选择另一个提供 SDK 服务的 profile。所选 home 保存生成的 `sdk-minimal` profile,并在 `sessions/` 下保存未压缩 JSONL 会话日志;脚本绝不会隐式读取 `~/.dsh`
随附的 [`@deepseek-ai/dsh-sdk-minimal` 组合包](../../packages/bundle/sdk-minimal/README.zh.md)是该模式完整且显式的 Cordis 配置树。它只暴露:
-1
View File
@@ -39,7 +39,6 @@ def main() -> None:
cwd=str(workspace),
dsh_home=str(dsh_home),
profile=args.profile,
env={"DSH_MODEL": args.model},
) as harness:
result = harness.run(args.prompt, session_id=args.session_id)
print(result.final_response)
@@ -209,7 +209,6 @@ describe('Python SDK dsh profile keyless smoke', () => {
cwd: repoRoot,
env: {
DSH_HOME: join(root, '.dsh'),
DSH_MODEL: 'deepseek-v4-pro',
DSH_SYSTEM_PROMPT: 'Minimal allowlist prompt.',
DEEPSEEK_API_KEY: 'keyless-smoke-no-call',
DEEPSEEK_BASE_URL: `http://127.0.0.1:${address.port}`,