mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-12 03:48:56 +00:00
fix(base_aws_llm.py): fix credential caching check to see if token is set
This commit is contained in:
parent
3f08382591
commit
13dfe1f203
1 changed files with 4 additions and 1 deletions
|
|
@ -243,7 +243,10 @@ class BaseAWSLLM(BaseLLM):
|
|||
|
||||
credentials = session.get_credentials()
|
||||
|
||||
self.iam_cache.set_cache(cache_key, credentials, ttl=3600 - 60)
|
||||
if (
|
||||
credentials.token is None
|
||||
): # don't cache if session token exists. The expiry time for that is not known.
|
||||
self.iam_cache.set_cache(cache_key, credentials, ttl=3600 - 60)
|
||||
|
||||
return credentials
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue