`loadLayeredEnv` refused `DEEPSEEK_BASE_URL` and `DEEPSEEK_SEARCH_BASE_URL` from every discovered `.env`, including the user's own `$DSH_HOME/.env`, so a machine-level endpoint written there made both the CLI and Desktop fail at startup. The refusal exists for the invoking directory's file: it arrives with a clone, and a repository must not choose where requests carrying the user's DeepSeek credential go. The home file is the user's own, and the profile patches in the same directory can already set these endpoints as plugin `baseURL` fields, so refusing it there protected nothing. `HOME_LAYER_PROXY_NAMES` becomes `HOME_LAYER_ROUTE_NAMES` and adds the two endpoint names; a project `.env` that sets either still fails the launch, and its message now names the home file as the second way out. `DSH_HOME` stays bootstrap-only, and the CA and TLS names stay refused everywhere. Tests cover the project layer refusing both names, the home layer accepting both below an exported value, and the project-layer message. The app-boot, launch-environment, llm-deepseek, and web-search-deepseek READMEs, the development guide, and the two Agent Notes that stated the old rule now state this one. Refs #8138
description, kind
| description | kind |
|---|---|
| The LLM capability group: a provider-neutral model-call service, the DeepSeek and pi-ai provider adapters, request-retry execution, and replay-aware token measurement. | package-group |
llm/ — LLM capability family
English | 中文
Summary
The llm group provides the harness's model-call capability: one provider-neutral service through which any composition streams requests to a model provider, plus adapters, provider-specific request metadata, retry execution, and measurement. The core llm package defines the message, content-block, and stream-chunk vocabulary every plugin and the session log use; provider adapters translate a provider's wire format into that vocabulary; DeepSeek request-extension plugins contribute lifecycle-owned metadata outside model input; llm-retry re-runs failed requests at durable agent-step boundaries; and token-meter measures request and context pressure from the durable log. This page maps the group; each package README owns its per-package contract.
Table of Contents
Packages
| Package | Role | ctx key |
|---|---|---|
llm/ |
Streams one model call through a registered provider adapter and shares the harness message, block, and chunk vocabulary | ctx.llm |
llm-deepseek/ |
Shared Messages protocol, request configuration, and model capabilities | — |
llm-deepseek-api-key/ |
API-key authentication and discovery for the official route | ctx.llm |
llm-deepseek-account/ |
Account-token authentication, invalidation, and discovery | ctx.llm |
llm-pi-ai/ |
Serves configured provider routes through pi-ai catalogs and wire protocols, including hand-declared gateways | registers on ctx.llm |
deepseek-llm-api-extensions/ |
Registers lifecycle-owned top-level fields on official DeepSeek requests | ctx.deepseekLlmApiExtensions |
plugin-package-inventory-deepseek/ |
Contributes the active Loader package inventory to official DeepSeek requests | contributes dsh_plugin_packages |
llm-retry/ |
Retries failed model requests under each provider's policy at durable agent-step boundaries | listens to agent/request-error |
token-meter/ |
Measures request and context pressure from the durable session log with a fixed heuristic | ctx.tokenMeter |
Related documentation
- LLM streaming subsystem — the message and block types, the assembled model request, the
StreamChunkprotocol, and the adapter contract. - Token meter subsystem — the measurement semantics behind
ctx.tokenMeter. - Twin LLM adapters — why the DeepSeek route ships two structurally different adapters.
- Routed model context — how the loop routes model requests and compacts context.
Dev Note
None.