Skip to content

Commit 42d3267

Browse files
committed
fix: allow retries in cw sdk client
1 parent 3e42f81 commit 42d3267

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/shared/clients/codewhispererChatClient.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export async function createCodeWhispererChatStreamingClient(): Promise<CodeWhis
1717
endpoint: cwsprConfig.endpoint,
1818
token: { token: bearerToken },
1919
customUserAgent: getUserAgent(),
20-
// SETTING max attempts to 0 FOR BETA. RE-ENABLE FOR RE-INVENT
21-
// Implement exponential back off starting with a base of 500ms (500 + attempt^10)
22-
retryStrategy: new ConfiguredRetryStrategy(0, (attempt: number) => 500 + attempt ** 10),
20+
retryStrategy: new ConfiguredRetryStrategy(5, (attempt: number) => 500 + attempt ** 10),
2321
})
2422
return streamingClient
2523
}

0 commit comments

Comments
 (0)