{% extends "base.html" %} {% block content %}

System Status

AI Model Health, Selection Reasoning, and Availability.

Back to Dashboard
{% if cache.error %}
Last Scan Error

{{ cache.error }}

{% endif %}
AI Model Selection
{% if models %} {% for role, info in models.items() %} {% if role != 'ranking' %} {% endif %} {% endfor %} {% else %} {% endif %}
Role Selected Model Est. Cost Selection Reasoning
{{ role }} {{ info.model }} {{ info.estimated_cost }} {{ info.reason }}
Image {% if image_model %} {{ image_model }} {% else %} Unavailable {% endif %} {{ image_source or 'None' }} {% if image_model %}Imagen model used for book cover generation.{% else %}No image generation model could be initialized. Check GCP credentials or Gemini API key.{% endif %}
No model configuration found.
Click Refresh & Optimize to scan available Gemini models.
All Models Ranked
{% if models and models.ranking %} {% for item in models.ranking %} {% endfor %} {% else %} {% endif %}
Rank Model Name Est. Cost Reasoning
{{ loop.index }} {{ item.model }} {{ item.estimated_cost }} {{ item.reason }}
No ranking data available. Refresh models to generate.
Raw API Output
Click to Toggle

# Full list of models returned by google.generativeai.list_models():

    {% if cache.raw_models %} {% for m in cache.raw_models %}
  • {{ m }}
  • {% endfor %} {% else %}
  • No raw data available. Run "Refresh & Optimize".
  • {% endif %}
Cache Status

Last Scan: {% if cache and cache.timestamp %} {{ datetime.fromtimestamp(cache.timestamp).strftime('%Y-%m-%d %H:%M:%S') }} UTC {% else %} Never {% endif %}

Next Refresh: {% if cache and cache.timestamp %} {% set expires = cache.timestamp + 86400 %} {% set now_ts = datetime.utcnow().timestamp() %} {% if expires > now_ts %} {% set remaining = (expires - now_ts) | int %} {% set h = remaining // 3600 %}{% set m = (remaining % 3600) // 60 %} in {{ h }}h {{ m }}m Cache Valid {% else %} Expired — click Refresh & Optimize {% endif %} {% else %} No cache — click Refresh & Optimize {% endif %}

Model selection is cached for 24 hours to save API calls.

{% endblock %}