dsh-system1
Connect to multiple decision providers and models through one interface: Jev via TypeSafe, Clef via Cloudflare, Drex via Nace, Decider 1 via meraGPT, self-hosted Laya, and compatible custom providers. Agents and plugins can classify content, filter candidates, score against criteria, or locate objects in images, then use structured results in their own workflows. Requests can include text, images, audio, and video where the provider and model support them. The agent can call the built-in system1_decide tool, and plugins can use the same service through ctx.system1.decide().
English | 简体中文
Providers and models
Choose a built-in provider or add one that implements the public provider contract. Model options and supported inputs vary by provider and model.
| Provider | Model options | Deployment and notable support |
|---|---|---|
TypeSafe (typesafe) |
jev-latest, jev-preview, jev-1.14.0, jev-1.13.0 |
Hosted Jev; PNG/JPEG; box requires jev-1.14.0 or jev-preview; optional 262k context. |
Cloudflare (cloudflare) |
clef, clef-flash, clef-omni |
Workers AI or a compatible local Clef service; PNG/JPEG/WebP; clef-omni also accepts audio and video. |
Nace.AI (nace) |
drex-v2.0, drex-v1.5, drex-max, drex-max-v1.1, drex-max-finance |
Hosted Drex; all three Max models accept images, up to 512 questions and 255 choice/score options. Original Max selects from state up to 524k tokens, allows 262k per question and caps combined long questions at 1,048,576; v1.1 and Finance cap the whole request at 262k; Finance specializes in financial decisions. |
meraGPT (meragpt) |
decider-1 (sd-1, state-decider-1) |
Hosted Decider 1; 4k-token whole-request context, up to 64 questions and 10 choice/score options. Uses prepaid API credit. |
Laya (laya) |
auto, english, multilingual, typed-decisions |
Self-hosted Laya server; text only; API key optional. |
| Custom | — | Any backend implementing the public provider contract. |
See provider setup for credentials, endpoints, and full capability limits.
System One models are decision models that return typed answers with probabilities instead of generated text. The name borrows Kahneman's "fast thinking": they handle narrow judgments such as gating, routing, and scoring, while the main LLM writes and reasons.
| Primitive | Result |
|---|---|
noul |
Yes/no: probability that the proposition is true (probabilityTrue) |
choice |
Candidate key and the full probability distribution |
score |
Expected zero-based level and the probability distribution |
box |
Normalized image coordinates for a located object (model-dependent) |
Requests and responses are validated, and each question gets its own result. Calls support cancellation, per-attempt timeouts, and fallback models, and return execution metadata.
Install from npm
Install the package in a project that uses System One:
npm install dsh-system1
To activate the bundled service and providers in dsh, add the npm package to the profile you run. Replace <profile> with your profile name:
dsh plugin --profile <profile> add dsh-system1
The dsh plugin command requires a profile; installing into one profile does not activate the bundle in other profiles. To use the GitHub repository as the package source, replace dsh-system1 in that command with github:exoticknight/dsh-system1.
The bundled patch mounts the service and built-in providers. The service defaults to model jev-latest on provider typesafe. Each attempt uses a request-level timeoutMs when supplied, then that provider's configured timeout or its own default: 800 ms for TypeSafe, Laya, and Cloudflare; 60,000 ms for Nace. Set a provider timeout in that provider's settings page. Use plugin settings to choose the service and model, add fallbacks in order, configure connections, and store keys in DSH credentials; environment variables are also supported. Each fallback gets the full timeout budget, so total request time can grow with the chain length. Adjust the selected provider's timeoutMs for backend latency, especially local CPU inference.
Update notices
The first load of a new plugin release in DSH Web automatically shows an update summary. Select Release notes in the System One plugin settings to read it again. The summary ships with the plugin and works offline; the full release notes link requires a connection.
The current browser stores only the last shown notice ID for the current DSH origin. Refreshing or restarting does not repeat the notice; clearing site data, switching browsers, or downgrading and upgrading again may show it again. If browser storage or cross-tab coordination is unavailable, automatic notices are skipped and manual viewing remains available.
Agent tool
Once installed, the agent can call the system1_decide tool without a consumer plugin. The main model can hand yes/no checks, classification, and scoring to System One and decide the next step from the returned probabilities. The tool uses the default service and model configured above.
The bundle's system1-tool component provides the tool and is enabled by default. Turn the component off on the Plugins page to remove the tool, or set disabled: true on its entry in a headless profile. See the API reference for arguments and results.
Use from a consumer plugin
In your consumer plugin project, install the package with the npm command above. Then declare inject: ['system1'] and import this package's Cordis type augmentation:
import type { Context } from '@deepseek-ai/cordis'
import type {} from 'dsh-system1'
export const inject = ['system1']
export async function apply(ctx: Context) {
const result = await ctx.system1.decide({
state: 'The user asked about a refund.',
questions: {
refund: {
type: 'noul',
instructions: 'Is the user asking about a refund?',
},
topic: {
type: 'choice',
instructions: 'Choose a topic.',
criteria: { billing: 'Billing', technical: 'Technical support' },
},
urgency: {
type: 'score',
instructions: 'Rate urgency.',
criteria: ['Normal', 'Urgent', 'Critical'],
},
},
})
if (result.answers.topic.status === 'ok') {
return result.answers.topic.answer.value // 'billing' | 'technical'
}
return result.answers.topic.error
}
noul returns probabilityTrue; choice returns a candidate key and its full distribution; score returns an expected level and probabilities ordered by criteria; box returns normalized image edges. These are model outputs, so consumer plugins choose their own decision thresholds and actions. Runtime failures are reported per question with status: 'error'; malformed call structures throw System1InputError.
See API and provider development for the full contract and the consumer example. TypeSafe supports jev-latest, jev-preview, jev-1.14.0, and jev-1.13.0; see provider setup for other services and their limits.
Development
Use the Node.js and pnpm versions declared in package.json:
pnpm install --frozen-lockfile
pnpm verify
pnpm test runs the plugin and provider tests with local fixtures, as CI does; pnpm test <plugin|providers|provider name> runs a subset. Live model probes, pnpm probe <typesafe|nace|meragpt|cloudflare|laya|clef-local>, read credentials from .env.local, and local targets set up their own service on first use; hosted probes send real requests and can use account quota or prepaid credit. See testing and live model validation.
See the contribution guide and release process.
License
Licensed under the Apache License 2.0.
No comments yet. Be the first to write one.