Skip to main content
Docs

One endpoint,
every model.

Tare is an OpenAI-compatible gateway in front of every model you use — ours and the ones you bring yourself. One base URL, one key, and every token accounted for.

OperationsAlerts

Alerts

What this solves: Get notified when there's spend, request volume, a channel failure, or a DLP hit — and confirm the notification actually arrived, instead of stopping at "saved successfully".

Alert configuration has to do two things at once: rules and delivery channels. Configure only half and you have no alerts.

Setup order

  1. Open Alerts.
  2. Choose an account-level rule, or configure an exception rule for a specific key.
  3. Set the threshold, action, and enabled state.
  4. Configure a delivery channel: Webhook or Feishu / Lark.
  5. After saving, verify delivery: check the recent notification log and confirm the target group or Webhook actually received the message.

Don't take "saved successfully" as "alerts will be delivered". The Feishu signing secret, bot permissions, and clock skew can all cause you to miss messages, and most of these failures are silent.

How to think about account-level vs. key-level

Account-level rules cover all keys that don't have their own configuration. When a key has its own rule, it overrides the account default. This lets you set a separate budget for a production key without repeating the configuration on every key.

Rule types

Console → Alerts. Rules monitor spend, error rate, and channel failures; the channel decides where notifications go.

Each rule is resolved by (account, key), most specific wins: a rule set on a key overrides one set on the whole account, and an account-level one overrides the platform default.

ruleTypeWhat it monitorsDefault actionScope
HIGH_FREQUENCYRequests per minute for a single key: model, provisioning, or reconciliation keyBLOCKPer key
HIGH_FREQUENCY_ACCOUNTTotal model requests per minute for the whole accountBLOCKAccount
MONTHLY_BUDGETMonthly budget consumption, at the 50% / 80% / 100% tiersNOTIFYAccount
LOW_BALANCEHow many days you can last at the current burn rate, not a fixed balance figureNOTIFYAccount
UPSTREAM_CHANNEL_DOWNA channel is circuit-broken or recovered, or keeps rejecting requests other channels serveNOTIFYAccount
UPSTREAM_ALL_DOWNAll candidate channels for a model are unavailable and requests are being rejectedNOTIFYAccount
DLP_DETECTEDA request contains sensitive content you set to "alert" on the Security page; the request is forwarded unchangedNOTIFYAccount
NODE_OFFLINEOne of your local nodes has had its tunnel down for 3 minutes, or has reconnected after thatNOTIFYAccount
PROVIDER_ARREARSOne of your channels' upstream accounts is out of credit (the upstream says so: in arrears, insufficient balance, HTTP 402)NOTIFYAccount or channel
PROVIDER_ACCOUNT_BANNEDOne of your channels' upstream accounts is disabled, suspended, or refuses every request with an empty answerNOTIFYAccount or channel
PROVIDER_STREAM_ERRORSOne of your channels keeps cutting streams off with an error after output has started: 5 times in 10 minutes by defaultNOTIFYAccount or channel
  • MONTHLY_BUDGET counts everything you spend through Tare, including what you pay your own upstream on BYOK.
  • LOW_BALANCE only covers traffic Tare bills (platform models).
  • UPSTREAM_CHANNEL_DOWN is a heads-up: traffic fails over to the next candidate, unless it was the only channel for that model. You also get it when a channel rejects a request with a 4xx three times within an hour and the same request then succeeds on another channel. That channel is not paused, but each of those requests took an extra round trip. The notification carries the upstream's error message; usually the channel rejects a particular field or input type, so either add a parameter rule for it or remove it from that model's route. UPSTREAM_ALL_DOWN is an outage: calls to that model are refused with 503.
  • HIGH_FREQUENCY_ACCOUNT is for fleets of child keys that each stay under the per-key limit but add up.
  • The three PROVIDER_* rules name the cause instead of the symptom, and fire once per channel, not once per model: an account that runs out of credit stops every model on it, and you get one notification that says to top it up. Out of credit and banned fire on the first occurrence and then stay quiet for 6 hours; error frames fire when the count reaches the threshold. They are on by default and only cover your own channels. You can switch any of them off for a single channel, see below.
  • An upstream that answers 200 but refuses before writing a single word counts as a failed attempt, and the request moves to the next channel on the route. If every channel refuses, you get the last refusal unchanged (finish_reason: "content_filter"): then it is the request content, not the channel.
  • A rule with no threshold and no platform default stays silent until you set a value.

BLOCK exists only on these two HIGH_FREQUENCY* types, and only you can loosen it. All other rules default to NOTIFY: a spend or availability alert shouldn't block your own traffic the first time it fires. HIGH_FREQUENCY is the platform's own request-rate guardrail, and it's in effect as BLOCK by default; you can raise the threshold or change it to NOTIFY (see Rate limits and quotas), but it never starts out looser than this.

Configuring a rule

  • GET /v1/alerts/rules?apiKeyId=: each rule type, whether it's configured, and if so the currently effective threshold/action/severity/channel. Omit apiKeyId for the account-level view.
  • PUT /v1/alerts/rules: create or update one, located by (ruleType, apiKeyId). Fields: threshold, windowSeconds, action, severity (INFO/WARNING/CRITICAL), channels (comma-separated channel names, see below; empty means send to all channels you've configured), silenceSeconds, enabled.
  • DELETE /v1/alerts/rules/{id}: delete your override, falling back to the account or platform default — not turning the whole rule off.
  • GET /v1/alerts/rules/overrides: which keys carry a rule different from the account default. Per-key exceptions are completely invisible in the account-level view; this is the only place to see them.
  • PROVIDER_* rules can also be set for one channel: add providerId (the channel's id) to PUT /v1/alerts/rules, without apiKeyId. GET /v1/alerts/rules/providers lists them. Order of precedence: this channel's rule, then your account rule, then the platform default. In the console this is the "Provider alerts by channel" table on the Alerts page.

Delivery channels

ChannelTarget
WebhookAny URL; Tare sends JSON via POST
Feishu / LarkGroup bot webhook, with optional signature verification. Lark bots use the same format: paste the open.larksuite.com address here
WeComGroup robot webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=…. The key in the address is the credential

Saving replaces all channels; any left empty are deleted. Existing targets are shown masked and can't be edited in place: the webhook URL is itself a credential and the platform doesn't return it.

Webhook payload

Code / Terminal
{
  "msg_type": "text",
  "content": { "text": "Monthly budget 80% used\n\n..." },
  "rule_type": "MONTHLY_BUDGET",
  "severity": "WARNING",
  "title": "Monthly budget 80% used",
  "text": "...",
  "triggered_at": "2026-11-20T21:51:36",
  "api_key_id": 2051,
  "api_key_name": "customer-42",
  "external_id": "cus_42",
  "issuer_key_id": 17,
  "issuer_key_name": "partner-master"
}
FieldMeaning
msg_type, contentThe shape Feishu / Lark group bots accept, so the same URL works there
rule_typeOne of the rule types above
severityINFO, WARNING or CRITICAL
title, textThe notification in plain text
triggered_atWhen the rule fired, ISO 8601 without a time-zone offset
api_key_id, api_key_nameThe key the alert is about
external_idThe external_id you gave the key when you created it with a provisioning key
issuer_key_id, issuer_key_nameThe provisioning key that issued it

The five key fields are null for account-wide alerts (budget, balance, channel and node alerts), and the issuer fields are null for a key you created yourself. If you issue one child key per customer, external_id tells you which customer an alert is for. The key itself is never sent.

Troubleshooting when alerts don't arrive

Alert missed: signature, clock, channel Four checks when an alert never arrives: the signing secret, container clock drift, the bot's signature setting, and whether any delivery channel exists. Most of these failures are silent. Alert missed: signature, clock, channel Wrong signing secret Signature checks reject unsigned messages. Feishu keeps the reason. Container clock drift Feishu allows one hour of clock skew. Same symptom as a bad secret. Bot signature check not confirmed The platform cannot detect this. You check the switch and the secret. No delivery channel set The alert stays at send failed and is not passed to the platform. You get no alert Most of these failures are silent Only you can confirm the switch Saved is not delivered. A rule and a channel are two halves. One half alone is no alert. After saving, check recent notifications and confirm the group or Webhook got the message.
Alert not delivered: signing, clock, and delivery channel

Feishu signature verification

Fill in the signing secret when the group bot has "signature verification" enabled; leave it empty when it's off.

Getting it wrong is silent. A bot with verification on rejects unsigned messages, and the reason stays on the Feishu side, so the platform only sees an error code and you receive no alert. The platform also can't probe whether the other side has it on: a bot with verification off also accepts signed messages. Only you can confirm the state of this switch.

Feishu also only accepts timestamps within an hour of its own clock, so clock skew has exactly the same symptom as a wrong secret.

There is no platform-level fallback channel

When no channel is configured, the alert is recorded as "send failed" and stays in that state; it is not forwarded to the platform. Your alert content shouldn't be forwarded through the platform — that would be a data leak, not a fallback.

Next steps

Docs last updated Nov 27, 2026, 12:56 (UTC+8)