New to Kestra?
Use blueprints to kickstart your first workflows.
List reachable Cerebras models, alert Slack on allowlist drift or a disappeared model, and log the result for AI platform teams.
An inference provider's model catalog is not static: a preview model can become reachable on an account without anyone opting in, and a model your production flows depend on can be deprecated and removed with no warning beyond a changelog entry. Cerebras exposes the live list through its own Models API; this blueprint diffs that list against the allowlist you actually approved, in both directions, instead of assuming the catalog never changes.
This blueprint was created by Mohit Jeswani.
list_models (io.kestra.plugin.cerebras.ListModels) calls GET /models and returns
every model id the API key can currently see. Read-only; nothing in the Cerebras account
is changed. allowFailure: true covers an API or auth error without failing the flow
outright.evaluate (io.kestra.plugin.core.output.OutputValues) computes, with jq, the set of
available-but-not-approved models (unapproved_models) and the set of
approved-but-no-longer-available models (missing_models), plus a combined
drift_count.route (io.kestra.plugin.core.flow.If):summary logs the drift count and severity, closing the governance cycle.errors alerts Slack if the flow itself fails, for example an expired API key.ListModels used as a
standing compliance check rather than a one-off lookup before a ChatCompletion call.Cerebras reports what is reachable right now; it does not know what your organization
approved, compare the two lists, or notify anyone when they diverge. Kestra keeps
approved_models as a flow input instead of a wiki page nobody reads, turns the diff into a
Slack page naming the exact models involved, and keeps a full execution history of every
run.
This flow calls the Cerebras API directly over HTTPS; there is no official local Cerebras
emulator, so list_models cannot be exercised against a local Docker container.
CEREBRAS_API_KEY: the Cerebras API key used by list_models. In Kestra OSS, provide it
as the base64-encoded environment variable SECRET_CEREBRAS_API_KEY.SLACK_WEBHOOK_URL: used by alert and the errors block. In Kestra OSS, provide it as
the base64-encoded environment variable SECRET_SLACK_WEBHOOK_URL.| Input | Type | Default | Description |
|---|---|---|---|
approved_models |
ARRAY | ["llama3.1-8b", "llama-3.3-70b", "qwen-3-32b"] |
Model IDs your flows are authorized to call |
alert_on_drift |
BOOL | true |
Whether allowlist drift triggers the Slack alert |
{{ outputs.list_models.models }}: every model the API key can see (id, ownedBy,
created).{{ outputs.evaluate.values.unapproved_models }} / .missing_models: semicolon-joined
model ids present but not approved, and approved but no longer present.{{ outputs.evaluate.values.drift_count }} / .severity: OK, MODEL_DRIFT, or
CRITICAL.ListModels only reports what the API key is scoped to see; an organization-wide model
rollout invisible to this particular key will not show up as drift until the key itself
gains access.created is null for a model entry when the Cerebras API does not provide a meaningful
timestamp; this blueprint does not depend on it, but a downstream extension that sorts by
age should account for nulls.missing_models cannot distinguish "deprecated and removed" from "temporarily
unavailable during a provider incident"; a model disappearing for one run and returning on
the next still counts as drift on the run where it was absent.CEREBRAS_API_KEY and SLACK_WEBHOOK_URL secrets.approved_models to your actual production allowlist.compliant logs the live model list.approved_models to confirm alert fires with
it listed under unapproved, then restore it.daily trigger once the allowlist reflects what your flows are actually
approved to call.io.kestra.plugin.cerebras.ChatCompletion against each missing_models entry before
alerting, to distinguish a true removal from a transient listing glitch.available_model_ids in a KV entry to diff consecutive runs and report
exactly when a model first appeared or disappeared, not just that it currently differs.