Providers & models.
A provider account is one set of AI credentials — a Claude login, a Codex login, or an API key for a compatible endpoint. Accounts, their models and their prices are stored in the database and edited in the browser; saving applies immediately, no restart.
Sign in as an admin → Settings → Administration → Providers & models.
Pick a provider type
| Type | Use it for | Credentials | Credential directory |
|---|---|---|---|
claude | A Claude (Anthropic) subscription or API account. Runs on the Claude Agent SDK. | Browser login, or ANTHROPIC_API_KEY in env | Optional — empty uses the service user's ~/.claude |
codex | A ChatGPT / OpenAI Codex account. Runs on codex app-server. | Device-code login | Required (becomes CODEX_HOME) |
claude-compatible | Any endpoint that speaks the Anthropic Messages API (gateways, relays, third-party models). | API key in env | Optional |
openai-compatible | Any OpenAI-compatible endpoint, driven through Codex. | API key in env | Required |
Install what the type needs on the DayMug host first:
npm install -g @anthropic-ai/claude-agent-sdk for
claude; the claude CLI
(npm install -g @anthropic-ai/claude-code) for
claude-compatible and for the browser login button;
npm install -g @openai/codex for the two Codex types.
Add an account
-
Click “Add account” and fill in the fields
Account name Unique across all types, e.g. team-claude. Shown in bindings and usage.Provider type One of the four above. Max concurrent How many conversations may run on this account at once. Extra work waits in a visible queue. Start with 1–3 for a personal subscription. Credential directory Where the CLI keeps its login. Use one directory per account, e.g. /home/you/.daymug/accounts/team-codex.Environment variables One KEY=valueper line, passed only to this account's agent process. - Save — the account must be saved before you can add models or log in.
-
Add models — type the model ids this account may
use. The first one is the default for new conversations; reorder
with the arrows. DayMug ships no built-in list, so an account
with no models offers nothing to pick. Reference ids for Claude:
claude-opus-5-5,claude-sonnet-5,claude-haiku-5. -
Set the summary model — required for any account
with models. It writes conversation titles and runs
/compact; a small, cheap model is ideal (e.g.claude-haiku-5). - Log in and check — see below.
The first account in the list is the default provider for new conversations. Reorder accounts with the arrows.
Log in and check an account
Each account has an Account status panel. Check account reads the login state and sends one real test message on the default model, so it also catches an expired token or a model the account can't use.
-
claude— click Log in. A terminal opens in the browser runningclaude auth loginwith this account's credential directory: open the printed URL, approve, paste the code back. -
codex— Log in runscodex login --device-auth: open the link, enter the one-time code. - Compatible types have no login; the API key in the environment variables is the credential. Check account makes one real call to the endpoint.
Prefer the shell? The same thing, run as the service user:
CLAUDE_CONFIG_DIR=/home/you/.daymug/accounts/team-claude claude auth login
CODEX_HOME=/home/you/.daymug/accounts/team-codex codex login --device-authCompatible endpoints
Put the endpoint and key in the account's environment variables.
claude-compatible
ANTHROPIC_BASE_URL=https://api.example.com/anthropic
ANTHROPIC_AUTH_TOKEN=sk-…
# optional: map Claude Code's built-in tiers to the endpoint's model ids
ANTHROPIC_MODEL=vendor-model-pro
ANTHROPIC_DEFAULT_SONNET_MODEL=vendor-model-pro
ANTHROPIC_DEFAULT_OPUS_MODEL=vendor-model-pro
ANTHROPIC_DEFAULT_HAIKU_MODEL=vendor-model-liteopenai-compatible
# credential directory is required, e.g. /home/you/.daymug/accounts/qwen
OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
OPENAI_API_KEY=sk-…Then add the model ids that endpoint actually serves and set a summary model.
DayMug has no price list for third-party models. Until you
enter per-model rates under Token pricing (same
page, USD per million tokens), turns on
claude-compatible / openai-compatible
accounts are recorded at $0 — which also means the
max_cost_usd_per_turn guardrail never trips for them.
Give users access
An account is only usable by people who are bound to it. In Settings → Administration → Users, edit a user (or select several and use the batch toolbar) and pick an account per provider type. A user can hold several accounts of the same type; one is their default, and a conversation can be pinned to any of the others.
- No binding for a type = that user can't start conversations of that type. There's no silent fallback to someone else's account.
- Revoking a binding takes effect on the next turn, even for conversations already pinned to it.
- Many users can share one account: Max concurrent caps it, and the rest queue fairly (whoever used the least in the last hour goes next).
- IM bots spread new threads across every bound account that serves the bot's model, skipping ones that are rate-limited.
Concurrency, in one picture
| Limit | Set in | Scope |
|---|---|---|
| Max concurrent (account) | Providers & models | Conversations running on one credential at once |
users.max_concurrent | config.yaml | Tasks one person runs at once, across every account |
guardrails.* | config.yaml | Work one message may cause before pausing |
Coming from a YAML providers: block?
Older releases kept accounts in config.yaml. On the
first start with an empty provider table, DayMug imports that block
(and the even older claude_accounts:) into the
database once. After that the database wins; delete the block from
YAML to avoid confusion. The retired mimo type is
migrated to claude-compatible automatically.