<!-- https://zerolog.ch/docs/governor · Docs / Money -->
# Budget governor

The governor is a monthly guard that the operator of ZeroLog sets, not you. It adds up what the whole service spends on models this month. Once that total passes a threshold of the monthly budget, paid requests move to a cheaper model, so chats **keep going** instead of stopping outright. It is off until the operator turns it on and sets a monthly budget. The cheaper model is the one the operator named, or else the cheapest one available.

*The month, watched as a whole*

Past the monthly threshold

The model you picked

A cheaper model

- From then on, paid requests are answered by a cheaper model, and the chat carries on.
- Refusing the request. The downgrade happens instead of this, unless the operator has also switched on a hard stop at the full budget.

## Every downgrade leaves a line

The governor writes down each downgrade with the reason behind it. So when an answer comes back looking different from the one you expected, there is a line that explains it.

## What it does not do

It does not watch a single run or measure how fast a run spends, and you cannot set or see it from your account. Your own limit is your credit: at zero, paid models stop. See [Spend limits](https://zerolog.ch/docs/limits).

How unattended runs behave: [/goal and /ultracode](https://zerolog.ch/unattended-agents).

## What the budget governor does to a paid request

Mermaid source of the diagram on this page:

```mermaid
%% Budget governor: one paid request. Facts from server/governor.js (evaluate).
flowchart TB
  r["A paid request<br/>for the model you picked"]
  h{"Hard stop on and<br/>monthly budget used up?"}
  refuse["Request refused"]
  t{"Service-wide spend this month<br/>past the threshold?"}
  same["Answered by the model<br/>you picked"]
  down["Answered by a cheaper model<br/>the chat carries on"]:::hot
  log["Downgrade logged<br/>with the reason"]

  r --> h
  h -->|yes| refuse
  h -->|no| t
  t -->|no| same
  t -->|yes| down --> log

  classDef hot stroke:#8f7ac9
```
