AdminMonitorService

GetUsageLogsStat returns realtime RPM/TPM aggregated over a fixed trailing 60s window of usage logs. Filters mirror ListUsageLogsRequest semantics.

Keep this literal route before /v1/admin/monitor/usage-logs/{id}; otherwise some HTTP routers may match "stat" as a path id.

get/v1/admin/monitor/usage-logs/stat

Query parameters

userIdstring

End-user id. Empty means all users.

modelIdstring

Platform model id. Empty means all models.

channelIdstring

Upstream channel id. Empty means all channels.

statusinteger

0/empty=all, 1=ok, 2=error; semantics match ListUsageLogsRequest.status.

Response

OK

rpmstring

Requests recorded in the trailing 60s window. Declared optional (explicit presence) so a zero value is still emitted through the EmitUnpopulated:false response envelope instead of disappearing from the JSON body.

tpmstring

Sum of total_tokens over the same window; explicit presence for the same reason as rpm. Proto JSON serializes int64 as a decimal string.

windowSecondsinteger

Trailing window length in seconds (currently always 60).

Changes