PerryLink/dsh-local-ai ↗★ 17

dsh-local-ai

本地Ollama模型集成与路由工具 适合需要管理本地模型、按任务路由并在不可用时自动回退云端的用户。

包名
dsh-local-ai
兼容性
待验证
Harness 依赖范围
>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0
Cordis 依赖范围
^4.0.2
版本
0.2.14
许可证
Apache-2.0
最近更新
2026年9月24日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-local-ai

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.

KeyDefaultMeaning
baseURLhttp://127.0.0.1:11434Ollama HTTP API base URL; /api/* paths are appended
requestTimeoutMs30000Per-request HTTP timeout (milliseconds)
graceMs15000Subprocess terminate grace for the health-check CLI probe
defaultContextWindow8192Context capacity used when a model has no exact value
maxTokens4096Per-request output cap used when a model has no exact value
temperature(none)Default sampling temperature (0..2); omitted leaves the provider default
visiontrueDeclare and serialize image support when the model reports vision; false keeps the route text-only
visionCacheTtlMs30000Milliseconds a /api/show capability probe stays cached (0 disables caching; a pull or remove invalidates that model)
models[]Harness-visible → Ollama model mappings
models[].name(required)Harness-visible model name (GenerateOptions.model)
models[].model= nameOllama model id
models[].contextWindow(none)Per-model context capacity
models[].maxTokens(none)Per-model output cap
models[].temperature(none)Per-model sampling temperature
backends[]OpenAI-compatible local backends (LM Studio / vLLM / llama.cpp)
backends[].name(required)Backend name; registers provider id openai:
backends[].baseURL(required)Backend base URL including /v1, e.g. http://127.0.0.1:1234/v1
backends[].apiKey(none)Optional bearer API key (most local servers leave it empty)
backends[].models[]Harness-visible → backend model mappings
backends[].maxTokens4096Per-backend output cap used when a model has no exact value
backends[].temperature(none)Per-backend sampling temperature
route[]Local-model routing rules (first match wins)
route[].model(required)Target local model name
route[].providerollamaTarget provider id: ollama or openai:
route[].purpose(none)Task type match: compaction / session-title
route[].keywords[]Case-insensitive request keywords
route[].alwaysfalseRoute every eligible request to this model