Phase 1 · Batch 1: Read-only Usage Core — runtime usage service, schemas, API endpoint #30
Labels
No Label
admin
agent-api
api
api-client
audit
backend
boards
cost-accounting
database
design
forgejo
frontend
issues
metrics
mutation
navigation
optional
phase:1
phase:2
phase:3
phase:4
phase:5
phase:6
polish
priority:high
priority:low
priority:medium
service
sync
usage-accuracy
validation
webhooks
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Pipeline#30
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Outcome
Mission Control can compute model usage, cost, and time remaining from OpenClaw runtime data.
Scope
backend/app/services/openclaw/runtime_usage.pybackend/app/schemas/runtime_usage.py(response models)GET /api/v1/gateways/{gateway_id}/runtime-usagebackend/app/main.pyif new router file createdbackend/tests/test_runtime_usage*.pyImplementation Details
account_keyderived from gateway config, environment/profile name, or explicit MC mappingunpriced=false, cost_usd=0; mark unknown paid models asunpriced=trueData Contract
See
docs/runtime-usage-dashboard-plan.md→ Proposed Data Contract section for the response schema.Open Questions (must resolve before implementation)
Reference
openclaw-dashboardserver.js: DEFAULT_MODEL_PRICING, loadModelPricing, normalizeProvider, normalizeModel, estimateMsgCost, isSessionFile, extractSessionId, getSessionCost, getCostData, getUsageWindowsdata/model_pricing_usd_per_million.jsonDepends On
None — this is the first slice.
Labels
phase-1, backend, priority-high
✅ Verification complete. Issue #30 accurately reflects the Batch 1 scope from docs/runtime-usage-dashboard-plan.md. All files listed, data contract matches, open questions captured, dependencies correct. No discrepancies found.