MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / paramsForAttempt

Function paramsForAttempt

packages/agent-core/src/loop/retry.ts:85–98  ·  view source on GitHub ↗
(
  input: ChatWithRetryInput,
  attempt: number,
  maxAttempts: number,
)

Source from the content-addressed store, hash-verified

83}
84
85function paramsForAttempt(
86 input: ChatWithRetryInput,
87 attempt: number,
88 maxAttempts: number,
89): LLMChatParams {
90 const turnStep = `${input.turnId}.${String(input.currentStep)}`;
91 return {
92 ...input.params,
93 requestLogFields:
94 attempt === 1
95 ? { turnStep }
96 : { turnStep, attempt: `${String(attempt)}/${String(maxAttempts)}` },
97 };
98}
99
100export function retryBackoffDelays(maxAttempts: number): number[] {
101 return retry.timeouts({

Callers 1

chatWithRetryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected