# @lovstudio/dsh-llm-config [English](README.md) | 中文 Host 侧的可复用 LLM profile 库。它拥有 `llm-config` settings namespace,并通过生成的 Typert Remote contribution 暴露 `llmConfig.runCompletion`。每个 profile 选择 provider、model 与 system prompt;消费者按稳定 id 使用 profile,无需直接依赖 Host LLM 服务。 该包刻意只属于 Host。浏览器编辑器位于下游 Client 包,例如 `@lovstudio/dsh-llm-config-ui`;`@deepseek-ai/dsh-api-remotes` 导入生成的 Remote contribution,并把其运行时 codec 依赖打入浏览器 bundle。 ## 安装 前置条件:Node.js 22.19+ 或 24+,pnpm 11(`corepack enable` 或 `npm i -g pnpm`)——`dsh plugin` 会在 profile 目录内调用 pnpm。 **从 DeepSeek Harness 源码 checkout 安装(推荐,同时拿到 harness 源码):** ```sh git clone --depth 1 --branch dsh-v0.1.2-rc.1 https://github.com/deepseek-ai/deepseek-harness.git cd deepseek-harness && pnpm install && pnpm run build pnpm dsh plugin --profile web add -w github:lovstudio/dsh-llm-config#v0.1.1 pnpm dsh web ``` **不 clone(npx,只有编译后的 harness):** ```sh npx @deepseek-ai/dsh plugin --profile web add -w github:lovstudio/dsh-llm-config#v0.1.1 npx @deepseek-ai/dsh web ``` `web` 就是 `dsh web` 启动的 profile。tag 固定到一个 `lib/` 已预构建并提交的 commit,本机不会编译任何东西。两种方式均已于 2026-09-04 在 `dsh-v0.1.2-rc.1` 上验证。卸载:`dsh plugin --profile web remove @lovstudio/dsh-llm-config`。 ## 本地开发 ```sh pnpm install pnpm run watch DSH_HOME=/Users/mark/.dsh-lov-dev pnpm --dir /path/to/deepseek-harness dsh plugin --profile web add -w link:/path/to/dsh-llm-config ``` 当前 checkout 自己维护 Host 构建与已提交的 Typert 产物;隔离 profile 可避免把本地迭代写入 Harness 仓库或默认 `~/.dsh` profile。 ## 模型体验 ### Profile 补全请求 #### 模型看到的内容 模型会先看到所选 profile 的准确 `systemPrompt`,再看到调用方的 `content` 作为一条用户消息。随包提供的 `market-search` profile 要求输出简洁的 dshfind 关键词查询,不附带解释。 #### Token 影响 Profile prompt 是每次请求的固定成本;用户内容和生成答案随调用变化。辅助答案最多输出 `512` tokens。 #### KV Cache 影响 所选 profile 的 provider、model 与 prompt 不变时前缀稳定。修改 profile 可能从变更的 system-prompt 片段起使复用失效;用户内容追加在该前缀之后。 ## 已知限制与暂缓事项 - Profile 通过精确 id 选择,不存在 fallback profile。 - Profile、provider 或 model 缺失时 Remote 调用直接失败,不会静默切换路由。 - Profile 编辑由独立浏览器包提供。