Record the model that served a run's usage #20

Merged
weichen merged 1 commits from feature/durable-rewind into main 2026-10-03 17:40:15 +00:00
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -201,6 +201,8 @@ type Usage struct {
TotalTokens int `json:"totalTokens"`
DurationMs float64 `json:"durationMs"`
ToolCalls int `json:"toolCalls"`
// Model 是实际给出这段用量的模型。空表示当时没有记录。
Model string `json:"model,omitempty"`
}
// ---- 工件 ----
+1
View File
@@ -54,6 +54,7 @@ export type RunPhase = 'thinking' | 'acting' | 'responding' | 'finalizing' | 'do
export interface Usage {
promptTokens: number; completionTokens: number; totalTokens: number;
durationMs: number; toolCalls: number;
model?: string;
}
export interface Run {