Files
conversation-history/Projects/DeepSeek Harness/2026-08-23-art0-dsh-model-providers-routing-and-credentials.md

15 KiB

title, date, status, server, tags
title date status server tags
art0 DeepSeek Harness model providers, routing, and credentials 2026-08-23 operational art0
deepseek-harness
dsh
art0
model-routing
llm-providers
credentials

art0 DeepSeek Harness model providers, routing, and credentials

Executive summary

DeepSeek Harness (DSH) on art0 currently has four configured model-provider routes: DeepSeek Official, OpenAI, Anthropic, and Moonshot/Kimi. The DSH model picker exposes 66 catalog entries across those routes. OpenAI, Anthropic, and Moonshot credentials were validated directly against their model-list APIs. DeepSeek already had a stored credential, but it was not revalidated during this work.

The provider configuration is active through DSH hot reload. The DSH process was not restarted and is still the process started on August 21. Automatic cost/quality routing, cross-provider fallback, and role routing are not installed. New sessions default to DeepSeek V4 Flash, while users can manually select any configured provider/model in the model picker.

No API key values are recorded in this note.

Live runtime

Item Value
Server art0 (104.190.60.129, SSH port 2222)
DSH version 0.1.1-rc.2
Source checkout /home/garfield/IdeaProjects/deepseek-harness
Global launcher /home/garfield/.npm-global/bin/dsh
Command dsh web --no-open
Listener 127.0.0.1:3080
Live PID observed 678037
Process start 2026-08-21 18:02 EDT
Profile web
Profile bundles @deepseek-ai/dsh-base, @deepseek-ai/dsh-web-app
Service manager None detected; the process is parented by a Codex app-server process, not a systemd user service

DSH is in developer preview and explicitly warns that compatibility-breaking changes should be expected.

Configured vendors and models

DSH route Vendor DSH catalog models Upstream validation Credential reference
deepseek-official DeepSeek 3 Stored credential present; not revalidated in this session DEEPSEEK_API_KEY
openai OpenAI 38 HTTP 200; upstream returned 126 models OPENAI_API_KEY
anthropic Anthropic/Claude 15 HTTP 200; upstream returned 10 models available to this account ANTHROPIC_API_KEY
moonshotai Moonshot/Kimi global endpoint 10 HTTP 200; upstream returned 12 models MOONSHOT_API_KEY
Total 4 vendors 66 DSH catalog entries

The upstream model count and DSH picker count are intentionally different. DSH uses the catalog bundled with its installed pi-ai version. A catalog entry may require account entitlements that the key does not have, while an upstream API may return models that the installed DSH catalog does not yet expose.

DeepSeek models

  • deepseek-v4-flash
  • deepseek-v4-pro
  • deepseek-v4-flash-vision-exp

Kimi models in the DSH global Moonshot catalog

  • kimi-k2-0711-preview
  • kimi-k2-0905-preview
  • kimi-k2-thinking
  • kimi-k2-thinking-turbo
  • kimi-k2-turbo-preview
  • kimi-k2.5
  • kimi-k2.6
  • kimi-k2.7-code
  • kimi-k2.7-code-highspeed
  • kimi-k3

DSH also ships two additional dormant Kimi-related catalogs:

  • moonshotai-cn: the same 10-model family through the China endpoint. It is not enabled because the global moonshotai route is configured.
  • kimi-coding: four entries (k3, k3-256k, kimi-for-coding, and kimi-for-coding-highspeed). It is not enabled and may require Kimi Coding-specific authentication rather than a Moonshot API key.

Credential storage and provider configuration

Managed DSH credential store

DSH credentials are stored in:

/home/garfield/.dsh/.credentials.yaml

Observed properties:

  • Format version: 1
  • Permissions: 0600
  • Stored references: ANTHROPIC_API_KEY, DEEPSEEK_API_KEY, MOONSHOT_API_KEY, and OPENAI_API_KEY
  • Existing DeepSeek data was preserved while the other references were added.
  • Secret values were never printed during verification.

This managed file has higher precedence than project and user .env files. DSH watches it and hot-publishes credential changes. The model UI is designed to expose only redacted descriptors, never the literal values.

Provider settings

Provider routes are declared in:

/home/garfield/.dsh/settings.yaml

Effective non-secret structure:

llm-pi-ai:
  providers:
    openai:
      apiKeyEnv: OPENAI_API_KEY
    anthropic:
      apiKeyEnv: ANTHROPIC_API_KEY
    moonshotai:
      apiKeyEnv: MOONSHOT_API_KEY

DeepSeek Official is supplied by the stock DSH base bundle rather than this llm-pi-ai settings section.

Other credential locations found on art0

These are historical/project-level locations, not the DSH managed store:

