{t("attemptDetails.timeline")}
diff --git a/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/LogicTraceTab.tsx b/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/LogicTraceTab.tsx
index 22bc1263e..c03f50fe5 100644
--- a/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/LogicTraceTab.tsx
+++ b/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/LogicTraceTab.tsx
@@ -200,7 +200,18 @@ export function LogicTraceTab({
return (
-
+
);
}
diff --git a/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/SummaryTab.tsx b/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/SummaryTab.tsx
index 313df803d..9fce9036a 100644
--- a/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/SummaryTab.tsx
+++ b/src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/SummaryTab.tsx
@@ -67,6 +67,7 @@ export function SummaryTab({
costBreakdown,
hedgeLosers,
providerChain,
+ routingTrace,
context1mApplied,
durationMs,
ttfbMs,
@@ -654,10 +655,23 @@ export function SummaryTab({
{(() => {
const hedgeWinnerStep =
providerChain?.find((item) => item.reason === "hedge_winner") ?? null;
+ const discoveryWinnerEvent =
+ routingTrace?.mode === "discovery"
+ ? routingTrace.events.findLast(
+ (event) =>
+ event.type === "winner_committed" &&
+ (routingTrace.summary?.winnerProviderId == null ||
+ event.provider?.id === routingTrace.summary.winnerProviderId)
+ )
+ : null;
+ const discoveryWinner = discoveryWinnerEvent?.provider;
+ const discoveryWinnerAttempt = discoveryWinnerEvent?.attemptId?.match(/:(\d+)$/)?.[1];
const hedgeTable = buildHedgeBillingTable(costUsd, hedgeLosers, {
- providerId: hedgeWinnerStep?.id ?? null,
- providerName: hedgeWinnerStep?.name ?? null,
- attemptNumber: hedgeWinnerStep?.attemptNumber ?? null,
+ providerId: hedgeWinnerStep?.id ?? discoveryWinner?.id ?? null,
+ providerName: hedgeWinnerStep?.name ?? discoveryWinner?.name ?? null,
+ attemptNumber:
+ hedgeWinnerStep?.attemptNumber ??
+ (discoveryWinnerAttempt ? Number(discoveryWinnerAttempt) : null),
inputTokens,
outputTokens,
cacheCreationInputTokens,
@@ -676,7 +690,10 @@ export function SummaryTab({
{t("billingDetails.hedgeMergedCount", { count: hedgeTable.count })}
-