snnh/dsh-llm-service-lite ↗★ 0

@snnh/dsh-llm-service-lite

轻量级大模型服务,支持多服务商配置 适合需要精简版 LLM 服务、自定义模型目录及多接口协议(如 OpenAI、Anthropic)的用户。

套件
@snnh/dsh-llm-service-lite
相容性
待驗證
Harness 依賴範圍
^0.2.1-alpha.2
Cordis 依賴範圍
^4.0.5-alpha.1
版本
0.1.0
授權
NOASSERTION
最近更新
2026年10月11日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:snnh/dsh-llm-service-lite

Start from an official configuration file

An official deployment publishes one provider file per provider — an API-keyed map of chat: entries. catalog converts such a file into this adapter's own vocabulary: the API becomes the route's interfaceType (openai-completions to openai-chat-completions, openai-responses, anthropic-messages), baseUrl becomes baseURL, a header set every model shares becomes the route's headers, and each chat entry becomes a model with its id, name, contextWindow, maxTokens, input modalities, and thinking levels. A model's samplingParams become its defaults, so an endpoint's own sampling settings arrive as configuration rather than as a caller concern. Fields this adapter has no counterpart for — cost, compat flags it does not model, inputLimits, per-model headers — are reported one line each instead of guessed, and the route still serves. The profile's own fields win over the conversion; an absent or empty models list keeps the catalog's models; and a file that mixes protocols or endpoints, names no chat model, or cannot be read leaves the route with a diagnostic rather than a half-converted one.

providers:
  kimi-coding:
    catalog: /etc/dsh/official/kimi-coding.json
    apiKeyEnv: KIMI_CODING_API_KEY

Change configuration at runtime

Each operation captures the current provider set. A changed route set — or a route's display name, concurrency, or retry policy, which the registry captures at registration — re-registers the same adapter instance in place, so an in-flight request keeps the endpoint it started with and the next request sees the new one. A profile that cannot be served is refused where it is written and, when already stored, kept addressable with its diagnostic instead of taking the other routes down with it.