Notifications (Slack and signed webhooks)
When a daily check raises a new finding for your organization, ModelRig can send a short digest to a Slack channel or to a webhook you run. Each digest carries metadata only: the route, the model, the numbers behind the finding and a link to the console. It never carries prompts, outputs, artifact content, grader comments or your end users' identifiers.
Rolling out. Notifications are not yet available for every organization. Until they are, Account settings → Notifications says so andGET /v1/orgs/:org/settingsreportsnotifications_available: false. The MCP toolsadd_notification_channelandtest_notification_channelneedmodelrig-oracle0.8.0 or newer.
Notifications are server-side; no SDK change is needed. Only an owner (or a key with the org-settings scope, which only an owner can create) can change them.
What can notify you
| Event | Raised by | When |
|---|---|---|
conform_degradation — quality dropped on a route | the Monitor check | daily |
price_change — a model you use changed price | the price watch | every 6 hours |
new_model — a new model is available for a route | the price watch | every 6 hours |
regret_breach — regret drifted up | the regret monitor | daily, once that check is running for your deployment |
insight — a new Rig Analyst finding | the Rig Analyst | daily |
spend_paused — managed spend was paused | the managed-spend cap | when it happens |
When you turn notifications on, every event is on except new_model, which most teams find noisy. Change any of them in Account settings → Notifications or with set_org_settings.
Timing and repeats
- The notifier runs every 30 minutes. A finding reaches your channel within about 30 minutes of the check that raised it. Detection itself is the schedule above: this is not real-time alerting.
- One digest per run. Up to 10 findings are listed, newest first, with a "+N more" line and a link to the Action queue.
- The same condition is not repeated for 7 days. The checks re-raise a persisting problem every day; you hear about it once. It is sent again within the 7 days only if it gets worse by a step (for a quality drop, the next 5-point band).
- Turning notifications on does not replay old findings. The first run after you turn them on starts from that moment.
- A digest may repeat after a crash; de-duplicate on each event's
proposal_id. A digest that fails on every channel is not resent; the next re-raise of the condition notifies again.
Set it up
In the console: Account settings → Notifications, then Add Slack or Add webhook, Send test, and turn notifications on.
Over the API (owner session, or a rig_sk_ key with org-settings):
POST /v1/orgs/:org/notifications/channels
{ "type": "webhook", "url": "https://hooks.example.com/modelrig", "label": "ops" }
201 { "channel": { "id": "ch_…", "type": "webhook", "label": "ops",
"url_hint": "hooks.example.com/…/rig", "disabled_reason": null,
"failures": 0, "last_delivery": null },
"signing_secret": "<64 hex characters — shown once>" }
POST /v1/orgs/:org/notifications/channels/:id/test → { "ok": true, "status": 200, "ms": 140 }
DELETE /v1/orgs/:org/notifications/channels/:id → 204
PATCH /v1/orgs/:org/settings { "notifications": { "enabled": true, "events": { "new_model": true } } }
Over MCP: add_notification_channel, test_notification_channel, and set_org_settings with notifications.
MCP needs modelrig-oracle 0.8.0 or newer.
- At most 3 channels per organization; a label is up to 64 characters. At most 10 add attempts per 10 minutes per organization.
- The URL is write-only. It is stored encrypted (the same envelope as your provider keys) and is never returned — not by the API, not by MCP, not in the console. You see a hint: the host and the last four characters.
- A webhook's signing secret is shown once, in the response that creates the channel. To rotate it, add a new channel and delete the old one.
- Send test is limited to 5 per 10 minutes per organization. A successful test re-enables a channel that was turned off for failures.
- Every channel change is recorded in the audit log as
org.notifications.update, without the URL or secret.
Receiver URL rules
ModelRig checks the URL when you save it and every time it sends:
https:only, port 443, no username or password in the URL.- Slack channels must use a Slack incoming-webhook URL (
https://hooks.slack.com/services/…). localhostis refused by name. The hostname must resolve only to public addresses: for IPv4, loopback, private (RFC 1918), carrier-grade NAT (100.64.0.0/10), link-local and cloud-metadata (169.254.169.254, 168.63.129.16), multicast, reserved and documentation ranges are refused; for IPv6, only global unicast (2000::/3) is accepted, minus Teredo, documentation and 6to4 forms of a non-public IPv4 address. If any address the name resolves to is non-public, the URL is refused. DNS must answer within a few seconds.- The request goes to the exact address that was checked. Redirects are not followed: a 3xx counts as a failed delivery.
- The request times out after 5 seconds. A network error or a 5xx is retried once; a 4xx is not. The response body is ignored.
- A channel that fails 10 runs in a row is turned off and shows as disabled in the console. Fix the receiver, then Send test to turn it back on.
Slack message
A short Block Kit message: a headline, one section per finding (the finding, the route / task / model, its numbers) and a button to the Action queue. Route and task names are escaped, so a name can never mention @channel or inject a link.
Webhook payload
POST with content-type: application/json:
{
"v": 1,
"delivery_id": "dlv_8f1c…",
"org": "acme",
"sent_at": "2026-11-01T12:30:04.112Z",
"events": [
{
"event": "conform_degradation",
"proposal_id": "6c0d…",
"route": "summarize",
"task": "summarize",
"model": null,
"created_at": "2026-11-01T12:01:55.019Z",
"metrics": { "drop_pts": 12.5, "recent_rate": 0.81, "baseline_rate": 0.935, "recent_n": 120, "baseline_n": 900 },
"escalation": false,
"title": "Quality dropped on summarize (−12.5 pts)",
"link": "https://app.modelrig.ai/insights?proposal=6c0d…"
}
],
"more": 0,
"console_url": "https://app.modelrig.ai/insights"
}
Headers:
| Header | Value |
|---|---|
X-ModelRig-Delivery | The delivery_id (unique per channel per run). |
X-ModelRig-Signature | t=<unix seconds>,v1=<hex HMAC-SHA256(signing_secret, t + "." + raw body)> |
User-Agent | ModelRig-Notify/1 |
Verify the signature (Node)
Verify against the raw request body, before parsing it, and reject timestamps more than 5 minutes old (replay window).
import { createHmac, timingSafeEqual } from "node:crypto";
export function verifyModelRig(rawBody, header, secret, nowSeconds = Math.floor(Date.now() / 1000)) {
const parts = Object.fromEntries(header.split(",").map((kv) => kv.split("=")));
const t = Number(parts.t);
if (!Number.isInteger(t) || Math.abs(nowSeconds - t) > 300) return false;
const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
const given = Buffer.from(parts.v1 ?? "", "hex");
return given.length === expected.length && timingSafeEqual(given, expected);
}
Boundary
- Channels: Slack and webhooks. Email, PagerDuty and SMS are not built; a webhook reaches most of them (Teams, PagerDuty Events, Zapier).
- No per-user subscriptions, custom thresholds or per-route filters yet.
- Pin drift is shown on the route in the console, not notified.