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

Function logRequestFailure

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

Source from the content-addressed store, hash-verified

68}
69
70function logRequestFailure(
71 input: ChatWithRetryInput,
72 error: unknown,
73 attempt: number,
74 maxAttempts: number,
75): void {
76 if (isAbortError(error) || input.params.signal.aborted) return;
77 input.log?.warn('llm request failed', {
78 turnStep: `${input.turnId}.${String(input.currentStep)}`,
79 attempt: `${String(attempt)}/${String(maxAttempts)}`,
80 model: input.llm.modelName,
81 ...retryErrorFields(error),
82 });
83}
84
85function paramsForAttempt(
86 input: ChatWithRetryInput,

Callers 1

chatWithRetryFunction · 0.85

Calls 3

isAbortErrorFunction · 0.90
retryErrorFieldsFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected