Merge remote-tracking branch 'origin/main' into feat/grok-sso-device-oauth

# Conflicts:
#	frontend/src/api/admin/grok.ts
This commit is contained in:
shaw
2026-07-14 10:19:16 +08:00
147 changed files with 8735 additions and 597 deletions
+10 -9
View File
@@ -4,6 +4,9 @@
*/
import { apiClient } from '../client'
import type { GrokBillingSummary, GrokQuotaWindow, WindowStats } from '@/types'
export type { GrokBillingSummary, GrokQuotaWindow } from '@/types'
export interface GrokAuthUrlResponse {
auth_url: string
@@ -79,13 +82,6 @@ export function getGrokSSOImportTimeout(keyCount: number): number {
return batches * GROK_SSO_IMPORT_TIMEOUT_PER_BATCH_MS + GROK_SSO_IMPORT_TIMEOUT_BUFFER_MS
}
export interface GrokQuotaWindow {
limit?: number | null
remaining?: number | null
reset_unix?: number | null
reset_at?: string | null
}
export interface GrokQuotaSnapshot {
requests?: GrokQuotaWindow | null
tokens?: GrokQuotaWindow | null
@@ -102,13 +98,18 @@ export interface GrokQuotaSnapshot {
}
export interface GrokQuotaProbeResult {
source: 'active_probe'
model: string
source: 'active_probe' | 'billing_probe' | 'hybrid_probe'
model?: string
billing?: GrokBillingSummary | null
snapshot?: GrokQuotaSnapshot | null
local_usage_7d?: WindowStats | null
local_usage_monthly?: WindowStats | null
status_code?: number
headers_observed: boolean
reset_supported: boolean
fetched_at: number
persisted?: boolean
probe_error?: string
}
export interface GrokQuotaResetResult {
+3
View File
@@ -828,6 +828,7 @@ export interface OpsRuntimeLogConfig {
export interface OpsSystemLog {
id: number
created_at: string
host: string
level: string
component: string
message: string
@@ -849,6 +850,7 @@ export interface OpsSystemLogQuery {
time_range?: '5m' | '30m' | '1h' | '6h' | '24h' | '7d' | '30d'
start_time?: string
end_time?: string
host?: string
level?: string
component?: string
request_id?: string
@@ -864,6 +866,7 @@ export interface OpsSystemLogQuery {
export interface OpsSystemLogCleanupRequest {
start_time?: string
end_time?: string
host?: string
level?: string
component?: string
request_id?: string