From cdc31f7c2693eb5a12e66cd08be4a2cb95bfdf63 Mon Sep 17 00:00:00 2001 From: John Richmond <5629+jr@users.noreply.github.com> Date: Sat, 9 Aug 2025 11:29:18 -0700 Subject: [PATCH] Bedrock: workaround LiteLLM passthrough issues (#6778) Explicitly setting requestTimeout seems to be required for it to be possible to use the Bedrock provider with LiteLLM Bedrock passthrough. --- src/api/providers/bedrock.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index 76e502e6c7..706b801d0c 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -226,6 +226,11 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH // Use API key/token-based authentication if enabled and API key is set clientConfig.token = { token: this.options.awsApiKey } clientConfig.authSchemePreference = ["httpBearerAuth"] // Otherwise there's no end of credential problems. + clientConfig.requestHandler = { + // This should be the default anyway, but without setting something + // this provider fails to work with LiteLLM passthrough. + requestTimeout: 0, + } } else if (this.options.awsUseProfile && this.options.awsProfile) { // Use profile-based credentials if enabled and profile is set clientConfig.credentials = fromIni({