Configure · Providers

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.

Where

Sign in as an admin → Settings → Administration → Providers & models.

Pick a provider type

TypeUse it forCredentialsCredential directory
claudeA Claude (Anthropic) subscription or API account. Runs on the Claude Agent SDK.Browser login, or ANTHROPIC_API_KEY in envOptional — empty uses the service user's ~/.claude
codexA ChatGPT / OpenAI Codex account. Runs on codex app-server.Device-code loginRequired (becomes CODEX_HOME)
claude-compatibleAny endpoint that speaks the Anthropic Messages API (gateways, relays, third-party models).API key in envOptional
openai-compatibleAny OpenAI-compatible endpoint, driven through Codex.API key in envRequired

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

  1. Click “Add account” and fill in the fields
    Account nameUnique across all types, e.g. team-claude. Shown in bindings and usage.
    Provider typeOne of the four above.
    Max concurrentHow 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 directoryWhere the CLI keeps its login. Use one directory per account, e.g. /home/you/.daymug/accounts/team-codex.
    Environment variablesOne KEY=value per line, passed only to this account's agent process.
  2. Save — the account must be saved before you can add models or log in.
  3. 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.
  4. 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).
  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 running claude auth login with this account's credential directory: open the printed URL, approve, paste the code back.
  • codex — Log in runs codex 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-auth

Compatible 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-lite

openai-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.

Set prices for compatible endpoints

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

LimitSet inScope
Max concurrent (account)Providers & modelsConversations running on one credential at once
users.max_concurrentconfig.yamlTasks one person runs at once, across every account
guardrails.*config.yamlWork 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.