Appearance
Providers & credentials
The Providers page is where you manage the platform's AI supply. A provider exists because an adapter ships for it and its API key is in the environment — there is no list to install from. Providers that can list their own models (OpenAI, Google Gemini, xAI, OpenRouter, ElevenLabs, BytePlus, Alibaba DashScope) also keep their model catalogue up to date by themselves.
First-time setup
- Put the provider's key in the server environment (e.g.
OPENAI_API_KEY), then Providers → Sync models. That installs the provider, links the key, and asks the provider what it offers. Discovered models arrive off sale — enable the ones you want on the Models page. - Or add a key by hand: Providers → click a provider → Add credentials.
- Enter a label ("Main OpenAI key") and either:
- the API key itself — stored encrypted, shown masked forever after; or
- an env-var reference (
OPENAI_API_KEY) — key stays on the server, DB stores only the pointer.
- Click Verify on the new row — the platform pings the provider's API with the key and shows
ok/unreachable.
Multiple accounts on one provider
Add as many reseller accounts as you like per provider (e.g. two OpenAI orgs). Traffic distributes across all ACTIVE accounts by weight (Routing dialog). Use cases:
- Migrating keys — add the new account, Verify it, set the old one to
SUSPENDED. Zero downtime. - Cost tiers — set
costMultiplier: 0.9on a discounted account and give it higher weight. - Blast-radius control — split traffic so one revoked key doesn't take the provider down.
Rotating a credential
Row → key icon (Rotate credentials) → paste the new key → Save. The account keeps its label, weight, budgets, and usage history; only the secret changes. Then Verify. The old key stops being used immediately.
Budgets — your spending guardrails
Row → Routing → set Daily budget / Monthly budget (in poisha — 5000000 = ৳50,000). When spend hits the cap the account flips to EXHAUSTED and traffic fails over to other accounts (or errors if none remain). Budgets reset automatically at period boundaries; force-reset via row menu → Reactivate + reset budget.
The Budget (daily) column shows a live progress bar of spend vs cap.
Health
- Verify (per row) — one account.
- Health-check all (page header) — makes a real authenticated call for every credential, not a ping any key would pass, and reports each provider as HEALTHY / DEGRADED / DOWN / AUTH_FAILED / UNCONFIGURED. Several providers also return their own limits: OpenRouter's spend cap and remaining credit, ElevenLabs' character quota, xAI's key state.
- A scheduled check runs every 10 minutes, and a model sync every 6 hours per provider.
- Reseller-account statuses:
ACTIVE(serving) ·RATE_LIMITED(backing off) ·EXHAUSTED(budget or provider quota hit) ·SUSPENDED(key rejected, or switched off by an admin).
Automatic recovery
Blocked accounts come back on their own. Every 10 minutes, before the health check, the platform re-checks each blocked account with a real authenticated call and puts it back to ACTIVE if the call passes:
| Account is… | Re-checked when | Comes back when |
|---|---|---|
SUSPENDED by the platform (the provider rejected the key) | every 10 minutes | the key passes the check again |
RATE_LIMITED | its backoff has run out | the check passes |
EXHAUSTED | its backoff has run out and it is under its budget caps | the check passes |
EXHAUSTED over its own budget cap | — | the hourly budget reset, when the day or month rolls |
SUSPENDED by an admin | never | an admin sets it back to ACTIVE |
Each recovery is written to the audit log as reseller.auto-recover, and the provider's status is recalculated on the same run. Setting an account's status by hand marks it manually-set, so the platform never undoes an admin's choice.
A provider that answers 403 for one model (for example OpenAI's "your organization must be verified to use this model") no longer suspends the account. That request fails with the provider's message, and every other model keeps working.
Provider status & auto-disable
A provider (the parent, e.g. Gemini) has its own status, shown as a badge on the Providers page:
| Status | Meaning | Set by |
|---|---|---|
ACTIVE | Serving traffic; listed to customers | manual / auto |
DEGRADED | Serving but flagged (e.g. partial issues) | manual |
INACTIVE | No usable reseller account — hidden from customers | automatic |
DISABLED | Turned off by an operator | manual |
Auto-disable: when a provider's last ACTIVE reseller account goes away (suspended, rate-limited, exhausted, or deleted), the platform automatically flips the provider to INACTIVE. An INACTIVE provider disappears from the client model lists (/v1/models, /v1/models/me) and its models return PROVIDER_UNAVAILABLE — no more silent 503s at request time. As soon as an account becomes ACTIVE again, the provider auto-recovers to ACTIVE — within 10 minutes at most, because the recovery sweep above re-checks blocked accounts and recalculates every provider's status.
DEGRADED and DISABLED are manual states and are never auto-changed. The manual status toggle offers only ACTIVE / DEGRADED / DISABLED — INACTIVE is auto-only.