From 9228a9147843db2e377557c2af107f2e5a1b2885 Mon Sep 17 00:00:00 2001 From: John Richmond <5629+jr@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:50:33 -0700 Subject: [PATCH] Bedrock: workaround LiteLLM passthrough issues 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({