File Relevant entries observed
/home/garfield/hermes-mcp/.env ANTHROPIC_API_KEY
/home/garfield/deer-flow/.env ANTHROPIC_API_KEY, OPENAI_API_KEY, MOONSHOT_API_KEY, and other provider keys
/home/garfield/aiScripts/.env A separate OPENAI_API_KEY
/home/garfield/.dsh/.env HERMES_MCP_TOKEN; no model-provider keys
/home/garfield/.env GODADDY_API_KEY and GODADDY_API_SECRET; no DSH model-provider keys

The Anthropic values previously found in hermes-mcp/.env and deer-flow/.env were identical. The two historical OpenAI keys in aiScripts/.env and deer-flow/.env were different. The newly supplied DSH credentials are managed independently in .credentials.yaml.

The home-level /home/garfield/.env exists and was last observed with mode 0600.

Current routing behavior

New DSH session
  -> deepseek-official / deepseek-v4-flash

Manual model selection in a session
  -> DeepSeek model
  -> OpenAI model
  -> Anthropic/Claude model
  -> Moonshot/Kimi model

Provider/model request fails
  -> normal retry policy for that provider/model
  -> final error if retries are exhausted

Important semantics:

  • The process-wide default remains deepseek-official/deepseek-v4-flash.
  • Selecting a model in the DSH model picker also makes it the default for subsequent new sessions.
  • A session that has already sent a model request retains the provider/model recorded in its session log.
  • Model changes apply to the next request; they do not split a request already being assembled.
  • There is no automatic simple-versus-complex classification.
  • There is no automatic Quick answer/Main model prompt.
  • There is no cross-provider failover.
  • There is no plan-mode, coding-role, or subagent-specific model route.

Restart and hot-reload status

The DSH process was not restarted while OpenAI, Anthropic, and Moonshot were configured. It remained PID 678037, started on August 21. This is expected:

  • .credentials.yaml is watched and hot-reloaded.
  • settings.yaml is watched and provider registrations are replaced dynamically.
  • Direct model-list requests for OpenAI, Anthropic, and Moonshot returned HTTP 200 after configuration.
  • No credential, adapter, settings, or reload errors appeared in the recent DSH log.

A restart is required after installing a new bundle that contributes host/client plugin modules. The current process has no detected systemd service, so a future plugin rollout needs a deliberate stop/start procedure or a user-level service first.

Routing plugins investigated but not installed

dsh-model-router

The plugin matching the requested Quick answer behavior is tianji-qingtian/dsh-model-router, reviewed at release v0.8.1.

Claimed and source-confirmed behavior:

  • A zero-prefix cheap-model judge returns SIMPLE or AGENTIC.
  • Clearly heavy prompts bypass the judge and continue to the primary model.
  • A SIMPLE decision asks the user to choose Quick answer or Main model.
  • Quick answers use a zero-prefix one-shot call and do not touch the main model's prefix cache.
  • Transient errors can degrade one turn to the cheap model.
  • It projects token, cache, and estimated-cost data into a composer panel.

Important constraints:

  • It chooses the cheap model from the current provider's own catalog; it does not route from a DeepSeek/Claude primary to an unrelated Ollama or Moonshot provider.
  • Cheap-model discovery uses a hard-coded model-ID match such as flash, chat, mini, turbo, haiku, lite, air, or nano.
  • qwen/qwen3.5-27b does not match that rule.
  • The plugin's most DSH-coupled behavior writes a synthetic step envelope into the session log for direct Quick answers. This deserves regression testing after DSH upgrades.
  • The release ships built artifacts and does not need a source build during installation.

Proposed pinned installation, not executed:

dsh plugin --profile web add "github:tianji-qingtian/dsh-model-router#v0.8.1"

After installation, DSH Web must be restarted so the new host and client modules load.

dsh-llm-fallbacks

dsh-llm-fallbacks version 0.3.4 has peer dependencies matching DSH 0.1.1-rc.2. It can walk cross-provider chains for rate limits, exhausted retries, authentication failures, quota failures, and provider errors.

Constraints and interaction:

  • It is disabled by default until a valid fallbacks: settings section is saved.
  • Its root chain currently requires the final entry to be an official DeepSeek V4 Flash or Pro model.
  • It overlaps with dsh-model-router on transient request errors. With both installed, the model router may first retry on a cheap model inside the same provider before the fallback plugin moves to another provider. That adds latency during provider-wide outages.
  • Install and validate the model router first, then decide whether cross-provider resilience justifies the additional layer or whether the router should be modified to disable its internal fallback.

dsh-role-router

@snowamberx/dsh-role-router routes three roles: normal/default, planner while plan mode is active, and in-process subagents.

It is not a general coding-task classifier. Out-of-process providers such as Codex do not pass through its in-process request hook, so installing it alone would not implement "send coding work to Codex."

Option A: keep manual routing

