Add provider key cycle stats reset handling

This commit is contained in:
fawney19
2026-05-07 03:23:20 +08:00
parent 6c0ac2e8da
commit 10e679bb2f
35 changed files with 1443 additions and 273 deletions

View File

@@ -209,6 +209,18 @@ export async function clearOAuthInvalid(keyId: string): Promise<{ message: strin
return response.data
}
/**
* 重置 Key 的当前周期统计起点Codex 号池)
*/
export async function resetProviderKeyCycleStats(keyId: string): Promise<{
message: string
reset_at: number
windows: number
}> {
const response = await client.post(`/api/admin/endpoints/keys/${keyId}/reset-cycle-stats`)
return response.data
}
/**
* 刷新 Provider 的所有 Key 限额信息Codex / Antigravity
*/