We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ff067f commit 4a8d02dCopy full SHA for 4a8d02d
src/anthropic/lib/vertex/_client.py
@@ -164,7 +164,7 @@ def _ensure_access_token(self) -> str:
164
if not self.project_id:
165
self.project_id = project_id
166
167
- if self.credentials.expired:
+ if self.credentials.expired or not self.credentials.token:
168
refresh_auth(self.credentials)
169
170
if not self.credentials.token:
@@ -330,7 +330,7 @@ async def _ensure_access_token(self) -> str:
330
331
332
333
334
await asyncify(refresh_auth)(self.credentials)
335
336
0 commit comments