Skip to content

Commit cdc31f7

Browse files
authored
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.
1 parent 75b861c commit cdc31f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/api/providers/bedrock.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
226226
// Use API key/token-based authentication if enabled and API key is set
227227
clientConfig.token = { token: this.options.awsApiKey }
228228
clientConfig.authSchemePreference = ["httpBearerAuth"] // Otherwise there's no end of credential problems.
229+
clientConfig.requestHandler = {
230+
// This should be the default anyway, but without setting something
231+
// this provider fails to work with LiteLLM passthrough.
232+
requestTimeout: 0,
233+
}
229234
} else if (this.options.awsUseProfile && this.options.awsProfile) {
230235
// Use profile-based credentials if enabled and profile is set
231236
clientConfig.credentials = fromIni({

0 commit comments

Comments
 (0)