{% extends "admin/_layout.html" %} {% from "_macros.html" import icon %} {% set section = "connections" %} {% block title %}{{ t("Connections") }} - {{ brand.name }}{% endblock %} {% block heading %}{{ t("Connections") }}{% endblock %} {% block admin_content %}

{{ t("A connection is one provider: a server of your own that speaks the OpenAI API (llama.cpp, llama-swap, vLLM, Ollama, LM Studio), or OpenAI, Anthropic, DeepSeek or OpenRouter. %(brand)s asks each one for its model list and offers those models in the chat picker.", brand=brand.name) }} {{ t("Paste an address and press Detect: the type is found for you, and what it says about its models is filled in.") }}

{% if message %}
{{ message }}
{% endif %}

{{ t("Add a connection") }}

{# `detect()` asks /admin/connections/detect, which asks only the address typed here (services/llm/detect.py), and fills the form from the answer. Every field still posts as typed: detection is a suggestion. #}

{{ tm("With or without the trailing /v1 — both are accepted. Empty takes the type's own address.") }} {{ t("Found:") }}

{{ icon("warning", "alert__icon") }}

{{ t("The type carries what differs between providers — how usage, cached tokens and reasoning are sent and read, and where a balance is found — so none of it has to be set by hand.") }}

{{ tm("How clients such as the LLeMbas CLI name this connection's models: provider/model, for example llama/bonsai. Lowercase letters, digits and hyphens, unique among connections.") }}

{{ t("Encrypted before it is stored, and never sent back to the browser. Leave empty for endpoints that need no key.") }}

{{ t("An admin key from the provider, used only to read what the account has spent. Never used for a reply; a reply never fails on it.") }}

{{ t("What this connection's model prices are typed in, and what a reply on one of them costs in.") }}

{{ t("Configured connections") }} {{ connections|length }}

{% if not connections %}
{{ icon("server", "empty__mark") }}

{{ t("Nothing configured yet. Add a connection above and its models appear here.") }}

{% endif %}
{% for connection in connections %} {% with row = rows[connection.id] %} {% include "admin/_connection_row.html" %} {% endwith %} {% endfor %}
{% endblock %}