This is the current and lowest-risk state. Keep DeepSeek V4 Flash as the default and manually choose Claude, OpenAI, Kimi, or DeepSeek Pro for demanding work.

Option B: low-risk automatic cost/quality routing

  1. Change the default to deepseek-official/deepseek-v4-pro.
  2. Install the pinned dsh-model-router release.
  3. Let its same-provider discovery pair V4 Pro with V4 Flash.
  4. Test short self-contained questions, context-dependent follow-ups, code/file work, session resume, and a simulated transient failure.
  5. Add dsh-llm-fallbacks only after the router behavior is stable.

This is the configuration the existing model router supports most directly.

Option C: explicit cross-vendor judge and primary

Fork or patch dsh-model-router to add explicit settings such as cheapProvider, cheapModel, primaryProvider, primaryModel, and an independent toggle for transient fallback. This is required to use Kimi or a local Ollama model as the judge while keeping Claude, OpenAI, or DeepSeek as the primary.

An alternative is to expose the primary and a regex-matching cheap model under one OpenRouter route, but model discovery order would need to be constrained and verified.

Local Ollama feasibility on art0

Observed state:

  • Ollama binary installed at /usr/local/bin/ollama
  • No Ollama API listening on 127.0.0.1:11434
  • Intel Core i7-10700F, 8 cores / 16 threads
  • 62 GiB RAM, about 29 GiB available during inspection
  • 8 GiB swap almost fully consumed during inspection
  • NVIDIA tooling could not communicate with a GPU driver

Running a 27B judge model locally is not recommended on this host in its current state. A small CPU model could be tested later, but it would still require either a router modification for cross-provider selection or use as both the current and cheap model under one route.

Security findings and follow-ups

  1. The API keys supplied during this setup were pasted into an AI conversation. Rotate them if conversation retention is a concern, then update the managed DSH credential references.
  2. Project .env files previously had permissive modes (0644 or 0664). Restrict secret-bearing files to 0600 unless a documented group consumer requires access.
  3. A plaintext Azure OpenAI subscription key was found in a historical vault conversation and its mobile mirror:
    • Claude Conversations/fetcherpay-web-apps-marketing/2026-03-19-Caveat-The-messages-below-were-generated-by-the-us-73b14970.md
    • mobile/S22/Claude Conversations/fetcherpay-web-apps-marketing/2026-03-19-Caveat-The-messages-below-were-generated-by-the-us-73b14970.md
  4. Rotate that Azure key before redacting both note copies. Do not merely delete the text and leave the credential valid.
  5. DSH's 0600 credential file protects against other OS users, not against tools running as the same garfield user. A model with filesystem access could deliberately read the file if given or able to discover the path.
  6. The Obsidian compose file expects ./vaults:/vaults, but the expected host directory under the infrastructure checkout was absent and the obsidian container was not available during inspection. This note was saved to the workstation's synced vault at /Users/garfieldheron/obsidian-vault.

Verification commands

These commands report configuration metadata without printing secrets:

# Running DSH process and listener
pgrep -af 'dsh web --no-open'
ss -ltnp | grep ':3080'

# Profile bundles
node -e 'const p=require("/home/garfield/.dsh/profiles/web/package.json"); console.log(p.dsh.profile.bundles)'

# Default model
dsh --profile web --dump-config | sed -n '/id: agent-default-model/,+6p'

# Credential reference names only
node -e '
const fs=require("fs");
const yaml=require("/home/garfield/.npm-global/lib/node_modules/@deepseek-ai/dsh/node_modules/js-yaml");
const d=yaml.load(fs.readFileSync("/home/garfield/.dsh/.credentials.yaml", "utf8"));
console.log(Object.keys(d.refs || {}).sort());
'

# Provider routes and credential reference names only
node -e '
const fs=require("fs");
const yaml=require("/home/garfield/.npm-global/lib/node_modules/@deepseek-ai/dsh/node_modules/js-yaml");
const d=yaml.load(fs.readFileSync("/home/garfield/.dsh/settings.yaml", "utf8"));
for (const [provider, config] of Object.entries(d["llm-pi-ai"]?.providers || {})) {
  console.log(provider, config.apiKeyEnv);
}
'

Never print or commit .credentials.yaml, project .env files, or live TLS material.

Change record

Date Change
2026-08-23 Inspected DSH 0.1.1-rc.2, plugin architecture, provider configuration, host capacity, and live process.
2026-08-23 Added and validated OpenAI credential; enabled openai route.
2026-08-23 Added and validated Anthropic credential; enabled anthropic route.
2026-08-23 Added and validated Moonshot credential; enabled global moonshotai route.
2026-08-23 Confirmed four configured vendors and 66 DSH catalog entries.
2026-08-23 Confirmed provider hot reload succeeded without restarting DSH.
2026-08-23 Documented automatic-router, fallback, role-router, Ollama, and security findings; no routing plugin installed.