{% extends 'admin/base.html' %} {% block title %}{{ t('ai.title') }}{% endblock %} {% block content %}
{{ t('ai.subtitle') }}

๐Ÿ”‘ {{ t('ai.api_config') }}

{{ t('ai.status') }} {% if has_api_key %} โœ… {{ t('ai.connected') }} {{ t('ai.provider_' + active_provider) }} ยท {{ active_model }} {% elif active_needs_model %} โŒ {{ t('ai.model_not_selected') }} {{ t('ai.provider_' + active_provider) }} {% else %} โŒ {{ t('ai.not_configured') }} {% endif %}
{% if not can_configure_ai %}
{{ t('ai.config_admin_only') }}
{% else %} {# Per-provider key hints: placeholder, link, link label key #} {% set key_meta = { 'anthropic': ('sk-ant-...', 'https://console.anthropic.com/settings/keys', 'console.anthropic.com'), 'openai': ('sk-...', 'https://platform.openai.com/api-keys', 'platform.openai.com'), 'deepseek': ('sk-...', 'https://platform.deepseek.com/api_keys', 'platform.deepseek.com'), 'gemini': ('AIza...', 'https://aistudio.google.com/apikey', 'aistudio.google.com') } %}
{{ t('ai.provider_help') }}
{% for prov in provider_order %} {% set p = providers[prov] %}
{% if p.needs_key %}
{# NOT type="password": browsers fill a password field with the saved admin password, whatever autocomplete says โ€” it was then sent to the provider as "the key" and saved over the real one. A text field masked by CSS (.input-secret) is left alone by password managers. #}
{{ key_meta[prov][2] }} {{ t('ai.key_link_' + prov) }}
{% else %}
{{ t('ai.lmstudio_help') }}
{% endif %}
{{ t('ai.model_help') }}
{{ t('ai.context_help') }}
{% endfor %}
{% endif %}
{% if current_user.is_owner() or demo_mode %}

๐Ÿค {{ t('webmcp.section_title') }}

{{ t('webmcp.section_help') }}
{{ t('webmcp.admin_help') }}
{{ t('webmcp.public_help') }}
{{ t('webmcp.token_help') }}
{{ t('webmcp.polyfill_help') }}
{% endif %}

โœจ {{ t('ai.tools_title') }}

{% if not has_api_key %}
โš ๏ธ {{ t('ai.api_key_required') }}
{{ t('ai.api_key_required_hint') }}
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}