Skip to content

Commit 7b5d2ab

Browse files
Raise the API key validation timeout to 10 seconds (#15410)
1 parent f7f7df9 commit 7b5d2ab

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

extensions/authentication/src/constants.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ export const IS_RUNNING_ON_PWB =
99
!!process.env.RS_SERVER_URL && vscode.env.uiKind === vscode.UIKind.Web;
1010

1111
export const ANTHROPIC_API_VERSION = '2023-06-01';
12-
export const KEY_VALIDATION_TIMEOUT_MS = 5000;
12+
13+
// Budget for a validator's single round trip to the provider (validation/*.ts).
14+
// 5 seconds turned out to be too tight: the OpenAI `/models` call intermittently
15+
// takes longer than that, which aborted a valid key and surfaced as a sign-in
16+
// failure. Kept comfortably under the 15 second window the sign-in e2e tests
17+
// allow for the "Sign out" button to appear.
18+
export const KEY_VALIDATION_TIMEOUT_MS = 10000;
1319
export const CREDENTIAL_REFRESH_INTERVAL_MS = 10 * 60 * 1000;
1420
export const EXPIRY_REFRESH_BUFFER_MS = 60 * 1000;
1521

0 commit comments

Comments
 (0)