Feature: DeepSeek Harness Provider Integration
Purpose
Defines how the DeepSeek Harness (the dsh web GUI on this desktop) reaches the local routers through the llm-pi-ai adapter, so a dsh session uses the same models as aider and llama.vscode instead of a cloud provider.
Requirements
DSH-R001— A modelidmust match a router model id exactly (GET /v1/models) or an alias configured on the router; an unknown id fails withUNKNOWN_MODEL.DSH-R002—contextWindowmust match or undershoot the router presetctx-size. A bare entry without capacities inherits the 262144/32768 defaults, which exceed every local preset and cause context overflow failures.DSH-R003—maxTokensmust sit well undercontextWindow, typically 4096–16384.DSH-R004— Prefer a curated list of the models actually used; the router may list many more.DSH-R005— Local models are non-reasoning: do not request a reasoning effort when a beast model is selected; leave the effort off.DSH-R006— Thecompatblock is required for llama.cpp. pi-ai cannot recognise the endpoint URL, so without it the adapter sends OpenAI’s dialect (developerrole,max_completion_tokens), which llama.cpp does not reliably accept.supportsDeveloperRole: falseselects thesystemrole andmaxTokensField: max_tokensselects themax_tokensfield.DSH-R007— Store any non-empty credential under theBEAST_API_KEYreference through the GUI Models settings, which writes~/.dsh/.credentials.yaml, or export it in thedshlaunch environment. If--api-keyis later added to the llama.service on beast, the same value must be stored.DSH-R008— Any task that writes or corrects the DSH provider section must read the latestdataflow.in/endpoints/capture for the router model ids and contexts.
Behavior
- A route declared in
~/.dsh/settings.yamlserves its configured models on the next request; no restart is needed. - Credentials resolve from
apiKeyEnvthrough the process environment, then~/.dsh/.credentials.yaml, then.envfiles.
Dependencies
- None.
Mechanism
DeepSeek Harness ships a generic multi-provider adapter (@deepseek-ai/dsh-llm-pi-ai) keyed by provider route in the llm-pi-ai settings namespace (~/.dsh/settings.yaml). A route that pi-ai does not ship is declared outright with api, baseURL, and a models list.
Canonical Route
The beast route is the canonical local provider. The corrected example lives in sources/config/dsh-settings-beast.example.yaml.
llm-pi-ai:
providers:
beast:
displayName: Beast (llama.cpp)
apiKeyEnv: BEAST_API_KEY
api: openai-completions
baseURL: http://beast.lan:2001/v1
compat:
supportsDeveloperRole: false
maxTokensField: max_tokens
models:
- id: <router model id>
contextWindow: <preset ctx-size>
maxTokens: <safe output cap, well under ctx-size>Credential
llama.cpp ignores Authorization unless the router runs with --api-key.
GUI Surface
The Models settings section in the web GUI offers a custom-provider creation card (route, display name, base URL, protocol, API key, models) and per-model advanced fields (context window, max tokens). The card does not expose compat; add the compat block by editing ~/.dsh/settings.yaml directly.