Status: implemented
Version: latest
Review: source-backed
Last scanned: 2026-06-25T00:00:00Z
Review required: false
ModelRouter
Official NVIDIA/NIM-first model routing and sanitized ModelDecision evidence.
Official-route-first model boundary
ModelRouter selects configured official model routes and records ModelDecision evidence with hashes, status, route, schema version, provider labels, and redacted payload summaries.
| Decision type | Expected provider posture | Stored evidence |
|---|---|---|
| Lead/deal score | Frugal NVIDIA/Nemotron route when configured | Score, confidence, rationale summary, source refs |
| Copy safety | Safety route with schema validation | Risk category, approval recommendation, fail-closed status |
| Deliverable QA | Showcase or quality route | QA summary, gaps, release recommendation |
| Classification | Low-cost structured route | Class label, confidence, source hash |
| Fallback | Explicit fallback-only provider | Fallback label and non-official proof status |
Fail-closed behavior
- Missing official route cannot be represented as official NVIDIA proof.
- Invalid JSON or schema mismatch produces a failed ModelDecision.
- Unsafe draft/copy classifications block Gmail execution.
- Hidden reasoning, raw model context, API keys, and private values are not persisted in public proof surfaces.
- ModelDecision records link back to runs, drafts, approvals, artifacts, or ledger rows when available.
Official references
| System | Use in Trinity | Official docs |
|---|---|---|
| Hermes | Hosted agent runtime and skills context | Hermes Agent docs |
| Jido | Narrow policy/firewall action seam | Jido Actions and Workflows |
| NVIDIA | Nemotron scoring, safety, and QA decisions | NIM LLM API reference |
| Stripe | Checkout, webhooks, revenue proof, guarded spend | Checkout Sessions API |
| Gmail | Drafts, sends, aliases, scopes, inbound replies | Gmail API scopes |
| Phoenix/Oban/Postgres | Control plane, durable jobs, source-of-truth data | Phoenix LiveView |
Source paths
lib/autonomous_agency/ai/model_router.exlib/autonomous_agency/ai/model_decision.ex