{% extends "base.html" %} {% block title %}{{ 'Edit' if mode == 'edit' else 'New' }} account · modelpass bench{% endblock %} {% block body %}

{{ 'Edit account' if mode == 'edit' else 'New account' }}

{% if error %}
Not saved.
{{ error }}
{% endif %}

Four ways to pay for a connection, and three of them are pointers: the runtime's own login, the name of an environment variable, or no credential at all. The fourth writes a key you paste to ~/.modelpass/secrets.toml and stores only a pointer to it in the connection file — the same thing modelpass connect --api-key-stdin does. A key is never written into the connection file, never echoed back into this page, and never rendered anywhere on the bench.

A variable name, e.g. OPENAI_API_KEY. Not the key.
{# Deliberately never given a value: this field is write-only. A failed save re-renders the form and the key is not in it, so there is no path by which a key typed here comes back down the wire. #}
Written to secrets.toml under this connection's own name, which is what lets a rename move it and a delete take it with the connection. Leave it empty for every other credential form.
That runtime names an API shape rather than a vendor, so it has no default endpoint and requires this.
Human-facing and safe to rename. Clients and run logs use the stable ID above.
Names separated by spaces or commas. A group needs no creating — it exists while some account is in it. Leave this empty and the account is in default, which is simply the name for the accounts that name no group; an account listed here is not also in default unless you say so. A call may then address the group rather than the account, as connection="group:fast".
An absolute account root: CLAUDE_CONFIG_DIR for Anthropic or CODEX_HOME for OpenAI. Empty means the vendor's default storage. The one-time setup is just a login with that variable set. Either Codex credential store works — Codex keys its keyring entry to CODEX_HOME, so a different directory is a different entry.

Spend guards

Both optional, both in tokens, both per run. Leaving them empty is a real and common answer — modelpass will not invent a number, because it does not know your plan, your month, or what you are about to ask for. See docs/guards.md for a method rather than a number.

Naming a connection here is the consent to run on it — including when it is metered.
{% set options = allow_env_options.get(form.runtime, []) %} {% if options %}
{% for name in options %} {% endfor %}
Scrubbed by default because it changes where a run goes. A closed set: a credential can never be added here.
{% endif %}
{# The hidden 'false' before the checkbox is what makes an unchecked box submit anything at all; the server reads the whole list, so this works with no JavaScript involved. #}
Cancel

Saving writes to the connection file directly. The command line's modelpass connect shows you a preflight receipt before writing; here, use the Check button on the accounts page afterwards to see the same receipt.

{% endblock %}