( input: ChatWithRetryInput, error: unknown, attempt: number, maxAttempts: number, )
| 68 | } |
| 69 | |
| 70 | function 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 | |
| 85 | function paramsForAttempt( |
| 86 | input: ChatWithRetryInput, |
no test coverage detected