mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 18:07:47 +08:00
Add Codex image progress heartbeat
This commit is contained in:
@@ -9,6 +9,19 @@ export interface CandidateRankingMetadata {
|
||||
demoted_by?: string
|
||||
}
|
||||
|
||||
export interface ImageProgress {
|
||||
phase?: 'upstream_connecting' | 'upstream_streaming' | 'upstream_completed' | 'failed' | string
|
||||
upstream_ttfb_ms?: number | null
|
||||
upstream_sse_frame_count?: number | null
|
||||
last_upstream_event?: string | null
|
||||
last_upstream_frame_at_unix_ms?: number | null
|
||||
partial_image_count?: number | null
|
||||
last_client_visible_event?: string | null
|
||||
downstream_heartbeat_count?: number | null
|
||||
last_downstream_heartbeat_at_unix_ms?: number | null
|
||||
downstream_heartbeat_interval_ms?: number | null
|
||||
}
|
||||
|
||||
export interface CandidateRecord {
|
||||
id: string
|
||||
request_id: string
|
||||
@@ -46,6 +59,7 @@ export interface CandidateRecord {
|
||||
latency_ms?: number
|
||||
concurrent_requests?: number
|
||||
ranking?: CandidateRankingMetadata | null
|
||||
image_progress?: ImageProgress | null
|
||||
extra_data?: Record<string, unknown>
|
||||
created_at: string
|
||||
started_at?: string
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import apiClient from './client'
|
||||
import { cachedRequest, dedupedRequest, buildCacheKey } from '@/utils/cache'
|
||||
import type { ActivityHeatmap } from '@/types/activity'
|
||||
import type { ImageProgress } from './requestTrace'
|
||||
|
||||
const ACTIVITY_HEATMAP_CACHE_TTL_MS = 30 * 60 * 1000
|
||||
|
||||
@@ -321,6 +322,7 @@ export const usageApi = {
|
||||
has_format_conversion?: boolean | null
|
||||
has_fallback?: boolean | null
|
||||
target_model?: string | null
|
||||
image_progress?: ImageProgress | null
|
||||
}>
|
||||
}> {
|
||||
const params: Record<string, string | number> = {}
|
||||
|
||||
Reference in New Issue
Block a user