預算線與節流狀態
| 週期 | 供應商 | 已花費 | 預算 | 閾值 | 使用率 | 狀態 | 動作 |
|---|---|---|---|---|---|---|---|
| {{ r.period }} | {{ r.provider }} | ${{ "%.2f"|format(r.spent) }} | {{ "%.0f"|format(r.ratio * 100) }}% | {% if r.throttled %}已節流{% elif r.ratio >= 0.8 %}接近上限{% else %}正常{% endif %} | |||
| 無預算資料(需先跑 migrations/025) | |||||||
{% extends "ewoooc_base.html" %} {% block title %}AI 成本治理艙{% endblock %} {% block ewooo_content %} {% set total_budget = namespace(value=0) %}{% set total_spent = namespace(value=0) %}{% set warn_count = namespace(value=0) %}{% set throttled_count = namespace(value=0) %} {% for r in rows %}{% set total_budget.value = total_budget.value + (r.budget_usd or 0) %}{% set total_spent.value = total_spent.value + (r.spent or 0) %}{% if r.ratio >= 0.8 %}{% set warn_count.value = warn_count.value + 1 %}{% endif %}{% if r.throttled %}{% set throttled_count.value = throttled_count.value + 1 %}{% endif %}{% endfor %} {% set total_ratio = (total_spent.value / total_budget.value * 100) if total_budget.value > 0 else 0 %}
這頁回答一個問題:AI 中樞花錢是否仍在治理邊界內?預算、實際支出、月底推估、節流狀態與 RAG 策略建議集中在同一個 cockpit。
| 週期 | 供應商 | 已花費 | 預算 | 閾值 | 使用率 | 狀態 | 動作 |
|---|---|---|---|---|---|---|---|
| {{ r.period }} | {{ r.provider }} | ${{ "%.2f"|format(r.spent) }} | {{ "%.0f"|format(r.ratio * 100) }}% | {% if r.throttled %}已節流{% elif r.ratio >= 0.8 %}接近上限{% else %}正常{% endif %} | |||
| 無預算資料(需先跑 migrations/025) | |||||||
Operation Ollama-First v5.0 — AI 成本治理艙