Judging models
Choice-only judging models use the system-one adapter—such as TypeSafe Jev on OpenRouter—to answer fixed-choice questions (auto mode approvals and memory auto review) without generating prose. Because judging models do not write responses or call tools, MomongaCode restricts them to autoMode.classifier and memory.autoReviewModel; they cannot be set as models.start, models.fallback, --model, or models.roles (compaction, reflection, analysis, subagent).
Where judging models are used
autoMode.classifier. Judges tool calls that no explicit permission rule matches when the permission mode isauto. If the judging model refuses or fails to answer, MomongaCode falls back to asking you for approval.memory.autoReviewModel. Reviews proposed memories one at a time whenmemory.autoReviewistruein a trusted folder. It keeps a memory only when it judges it safe with high confidence; any other answer, refusal, or failure leaves the memory waiting for you and never rejects it.
A system-one connection requires baseUrl and capabilities.contextWindow for each model entry. It does not accept maxOutputTokens or capabilities.toolCalling, and MomongaCode skips discovery GET checks (momonga models check) and capability probing (momonga gateway probe) on system-one servers.
Setting up TypeSafe Jev on OpenRouter
Store your API key
API keys are always referenced, never stored directly in settings.json. To store your OpenRouter key in the OS secret store under a name of your choice:
momonga secret set openrouter-api-keyAlternatively, pass an environment variable name with apiKeyEnv instead of apiKeySecret (the variable must be present in the environment when the daemon starts).
Configure ~/.momonga/settings.json
Add a system-one entry to models.connections alongside your main coding model, and point autoMode.classifier and memory.autoReviewModel at its full provider/model-id name:
{
"models": {
"connections": [
{
"adapter": "ollama",
"baseUrl": "http://127.0.0.1:11434",
"models": [
{ "id": "your-model-name:latest", "capabilities": { "contextWindow": 32768, "maxOutputTokens": 4096 } }
]
},
{
"adapter": "system-one",
"provider": "openrouter-system-one",
"baseUrl": "https://openrouter.ai/api/v1",
"apiKeySecret": "openrouter-api-key",
"models": [
{ "id": "typesafe/jev-1.14", "capabilities": { "contextWindow": 128000 } }
]
}
]
},
"autoMode": {
"classifier": "openrouter-system-one/typesafe/jev-1.14"
},
"memory": {
"autoReview": true,
"autoReviewModel": "openrouter-system-one/typesafe/jev-1.14"
},
"pricing": [
{
"provider": "openrouter-system-one",
"model": "typesafe/jev-1.14",
"effectiveFrom": "2026-01-01",
"inputPerMTok": 0.042,
"outputPerMTok": 0,
"currency": "USD"
}
]
}Configuration notes:
- Avoid
providercollisions. Give thesystem-oneconnection a distinctprovider(for example,openrouter-system-one) if another entry inmodels.connectionsalready usesprovider: "openrouter"forchat-completionsoropen-responses. - Confirm the model ID on OpenRouter. OpenRouter model IDs can vary by release (for example,
typesafe/jev-1.14orjev-1.13); use the exact model ID listed by OpenRouter. - Using an environment variable instead of the secret store. Replace
"apiKeySecret": "openrouter-api-key"with"apiKeyEnv": "OPENROUTER_API_KEY". - Optional
pricingentry. If the server response does not include a cost field, adding an entry underpricingmatching the connection'sproviderand modelidlets/costand spend budgets calculate usage cost.
Managing judging models from the CLI and terminal UI
From the shell:
momonga models role list
momonga models role set <role> <model> --yes
momonga models role clear <role> --yesPass classifier as <role> and openrouter-system-one/typesafe/jev-1.14 as <model>.
In an interactive session:
- Judging models do not appear in the session
/modelpicker. Open/modeland chooseModel settings…(or openModelsinside/config) to inspect or edit judging roles. - Run
/auto-modeto inspect or change theautomode classifier. - Run
/memory auto onto enable memory auto review,/memory auto modelto choosememory.autoReviewModel, and/memory autoto inspect the current state.
Built-in local classifiers (local-guard)
MomongaCode also ships four built-in local guard models—two for auto mode approvals (momonga-guard-small and momonga-guard-base) and two for memory auto review (momonga-memory-guard-small at ~178 MB and momonga-memory-guard-base at ~346 MB)—that run offline on the CPU with zero external API keys or servers:
- Approvals (
/auto-mode): Open/auto-mode(or/model→Model settings…→Models for other roles→Auto-mode classifier) to pickmomonga-guard-smallormomonga-guard-base. Uninstalled entries show their download size (↓) and download on demand withEsccancel support and SHA-256 verification into your cache folder. Default staysUse the session's modeluntil you choose one. - Memory auto review (
/memory auto model): Open/memory auto model(or/model→Model settings…→Models for other roles→Memory auto review) to pickmomonga-memory-guard-small(↓ 178 MB) ormomonga-memory-guard-base(↓ 346 MB). Running/memory auto onstill adopts your current session model whenmemory.autoReviewModelis unset and only opens the picker when neither is configured, so nothing downloads unless you select it. - Each built-in local guard model is restricted to its own role (
momonga-guard-*toautoMode.classifier;momonga-memory-guard-*tomemory.autoReviewModel) with a 1,024-token context window. Inputs above 1,024 tokens, worker crashes, or timeouts fail closed—asking you for approval or leaving memories waiting for/memory review. - Inference runs in an isolated child worker (
local-guard-worker) that stops automatically after 5 minutes without a request, and all local guard models share one runtime cache (onnxruntime-node). - To delete cached model files (preserving the shared runtime cache while any other local guard model remains, and removing it once none remain), remove the entry via
/model→Model settings…→Remove(orRemove serveronmomonga-guard).
Verifying the setup
Check that the model is registered with its declared context window:
momonga modelsRun the built-in auto mode check against your classifier and view stored results:
momonga auto-mode check openrouter-system-one/typesafe/jev-1.14
momonga auto-mode statusRun a quick headless prompt in auto mode:
momonga -p "list the files in this folder" --permission-mode autoIn a trusted folder with memory.autoReview enabled, inspect memories waiting for or reviewed by the judging model with:
momonga memory review
momonga memory show <id>See Configuration for all connection fields, Settings keys for schema details, and Slash commands for interactive commands.