---
title: DeepSeek Balance Forecast
---

# DeepSeek Balance Forecast

Sessions running on your own DeepSeek API key stop the moment the account reaches zero, and the
failure arrives all at once — every session on that key dies together, usually while you are
asleep. The DeepSeek balance forecast exists to give you warning first.

## What it does

- Every 15 minutes, Omniscio reads your DeepSeek account balance and remembers the reading.
- From those readings it works out how fast the account is actually being spent — the drain is
  measured from your own balance falling, not estimated from a price list or a package of guesses.
- It divides what is left by that rate to get an arrival time at zero.
- When that arrival time lands inside your warning window, you get **one inbox card** naming
  roughly how long you have, with a one-click **Recharge** button that opens your DeepSeek
  account. The card also shows the numbers behind that estimate — see below.

## What the card tells you

Above the run-out sentence, the card lists the figures the forecast was made from:

- **Balance** — what the account holds right now.
- **Burn rate** — what it is actually spending per hour.
- **Spent today** — measured from midnight in your own time zone.

The three are printed together so you can check the estimate rather than take it on faith, and
they refresh on every check, so a card you left in your inbox is not a stale reading.

**They appear only when your account is billed in US dollars.** DeepSeek bills each account in
its own currency, and a `$` in front of a CNY balance would simply be wrong — the figure is
printed as dollars only when DeepSeek says the account bills in dollars. Either way you always
get the run-out time: that estimate is currency-independent.

## Turning it off (and tuning it)

It is **on by default** — the whole point is to warn you *before* an account runs dry, and an
unwarned dry account kills every session on it at once.

Settings → Notifications → **DeepSeek balance forecast**. Two controls:

- the on/off switch, and
- **how many hours of warning you want** (default 24).

The setting takes effect within one check — no restart. The forecast only runs when you have a
DeepSeek API key saved; with no key it stays completely silent.

Setting the warning window to **0** turns the card off while the balance history keeps being
recorded.

## Why the card only appears when something is really draining

This is the part worth knowing, because it is what keeps the card trustworthy.

A balance can sit low for weeks without anything spending it. If the card fired on a balance
*amount*, it would be noise and you would learn to ignore it. So it fires on a **measured drain**
only: a balance that is low but idle raises nothing at all.

It is also careful about what counts as a drain:

- **One big charge is not a burn.** If a single large spend lands between two readings and nothing
  happens afterwards, that is a step, not a rate — and it raises no card.
- **A quiet night does not dilute a busy morning.** The rate is measured over the busy stretch,
  not averaged back across hours of idling.
- **A top-up starts the measurement over.** Adding money begins a fresh reading, so a recharge can
  never look like a loss, and the rate is always measured from the funded balance onwards.
- **It will not guess.** With too little history, or readings that are too old, it says nothing
  rather than printing a number it cannot stand behind.

## The card stands down on its own

When the drain stops — because you topped up, or simply because nothing is spending any more — the
card is withdrawn. It never sits in your inbox claiming hours remaining for an account that is
already fine.

## If it cannot read your balance

If the balance cannot be read several times in a row — a revoked or expired API key, or an account
this cannot read — you get a separate card saying the forecast is paused, rather than the monitor
going quiet and looking healthy. That notice clears itself the moment a balance check succeeds.

## What it does not do

- **It only reads.** It never spends, recharges, or resumes a session on your behalf.
- **It covers the account behind your own API key.** If you run sessions on Omniscio's DeepSeek
  credits instead, that is a different balance, which this cannot see or forecast.
- **It does not warn you about a low-but-idle balance**, by design — see above.
- **It prints money only when that money is in dollars.** See "What the card tells you" above —
  a non-dollar account gets the time estimate on its own, never a converted figure.

## Where it lives in the code

The forecast is its own small subsystem under `src/main/services/deepseek-balance/`:

- `deepseek-balance-monitor.ts` — the periodic service, and the two cards it can raise.
- `deepseek-balance-projection.ts` — the pure time-to-zero maths and every honesty guard above.
- `deepseek-balance-state.ts` — the persisted rolling history of readings.
- `deepseek-balance-alert.ts` — the inbox card copy.

It reuses the shared balance reader in `src/main/services/provider-balance/` and the standard
periodic-service and deduped-card machinery, so it adds no new infrastructure. A companion feature,
`provider-balance-autoresume`, handles what happens *after* an account is already empty: parking
the affected sessions and continuing them once the account is funded again.
