You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.warning("AWS_BEARER_TOKEN_BEDROCK not set - bedrock proxy endpoints will not work")
21
+
defget_aws_bearer_token() ->str:
22
+
"""Get AWS bearer token - static if provided, otherwise auto-generate"""
23
+
ifAWS_BEARER_TOKEN:
24
+
logger.debug("Using static AWS bearer token")
25
+
returnAWS_BEARER_TOKEN
26
+
27
+
# Default: auto-generate token using AWS SDK credentials
28
+
try:
29
+
token=provide_token(region=AWS_REGION)
30
+
logger.debug("Generated fresh AWS Bedrock token")
31
+
returntoken
32
+
exceptExceptionase:
33
+
logger.error(f"Failed to generate AWS token: {e}")
34
+
raiseHTTPException(status_code=503, detail="Failed to generate AWS authentication token. Ensure AWS credentials are configured or set AWS_BEARER_TOKEN_BEDROCK")
0 commit comments