prism_infer
Run local AI inference using prism-coder models, automatically selecting the largest viable tier (2B-27B) based on available RAM. Falls back to cloud when local fails, saving tokens on successful runs.
Instructions
Run an inference on a local prism-coder model (Ollama) to save cloud tokens. Picks the largest viable tier — 27B / 9B / 4B / 2B — based on free RAM at call time, clamped by model_ceiling and what is actually pulled in Ollama. Falls through to the synalux portal cloud cascade (9B → 27B → Claude Opus 4.7) only when local is unviable AND cloud_fallback=true. Use this for code generation, summarisation, classification, or any synth task you would otherwise hand to the cloud model — it costs $0 when the local hit succeeds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Execution mode. 'route' (default) for MCP tool routing — fast, nothink. 'chat' for general conversation — uses thinking, escalates to cloud on failure. 'code' for code generation — uses thinking, larger context. In chat/code modes, prefers the 27B tier and enables <think> reasoning. | route |
| think | No | Enable thinking mode (<think> blocks). Default: true for chat/code, false for route. Thinking improves quality on complex tasks but adds latency (~2-5s). | |
| prompt | Yes | The user prompt. Required. | |
| system | No | Optional system instruction prepended to the prompt. | |
| verify | No | Enable the L3 grounding verifier. Default: true when `evidence` is provided, false otherwise. When enabled, the model's draft is checked by a different model (qwen3.5:4b by default) against the supplied `evidence`. Drafts with NEUTRAL or CONTRADICTED claims are refused. | |
| evidence | No | Optional evidence snippets the model output must be grounded in. When supplied with `verify: true`, every assertive claim in the draft (numbers, names, dates, codes, $ amounts) must be ENTAILED by one of these snippets or the draft is refused. | |
| max_tokens | No | Max output tokens (default 1024, hard cap 8192). | |
| timeout_ms | No | Override per-call timeout. Default scales with model size: 27B=120s, 9B=60s, 4B=20s, 2B=15s. | |
| temperature | No | Sampling temperature, 0 = deterministic (default 0). | |
| model_ceiling | No | Cap the largest tier the picker may select. e.g. '9b' forbids 27B even if RAM allows. | |
| cloud_fallback | No | If true, fall through to synalux portal cascade on local fail. Default false — token-saving mode is the point of this tool. | |
| verifier_model | No | Override the verifier model. Default: qwen3.5:4b. | |
| verifier_timeout_ms | No | Override the verifier hard timeout. Default 2000 ms. |