{% extends "ewoooc_base.html" %} {% block title %}AI 成本治理艙{% endblock %} {% block ewooo_content %} {% import "admin/_observability_labels.html" as obs_label %} {% 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 成本治理 · 預算 / 節流 / 知識策略

AI 成本治理艙

控制 AI 花費與節流狀態,把預算留給能推動業績的任務。

預算超線時立即重算節流。
當月花費
${{ "%.2f"|format(total_spent.value) }}
預算 ${{ "%.2f"|format(total_budget.value) }}
預算使用率
{{ "%.0f"|format(total_ratio) }}%
全供應商加總
預警
{{ warn_count.value }}
使用率 ≥ 80%
已節流
{{ throttled_count.value }}
已啟動成本節流
{% if error %}
{{ error }}
{% endif %}
預算線

預算線與節流狀態

{% for r in rows %}= 0.8 %}class="table-warning"{% endif %}>{% else %}{% endfor %}
週期建議路徑已花費預算預警線使用率狀態動作
{{ r.period }}{{ obs_label.provider(r.provider) }}${{ "%.2f"|format(r.spent) }}{{ "%.0f"|format(r.ratio * 100) }}%{% if r.throttled %}已節流{% elif r.ratio >= 0.8 %}接近上限{% else %}正常{% endif %}
尚未建立預算線。
{% if cost_trend_30d %}
30 日成本趨勢

每日成本堆疊趨勢

{% endif %}
{% if budget_strategies %}
知識策略

知識策略建議

{% for s in budget_strategies %}
{{ obs_label.insight(s.insight_type) }}相似度 {{ "%.2f"|format(s.similarity) }}{{ s.content }}{% if s.content|length >= 240 %}…{% endif %}
{% endfor %}
{% endif %} {% if price_rec_7d %}
商業產出

AI 價格決策 7 日

{% for p in price_rec_7d %}
{{ obs_label.strategy(p.strategy) }}{{ p.count }}信心 {{ "%.2f"|format(p.avg_confidence) }}
{% endfor %}
{% endif %}

AI 成本治理艙

{% set budget_payload = { 'providerCostMonth': provider_cost_month | default([]), 'costTrend30d': cost_trend_30d } %} {% endblock %}