Define observed cost values and aggregation

This commit is contained in:
2026-11-22 18:24:33 +00:00
parent 3d82cad2c9
commit 6ed0e037c4
13 changed files with 215 additions and 2 deletions

View File

@@ -134,6 +134,7 @@ func fromDomainRunResult(result *domain.RunResult) *RunResult {
EffectiveModelParams: fromDomainExecutionTarget(result.EffectiveModelParams),
InputHashes: copyStringMap(result.InputHashes),
Usage: fromDomainTokenUsage(result.Usage),
CostUSD: fromDomainCost(result.CostUSD),
StartTime: result.StartTime,
EndTime: result.EndTime,
Duration: result.Duration,
@@ -158,6 +159,7 @@ func toDomainGenerateResponse(resp *GenerateResponse) *domain.GenerateResponse {
Content: resp.Content,
Usage: toDomainTokenUsage(resp.Usage),
UsagePresence: toDomainTokenUsagePresence(resp.UsagePresence),
CostUSD: copyFloat64Ptr(resp.CostUSD),
}
}