Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(alerts): say that the AI detector uses AI credits (#128782)

posthog[bot]4c7dd14d8e8c
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index e7ae753ce15f..6e5fc025c9bb 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -6499,9 +6499,9 @@ snapshots:
products-alerts-alert-modal--edit-alert--light:
hash: v1.k794b7964.3addb07978a52a6bb1c5e4173e8b97482f38ef111fd2555fb0096fede11fe652.tAbNUUogl_o9J4KfOOQrXwcmE_acMb9mAMo5mouwIfU
products-alerts-alert-modal--edit-alert-with-llm-detector--dark:
- hash: v1.k794b7964.75e1adfe6859fda896ea943dd035f1bcd9ef12b06e43e18e72b50357f5397eea.3qapa1TiMwm1X-koHSGH9MawcMIKsDFIYHXBTrrIv3Y
+ hash: v1.k794b7964.021336eb5f5b55cb51c222171b6878b9948002ffb08d489352d3e27f7394fda7.WVOFLtIsyYiDV4g1bHN2i6hZ4WCztAGOwlWZDUyGyOo
products-alerts-alert-modal--edit-alert-with-llm-detector--light:
- hash: v1.k794b7964.f51983789d8484a83493627df4e94ddd8ad517782f18348f6850cc1bc7a2c76d.VXbz0LYw27YiVAHpze_4YcFoaHKi2VvLaFVWEbEs_T8
+ hash: v1.k794b7964.c411ff1c40243338b424bd6f7ccc4ffb38a51e22cfc6eea9955c444589a6e3f1.wJ5G7-wInRbwVuJ5PrgQo39B0tFOa6bfgV8tu0-LPv0
products-alerts-alert-modal--missing-alert--dark:
hash: v1.k794b7964.0720b6d8f7018a3759adb19bbff54e7beba5c67d6364337c179e8e0fdf21f3d0.iqqm7jC_qbtNjKFv8ozIEZ2LRpYyb93wcsQYy5-fMGs
products-alerts-alert-modal--missing-alert--light:
diff --git a/products/alerts/frontend/components/AlertSimulationSection.tsx b/products/alerts/frontend/components/AlertSimulationSection.tsx
index 43676ac0d3b0..1a6fce25ac1c 100644
--- a/products/alerts/frontend/components/AlertSimulationSection.tsx
+++ b/products/alerts/frontend/components/AlertSimulationSection.tsx
@@ -45,7 +45,7 @@ export function AlertSimulationSection({
loading={simulationResultLoading}
tooltip={
alertForm.detector_config?.type === DetectorType.LLM
- ? 'Ask the AI detector about the latest point, the same way a scheduled check does'
+ ? "Ask the AI detector about the latest point, the same way a scheduled check does. This uses your organization's AI credits."
: 'Run the detector on historical data to preview which points would be flagged as anomalies'
}
>
diff --git a/products/alerts/frontend/views/DetectorSelector.tsx b/products/alerts/frontend/views/DetectorSelector.tsx
index 8166d4c2ea1e..ccde25bdbbe0 100644
--- a/products/alerts/frontend/views/DetectorSelector.tsx
+++ b/products/alerts/frontend/views/DetectorSelector.tsx
@@ -49,7 +49,7 @@ const DETECTOR_OPTIONS: Array<{ value: string; label: string; tooltip: string }>
value: DetectorType.LLM,
label: 'AI judgment',
tooltip:
- 'Shows the recent series to an AI model and asks whether anything looks wrong. Pick this when you want to watch a metric without choosing a statistical method, or when what counts as odd is easier to describe than to measure.',
+ "Shows the recent series to an AI model and asks whether anything looks wrong. Pick this when you want to watch a metric without choosing a statistical method, or when what counts as odd is easier to describe than to measure. Each check uses your organization's AI credits.",
},
{
value: DetectorType.COPOD,
@@ -553,7 +553,8 @@ function LLMConfig({
</div>
<p className="text-xs text-muted">
Each check asks an AI model whether the latest value is unusual, given its recent history and the points
- this alert flagged before. This is slower and costs more than the statistical detectors.
+ this alert flagged before. Each check and each simulation uses your organization's AI credits, and
+ checks are slower than with the statistical detectors.
</p>
</div>
)
diff --git a/products/alerts/mcp/tools.yaml b/products/alerts/mcp/tools.yaml
index 0a448ee7bda6..e5a0c7cdda9e 100644
--- a/products/alerts/mcp/tools.yaml
+++ b/products/alerts/mcp/tools.yaml
@@ -30,9 +30,10 @@ tools:
history it reads follows the insight interval, and it also sees the points that its earlier checks fired on,
so instructions can refer to earlier alerts. It cannot be an ensemble member, cannot use preprocessing,
cannot run on the real_time cadence, is not available on breakdown insights, is capped per project, and is
- only available where the AI detector is enabled for the organization. Always send detector_config.type
- explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is
- dropped without an error. Requires an insight ID and at least one subscribed user.
+ only available where the AI detector is enabled for the organization. Every scheduled check of an llm alert
+ uses the organization's AI credits. Always send detector_config.type explicitly: a config with no type is
+ read as a z-score detector, and any llm-only field you sent with it is dropped without an error. Requires an
+ insight ID and at least one subscribed user.
The config type must match the insight kind. Trends insights: TrendsAlertConfig (series_index,
check_ongoing_interval). SQL/HogQL insights: HogQLAlertConfig — column picks which result column to evaluate
@@ -158,13 +159,14 @@ tools:
ensemble, or llm). Always send the type explicitly: a config with no type is read as a z-score detector, and
any llm-only field you sent with it is dropped without an error. A statistical detector only reads, so
alert:read and insight:read are enough for it. The llm type makes one real model call per simulation, so
- that type also needs the alert:write scope; it is rate limited per project, and takes the same instructions
- as an llm alert. It runs one live check of the latest point, not a scan of the history: it returns the
- verdict (the latest point in triggered_indices when it fires), the model's rationale and kind, and null
- scores. Pass alert with a saved alert's ID to give the model the points that alert's earlier checks fired
- on. Optionally specify date_from (e.g. '-48h', '-30d') to control how far back to simulate, and series_index
- to pick which series to analyze. Returns data values, anomaly scores per point, triggered indices and dates,
- and for ensemble detectors, per-sub-detector score breakdowns.
+ that type also needs the alert:write scope. Each llm simulation uses the organization's AI credits, is rate
+ limited per project, and takes the same instructions as an llm alert. It runs one live check of the latest
+ point, not a scan of the history: it returns the verdict (the latest point in triggered_indices when it
+ fires), the model's rationale and kind, and null scores. Pass alert with a saved alert's ID to give the
+ model the points that alert's earlier checks fired on. Optionally specify date_from (e.g. '-48h', '-30d') to
+ control how far back to simulate, and series_index to pick which series to analyze. Returns data values,
+ anomaly scores per point, triggered indices and dates, and for ensemble detectors, per-sub-detector score
+ breakdowns.
alert-update:
operation: alerts_partial_update
enabled: true
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index 1f09dce9fb24..ad0d0a5aac0a 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -888,7 +888,7 @@
"feature_flag": "aeo-citation-tracking"
},
"alert-create": {
- "description": "Create a new alert on an insight. Alerts can use either threshold-based conditions or anomaly detection. For threshold alerts: set condition (absolute_value, relative_increase, relative_decrease) and threshold configuration with bounds — at least one of lower or upper is required (omit detector_config). For anomaly detection: set detector_config with a detector type (zscore, mad, iqr, threshold, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca) and parameters like threshold (sensitivity 0-1, default 0.9) and window size. Ensemble detectors combine 2+ sub-detectors with AND/OR logic. The llm detector type asks an AI model whether the latest point is anomalous, given its history, and fires when the model says yes. Its only field is optional instructions (plain text describing what counts as unusual, up to 2000 characters). The history it reads follows the insight interval, and it also sees the points that its earlier checks fired on, so instructions can refer to earlier alerts. It cannot be an ensemble member, cannot use preprocessing, cannot run on the real_time cadence, is not available on breakdown insights, is capped per project, and is only available where the AI detector is enabled for the organization. Always send detector_config.type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. Requires an insight ID and at least one subscribed user.\nThe config type must match the insight kind. Trends insights: TrendsAlertConfig (series_index, check_ongoing_interval). SQL/HogQL insights: HogQLAlertConfig — column picks which result column to evaluate (defaults to the single numeric column), evaluation is required and selects how rows are read: 'last_row' (query ordered oldest->newest, the last row is the current value), 'first_row' (query ordered newest->oldest, the first row is the current value — pair with a LIMIT, and it is unaffected by result truncation), or 'any_row' (every row is checked and the alert fires if any value breaches; absolute_value condition only). label_column names the evaluated row(s) in breach messages in every evaluation mode (defaults to the first non-evaluated column). Label values appear in delivered notifications — avoid label columns containing PII. Funnel insights: FunnelsAlertConfig — funnel_step picks the step to monitor (null for the overall last step), metric is 'conversion_from_start' or 'conversion_from_previous', and check_ongoing_interval (historical-trend funnels: also evaluate the current in-progress period). Steps funnels support only absolute_value conditions; historical-trend funnels also support relative_increase/relative_decrease. Anomaly detection (detector_config) is supported for trends and SQL insights (not funnels).\ncalculation_interval sets how often the alert runs: real_time, every_15_minutes, hourly, daily, weekly, or monthly. real_time needs a Scale or Enterprise plan. every_15_minutes needs a Boost, Scale, or Enterprise add-on. The field is optional and defaults to daily. If the user does not specify a cadence, ask before creating the alert.\nTo set the check time, pass schedule_start_time with a local HH:MM time. Updates take effect after the current next_check_at, so they cannot increase the alert check frequency.\nNote: subscribed_users only controls email recipients. To also post the alert to Slack, create it and then call alert-destinations-create with the workspace and channel. For HTTPS webhook or Discord delivery, see the recipe on cdp-functions-create — it covers integration lookup (integrations-channels-retrieve), dedupe (cdp-functions-list filtered by alert id, limit=1000), and the exact filters/inputs shape to pass.",
+ "description": "Create a new alert on an insight. Alerts can use either threshold-based conditions or anomaly detection. For threshold alerts: set condition (absolute_value, relative_increase, relative_decrease) and threshold configuration with bounds — at least one of lower or upper is required (omit detector_config). For anomaly detection: set detector_config with a detector type (zscore, mad, iqr, threshold, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca) and parameters like threshold (sensitivity 0-1, default 0.9) and window size. Ensemble detectors combine 2+ sub-detectors with AND/OR logic. The llm detector type asks an AI model whether the latest point is anomalous, given its history, and fires when the model says yes. Its only field is optional instructions (plain text describing what counts as unusual, up to 2000 characters). The history it reads follows the insight interval, and it also sees the points that its earlier checks fired on, so instructions can refer to earlier alerts. It cannot be an ensemble member, cannot use preprocessing, cannot run on the real_time cadence, is not available on breakdown insights, is capped per project, and is only available where the AI detector is enabled for the organization. Every scheduled check of an llm alert uses the organization's AI credits. Always send detector_config.type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. Requires an insight ID and at least one subscribed user.\nThe config type must match the insight kind. Trends insights: TrendsAlertConfig (series_index, check_ongoing_interval). SQL/HogQL insights: HogQLAlertConfig — column picks which result column to evaluate (defaults to the single numeric column), evaluation is required and selects how rows are read: 'last_row' (query ordered oldest->newest, the last row is the current value), 'first_row' (query ordered newest->oldest, the first row is the current value — pair with a LIMIT, and it is unaffected by result truncation), or 'any_row' (every row is checked and the alert fires if any value breaches; absolute_value condition only). label_column names the evaluated row(s) in breach messages in every evaluation mode (defaults to the first non-evaluated column). Label values appear in delivered notifications — avoid label columns containing PII. Funnel insights: FunnelsAlertConfig — funnel_step picks the step to monitor (null for the overall last step), metric is 'conversion_from_start' or 'conversion_from_previous', and check_ongoing_interval (historical-trend funnels: also evaluate the current in-progress period). Steps funnels support only absolute_value conditions; historical-trend funnels also support relative_increase/relative_decrease. Anomaly detection (detector_config) is supported for trends and SQL insights (not funnels).\ncalculation_interval sets how often the alert runs: real_time, every_15_minutes, hourly, daily, weekly, or monthly. real_time needs a Scale or Enterprise plan. every_15_minutes needs a Boost, Scale, or Enterprise add-on. The field is optional and defaults to daily. If the user does not specify a cadence, ask before creating the alert.\nTo set the check time, pass schedule_start_time with a local HH:MM time. Updates take effect after the current next_check_at, so they cannot increase the alert check frequency.\nNote: subscribed_users only controls email recipients. To also post the alert to Slack, create it and then call alert-destinations-create with the workspace and channel. For HTTPS webhook or Discord delivery, see the recipe on cdp-functions-create — it covers integration lookup (integrations-channels-retrieve), dedupe (cdp-functions-list filtered by alert id, limit=1000), and the exact filters/inputs shape to pass.",
"category": "Alerts",
"feature": "alerts",
"summary": "Create alert",
@@ -963,7 +963,7 @@
}
},
"alert-simulate": {
- "description": "Run an anomaly detector on an insight's historical data without creating any alert or check records. Use this to preview how a detector configuration would perform before saving it as an alert. Pass either the numeric insight ID or its saved short ID. Omit detector_config to use the default daily z-score detector (threshold 0.95, window 90, first-difference preprocessing). To choose another detector, pass detector_config with a type (zscore, mad, iqr, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca, ensemble, or llm). Always send the type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. A statistical detector only reads, so alert:read and insight:read are enough for it. The llm type makes one real model call per simulation, so that type also needs the alert:write scope; it is rate limited per project, and takes the same instructions as an llm alert. It runs one live check of the latest point, not a scan of the history: it returns the verdict (the latest point in triggered_indices when it fires), the model's rationale and kind, and null scores. Pass alert with a saved alert's ID to give the model the points that alert's earlier checks fired on. Optionally specify date_from (e.g. '-48h', '-30d') to control how far back to simulate, and series_index to pick which series to analyze. Returns data values, anomaly scores per point, triggered indices and dates, and for ensemble detectors, per-sub-detector score breakdowns.",
+ "description": "Run an anomaly detector on an insight's historical data without creating any alert or check records. Use this to preview how a detector configuration would perform before saving it as an alert. Pass either the numeric insight ID or its saved short ID. Omit detector_config to use the default daily z-score detector (threshold 0.95, window 90, first-difference preprocessing). To choose another detector, pass detector_config with a type (zscore, mad, iqr, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca, ensemble, or llm). Always send the type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. A statistical detector only reads, so alert:read and insight:read are enough for it. The llm type makes one real model call per simulation, so that type also needs the alert:write scope. Each llm simulation uses the organization's AI credits, is rate limited per project, and takes the same instructions as an llm alert. It runs one live check of the latest point, not a scan of the history: it returns the verdict (the latest point in triggered_indices when it fires), the model's rationale and kind, and null scores. Pass alert with a saved alert's ID to give the model the points that alert's earlier checks fired on. Optionally specify date_from (e.g. '-48h', '-30d') to control how far back to simulate, and series_index to pick which series to analyze. Returns data values, anomaly scores per point, triggered indices and dates, and for ensemble detectors, per-sub-detector score breakdowns.",
"category": "Alerts",
"feature": "alerts",
"summary": "Simulate detector on insight",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index c49c2644a2ed..5c5312cf7487 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -903,7 +903,7 @@
}
},
"alert-create": {
- "description": "Create a new alert on an insight. Alerts can use either threshold-based conditions or anomaly detection. For threshold alerts: set condition (absolute_value, relative_increase, relative_decrease) and threshold configuration with bounds — at least one of lower or upper is required (omit detector_config). For anomaly detection: set detector_config with a detector type (zscore, mad, iqr, threshold, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca) and parameters like threshold (sensitivity 0-1, default 0.9) and window size. Ensemble detectors combine 2+ sub-detectors with AND/OR logic. The llm detector type asks an AI model whether the latest point is anomalous, given its history, and fires when the model says yes. Its only field is optional instructions (plain text describing what counts as unusual, up to 2000 characters). The history it reads follows the insight interval, and it also sees the points that its earlier checks fired on, so instructions can refer to earlier alerts. It cannot be an ensemble member, cannot use preprocessing, cannot run on the real_time cadence, is not available on breakdown insights, is capped per project, and is only available where the AI detector is enabled for the organization. Always send detector_config.type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. Requires an insight ID and at least one subscribed user.\nThe config type must match the insight kind. Trends insights: TrendsAlertConfig (series_index, check_ongoing_interval). SQL/HogQL insights: HogQLAlertConfig — column picks which result column to evaluate (defaults to the single numeric column), evaluation is required and selects how rows are read: 'last_row' (query ordered oldest->newest, the last row is the current value), 'first_row' (query ordered newest->oldest, the first row is the current value — pair with a LIMIT, and it is unaffected by result truncation), or 'any_row' (every row is checked and the alert fires if any value breaches; absolute_value condition only). label_column names the evaluated row(s) in breach messages in every evaluation mode (defaults to the first non-evaluated column). Label values appear in delivered notifications — avoid label columns containing PII. Funnel insights: FunnelsAlertConfig — funnel_step picks the step to monitor (null for the overall last step), metric is 'conversion_from_start' or 'conversion_from_previous', and check_ongoing_interval (historical-trend funnels: also evaluate the current in-progress period). Steps funnels support only absolute_value conditions; historical-trend funnels also support relative_increase/relative_decrease. Anomaly detection (detector_config) is supported for trends and SQL insights (not funnels).\ncalculation_interval sets how often the alert runs: real_time, every_15_minutes, hourly, daily, weekly, or monthly. real_time needs a Scale or Enterprise plan. every_15_minutes needs a Boost, Scale, or Enterprise add-on. The field is optional and defaults to daily. If the user does not specify a cadence, ask before creating the alert.\nTo set the check time, pass schedule_start_time with a local HH:MM time. Updates take effect after the current next_check_at, so they cannot increase the alert check frequency.\nNote: subscribed_users only controls email recipients. To also post the alert to Slack, create it and then call alert-destinations-create with the workspace and channel. For HTTPS webhook or Discord delivery, see the recipe on cdp-functions-create — it covers integration lookup (integrations-channels-retrieve), dedupe (cdp-functions-list filtered by alert id, limit=1000), and the exact filters/inputs shape to pass.",
+ "description": "Create a new alert on an insight. Alerts can use either threshold-based conditions or anomaly detection. For threshold alerts: set condition (absolute_value, relative_increase, relative_decrease) and threshold configuration with bounds — at least one of lower or upper is required (omit detector_config). For anomaly detection: set detector_config with a detector type (zscore, mad, iqr, threshold, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca) and parameters like threshold (sensitivity 0-1, default 0.9) and window size. Ensemble detectors combine 2+ sub-detectors with AND/OR logic. The llm detector type asks an AI model whether the latest point is anomalous, given its history, and fires when the model says yes. Its only field is optional instructions (plain text describing what counts as unusual, up to 2000 characters). The history it reads follows the insight interval, and it also sees the points that its earlier checks fired on, so instructions can refer to earlier alerts. It cannot be an ensemble member, cannot use preprocessing, cannot run on the real_time cadence, is not available on breakdown insights, is capped per project, and is only available where the AI detector is enabled for the organization. Every scheduled check of an llm alert uses the organization's AI credits. Always send detector_config.type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. Requires an insight ID and at least one subscribed user.\nThe config type must match the insight kind. Trends insights: TrendsAlertConfig (series_index, check_ongoing_interval). SQL/HogQL insights: HogQLAlertConfig — column picks which result column to evaluate (defaults to the single numeric column), evaluation is required and selects how rows are read: 'last_row' (query ordered oldest->newest, the last row is the current value), 'first_row' (query ordered newest->oldest, the first row is the current value — pair with a LIMIT, and it is unaffected by result truncation), or 'any_row' (every row is checked and the alert fires if any value breaches; absolute_value condition only). label_column names the evaluated row(s) in breach messages in every evaluation mode (defaults to the first non-evaluated column). Label values appear in delivered notifications — avoid label columns containing PII. Funnel insights: FunnelsAlertConfig — funnel_step picks the step to monitor (null for the overall last step), metric is 'conversion_from_start' or 'conversion_from_previous', and check_ongoing_interval (historical-trend funnels: also evaluate the current in-progress period). Steps funnels support only absolute_value conditions; historical-trend funnels also support relative_increase/relative_decrease. Anomaly detection (detector_config) is supported for trends and SQL insights (not funnels).\ncalculation_interval sets how often the alert runs: real_time, every_15_minutes, hourly, daily, weekly, or monthly. real_time needs a Scale or Enterprise plan. every_15_minutes needs a Boost, Scale, or Enterprise add-on. The field is optional and defaults to daily. If the user does not specify a cadence, ask before creating the alert.\nTo set the check time, pass schedule_start_time with a local HH:MM time. Updates take effect after the current next_check_at, so they cannot increase the alert check frequency.\nNote: subscribed_users only controls email recipients. To also post the alert to Slack, create it and then call alert-destinations-create with the workspace and channel. For HTTPS webhook or Discord delivery, see the recipe on cdp-functions-create — it covers integration lookup (integrations-channels-retrieve), dedupe (cdp-functions-list filtered by alert id, limit=1000), and the exact filters/inputs shape to pass.",
"category": "Alerts",
"feature": "alerts",
"summary": "Create alert",
@@ -978,7 +978,7 @@
}
},
"alert-simulate": {
- "description": "Run an anomaly detector on an insight's historical data without creating any alert or check records. Use this to preview how a detector configuration would perform before saving it as an alert. Pass either the numeric insight ID or its saved short ID. Omit detector_config to use the default daily z-score detector (threshold 0.95, window 90, first-difference preprocessing). To choose another detector, pass detector_config with a type (zscore, mad, iqr, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca, ensemble, or llm). Always send the type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. A statistical detector only reads, so alert:read and insight:read are enough for it. The llm type makes one real model call per simulation, so that type also needs the alert:write scope; it is rate limited per project, and takes the same instructions as an llm alert. It runs one live check of the latest point, not a scan of the history: it returns the verdict (the latest point in triggered_indices when it fires), the model's rationale and kind, and null scores. Pass alert with a saved alert's ID to give the model the points that alert's earlier checks fired on. Optionally specify date_from (e.g. '-48h', '-30d') to control how far back to simulate, and series_index to pick which series to analyze. Returns data values, anomaly scores per point, triggered indices and dates, and for ensemble detectors, per-sub-detector score breakdowns.",
+ "description": "Run an anomaly detector on an insight's historical data without creating any alert or check records. Use this to preview how a detector configuration would perform before saving it as an alert. Pass either the numeric insight ID or its saved short ID. Omit detector_config to use the default daily z-score detector (threshold 0.95, window 90, first-difference preprocessing). To choose another detector, pass detector_config with a type (zscore, mad, iqr, copod, ecod, hbos, isolation_forest, knn, lof, ocsvm, pca, ensemble, or llm). Always send the type explicitly: a config with no type is read as a z-score detector, and any llm-only field you sent with it is dropped without an error. A statistical detector only reads, so alert:read and insight:read are enough for it. The llm type makes one real model call per simulation, so that type also needs the alert:write scope. Each llm simulation uses the organization's AI credits, is rate limited per project, and takes the same instructions as an llm alert. It runs one live check of the latest point, not a scan of the history: it returns the verdict (the latest point in triggered_indices when it fires), the model's rationale and kind, and null scores. Pass alert with a saved alert's ID to give the model the points that alert's earlier checks fired on. Optionally specify date_from (e.g. '-48h', '-30d') to control how far back to simulate, and series_index to pick which series to analyze. Returns data values, anomaly scores per point, triggered indices and dates, and for ensemble detectors, per-sub-detector score breakdowns.",
"category": "Alerts",
"feature": "alerts",
"summary": "Simulate detector on insight",