{% extends "org-base.html" %} {% from "ui.html" import csrf_field, action, when, copyable with context %} {% from "provider-help.html" import key_help with context %} {% set keyless = ('ollama', 'openai_compatible', 'claude_code', 'codex') %} {% set effort_labels = {"low": _("Low"), "medium": _("Medium"), "high": _("High"), "max": _("Maximum")} %} {% block section %}
{{ _("Used by the nightly tidy-up in all the organization's spaces; each space may pick another model.") }}
{% if ai %}{{ _("No key: the tidy-up cannot run") }}
{% elif ai.test_pending %}{{ _("Test in progress…") }} {{ _("in the worker, the only container with access to the CLI; this page updates itself.") }} {{ _("Refresh") }}
{% elif ai.test_ok is none %}{{ _("Not tested yet") }}
{% elif ai.test_ok %}{{ _("Reachable") }} {{ _("tested") }} {{ when(ai.tested_at) }}
{% else %}{{ _("Unreachable") }} {{ when(ai.tested_at) }}
{{ _(ai.test_message) }}
{% endif %} {% if spending %}{{ _("This month: {spent}", spent=spending.spent|euros) }}{% if spending.budget %} {{ _("of {budget}", budget=spending.budget|euros) }}{% endif %}{% if spending.subscription %} · {{ _("subscription: no per-use cost") }}{% endif %}
{% endif %}{{ _("No monthly budget: AI spending has no limit.") }} {{ _("Your provider bills every tidy-up and routine run. Set a budget below (for example {amount}): administrators are notified at 80%, and runs stop at 100%.", amount=suggested_budget|euros) }}
{{ _("Last step: delete the old login.") }} {{ _("The worker's login works") }} ({{ _("tested", context="connection") }} {{ when(ai.tested_at) }}). {{ _("An old copy remains in the data volume, visible to the web container:") }} {{ legacy_logins|join(", ") }}
{{ _("Synaptane does not delete it itself: only the official CLI handles these credentials. On the server, run:") }}
{% else %}{{ _("An old subscription login is still in the data volume, visible to the web container:") }} {{ legacy_logins|join(", ") }}
{{ _("Synaptane does not move it: only the official CLI handles these credentials. Log the CLI in again inside the worker (steps below), test the connection, then delete the old folder yourself:") }}
{% endif %}{{ copyable("legacy-cleanup", legacy_cleanup, block=true) }}
{{ _("This message disappears as soon as the old folder is gone.") }}
{{ _("Once, by the server administrator. Synaptane never sees the credentials: they stay in the official CLI. Empty model: the CLI's default.") }}
{{ _("The login is kept in a volume of its own, mounted only in the worker, not in the web container: it survives updates and image rebuilds, but “docker compose down -v” erases it. The connection test therefore runs in the worker.") }}
{% endif %}