# `Spectre.Inference.BudgetSnapshot`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/inference/budget_snapshot.ex#L1)

Immutable, per-attempt budget handed from the Instance to a worker/session.

Deadlines are absolute system milliseconds. Heartbeats may renew stall
timers, but they never mutate `deadline_at`.

# `limit`

```elixir
@type limit() :: non_neg_integer() | number() | nil
```

# `t`

```elixir
@type t() :: %Spectre.Inference.BudgetSnapshot{
  attempt_id: String.t(),
  deadline_at: integer() | nil,
  estimation_policy: :provider | :conservative | :unavailable,
  inference_id: String.t(),
  pricing_ref: String.t() | nil,
  remaining: %{optional(atom()) =&gt; limit()},
  reserved: Spectre.Inference.Usage.t()
}
```

# `deadline_exceeded?`

```elixir
@spec deadline_exceeded?(t(), integer()) :: boolean()
```

# `exceeded`

```elixir
@spec exceeded(t(), Spectre.Inference.Usage.t() | map()) :: :ok | {:error, atom()}
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
