feat: record task attempt chains

This commit is contained in:
2026-05-11 22:39:45 +08:00
parent 4c2de4b4c9
commit 0049b246c1
9 changed files with 492 additions and 9 deletions
+32
View File
@@ -715,10 +715,42 @@ export interface GatewayTask {
error?: string;
errorCode?: string;
errorMessage?: string;
attempts?: GatewayTaskAttempt[];
createdAt: string;
updatedAt: string;
}
export interface GatewayTaskAttempt {
id: string;
taskId: string;
attemptNo: number;
platformId?: string;
platformName?: string;
provider?: string;
platformModelId?: string;
modelName?: string;
providerModelName?: string;
modelAlias?: string;
modelType?: string;
clientId?: string;
queueKey: string;
status: 'running' | 'succeeded' | 'failed' | string;
retryable: boolean;
simulated: boolean;
requestId?: string;
usage?: Record<string, unknown>;
metrics?: Record<string, unknown>;
requestSnapshot?: Record<string, unknown>;
responseSnapshot?: Record<string, unknown>;
responseStartedAt?: string;
responseFinishedAt?: string;
responseDurationMs?: number;
errorCode?: string;
errorMessage?: string;
startedAt: string;
finishedAt?: string;
}
export interface GatewayTaskEvent {
id: string;
taskId: string;