Integrate the decision-model-preview model through your AI tool's extension mechanism: using automated comment moderation as the example, one request judges multiple comments in parallel and returns choice, probabilities, and confidence for confidence-based auto-approve, auto-hide, or human review.
Background: why a decision model
Comment moderation, ticket triage, and request routing are judgment tasks. The common approach is to have a chat model output JSON: the rules live in a prompt and can be steered off course by suggestive content; the output often arrives wrapped in code fences that parse unreliably; and the model generates a paragraph of analysis first, which adds token cost.
decision-model-preview is a decision model built for exactly these judgments. Send state (the content to judge) and questions (typed questions) to the /compatible-mode/v1/systemone endpoint and get structured answers back: choice (the verdict), probabilities (the distribution), and confidence (how sure). No natural-language text is generated. Questions come in three types: Choice (pick from options), Score (rate against ordered levels), and Noul (return a 0-to-1 probability), and a single call can mix several questions evaluated in parallel.
Compared with asking a chat model to "quickly classify this":
- Judgment criteria are passed structurally in the
criteriafield, not depending on the wording of a long prompt - The response is JSON, with no fences and no extra prose, ready for agents and code to consume
- Answers are short structures rather than long text, keeping output token cost low for high-frequency calls
Integrating decision models currently supports only Token Plan Personal Edition.
Example: integrate comment moderation in Claude Code
Claude Code is used here as the example, integrating the decision model through a Slash Command. Other tools follow the same pattern; only the extension mechanism and config file path differ.
Step 1: Create a Slash Command
Configure the subscription API Key (prefixed with sk-sp-) as the environment variable $ANTHROPIC_AUTH_TOKEN for later curl authentication.
Create .claude/commands/review-comments.md in the project root with the following content:
Step 2: Moderate comments
Prepare a comments file comments.txt with one comment per line:
Enter /review-comments comments.txt in Claude Code. Example output:
Two things in the output are worth noting:
- #5 and #9 are criticism and an error report, both judged pass. The verdict reflects the nature of the content, not its tone. Criticism, questions, and error reports count as normal discussion, a rule written into
criteria. - #8 is a technical share with a link, confidence only 0.69, sent to the human queue. The content sits between sharing and solicitation, and the distribution is not extreme either (spam 0.84 / pass 0.16): the model signals a leaning but insufficient certainty, exactly the kind of sample that
criteriaboundary descriptions exist to handle. The routing threshold lives in step 4 of the Command; raise it to be more conservative, lower it to automate more.
Read the three response fields
Answers come back under the same keys used in questions. Each Choice answer contains:
| Field | Meaning | How to use it |
|---|---|---|
choice | The selected option | Branch basis: approve or hide |
probabilities | Probability of each option, summing to 1 | Display, sorting, weighting |
confidence | How sure, 0 to 1 | Threshold routing: high acts automatically, low goes to humans |
questions are custom and take no part in inference. For degree-style judgments, switch to Noul (returns a 0-to-1 probability) or Score (rates against levels); a single call can mix them.
Other tools
The table below lists the extension mechanism and config file path for each tool, covering mainstream AI coding tools that support extension mechanisms. Save the Claude Code configuration above to the corresponding path.
| Tool | Extension mechanism | Config file path |
|---|---|---|
| Claude Code | Slash Command | .claude/commands/review-comments.md |
| Codex | Skill | ~/.codex/skills/token-plan-review/SKILL.md |
| Qwen Code | Skill | ~/.qwen/skills/review-comments/SKILL.md |
| OpenCode | Agent | .opencode/agents/review-comments.md |
| OpenClaw | Skill | ~/.openclaw/workspace/skills/token-plan-review/SKILL.md |
| Hermes Agent | Skill | ~/.hermes/skills/moderation/review-comments/SKILL.md |
| Qoder | Skill | ~/.qoder/skills/review-comments/SKILL.md |
Skill-based tools (Codex, Qwen Code, OpenClaw, Hermes Agent, Qoder) need YAML front matter at the top of the config file. The complete config file:
Notes
- Judgment boundaries live in
criteria. Describe borderline cases (such as technical shares with links) as explicit option descriptions; that works better than repeatedly rewording the question. - Split complex judgments: ask one specific question at a time, judge each dimension separately, and combine the results in the Command's routing rules.
- A low
confidenceis the model explicitly signaling uncertainty; routing to humans beats retrying. The 0.9 threshold is an example value, adjust it to your cost of misjudgment. - Handle failures by status code:
401check the API Key,422means request body validation failed (the response body names the offending field),429and529retry after backoff. - The model outputs a verdict and its certainty, not a guarantee of fact. Keep a human review step for high-risk actions such as account bans or fund handling.