Skip to content

Commit d0581ca

Browse files
committed
refactor: remove redundant agent runner conversions
1 parent 9fb131e commit d0581ca

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/auto-reply/reply/agent-runner-execution.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,12 +1241,12 @@ export async function runAgentTurnWithFallback(params: {
12411241
fallbackModel = fallbackResult.model;
12421242
fallbackAttempts = Array.isArray(fallbackResult.attempts)
12431243
? fallbackResult.attempts.map((attempt) => ({
1244-
provider: String(attempt.provider ?? ""),
1245-
model: String(attempt.model ?? ""),
1246-
error: String(attempt.error ?? ""),
1247-
reason: attempt.reason ? String(attempt.reason) : undefined,
1244+
provider: attempt.provider,
1245+
model: attempt.model,
1246+
error: attempt.error,
1247+
reason: attempt.reason || undefined,
12481248
status: typeof attempt.status === "number" ? attempt.status : undefined,
1249-
code: attempt.code ? String(attempt.code) : undefined,
1249+
code: attempt.code || undefined,
12501250
}))
12511251
: [];
12521252

0 commit comments

Comments
 (0)