slides

Render Python Stats

Aggregate python-mode render stats over the last days days.

Returns a snapshot good enough for ops to decide rollout cadence:

  • attempt distribution (1/2/3) → MiniMax stability proxy
  • failed_rate → how often we exit without a usable pptx
  • avg_attempts → cost proxy (higher = more retries = more MiniMax calls)
  • hardest_slides → top N slides with attempts ≥ 3 OR errored, including title + project + error so you can drill into specific failures

Caveats:

  • "deterministic_rate" can't be derived precisely from current Firestore fields. attempts==3 + status ok could be either "MiniMax 3rd attempt succeeded" or "deterministic fallback kicked in". To distinguish we'd need to start writing a python_render_strategy field; not yet done. For now, attempts==3 is reported as a "needs-investigation" bucket.

Auth: ADMIN_USER_IDS allowlist (env). Non-admin → 403.

Query is a single Firestore range scan on slides where render_mode_used == "python" and first_render_charged_at >= cutoff. Per slide, we pull only the fields used in aggregation — kept O(N) where N is rendered-slide count over days. At current traffic this is well under 1k docs / 7 days, so loading them all in memory is fine.

get/api/v1/slides/render-python/stats

Request

  • Base URL: https://api.slidemaster.tw (the document declares no server; this is the origin it was published from)
  • URL: https://api.slidemaster.tw/api/v1/slides/render-python/stats
  • Auth: none declared

Query parameters

daysinteger

Headers

Authorizationstring nullable

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.