update report h6
This commit is contained in:
@@ -133,9 +133,17 @@ def main():
|
||||
"telemetry_integrity": tel_text, "telemetry_ok": tel_rc == 0,
|
||||
}
|
||||
|
||||
# H6 cost telemetry
|
||||
prov = read_jsonl(os.path.join(logs, "level5", "provider-usage.jsonl"))
|
||||
metrics = read_jsonl(os.path.join(logs, "cost", "metrics.jsonl"))
|
||||
# H6 telemetry — use the same canonical sources as the Control Panel/report API.
|
||||
provider_path = os.environ.get(
|
||||
"CASAN_TELEMETRY_PROVIDER_LOG",
|
||||
os.environ.get("CASAN_CP_PROVIDER_USAGE", os.path.join(logs, "level5", "provider-usage.jsonl")),
|
||||
)
|
||||
metrics_path = os.environ.get(
|
||||
"CASAN_TELEMETRY_METRICS_LOG",
|
||||
os.environ.get("CASAN_DASHBOARD_METRICS", os.path.join(logs, "cost", "metrics.jsonl")),
|
||||
)
|
||||
prov = read_jsonl(provider_path)
|
||||
metrics = read_jsonl(metrics_path)
|
||||
cost_rc = int(os.environ.get("CASAN_EP_COST_RC", "3") or "3")
|
||||
total_tokens = sum(int(r.get("total_tokens", 0)) for r in prov if str(r.get("total_tokens", "")).isdigit())
|
||||
reports["h6-cost-telemetry.json"] = {
|
||||
|
||||
Reference in New Issue
Block a user