
    g                    P    d dl mZ d dlmZmZmZ ddlmZ erd dlm	Z	 d	dZ
d
dZy)    )annotations)TYPE_CHECKINGAnycast   )google_auth)Credentialsc                   ddl m} t        j                  dg      \  }}t	        t
        |      }|j                   |              | s|} | st        d      t        | t              st        dt        |              || fS )Nr   Requestz.https://www.googleapis.com/auth/cloud-platform)scopeszCould not resolve project_idz(Expected project_id to be a str but got )google.auth.transport.requestsr   r   defaultr   r   refresh
ValueError
isinstancestr	TypeErrortype)
project_idr   credentialsloaded_project_ids       O/var/www/openai/venv/lib/python3.12/site-packages/anthropic/lib/vertex/_auth.py	load_authr      s    6%0%8%8@A&"K" sK(K	"&
788j#&B4
CSBTUVV
""    c                <    ddl m} | j                   |              y )Nr   r   )r   r   r   )r   r   s     r   refresh_authr   '   s    6	"r   N)r   z
str | Nonereturnztuple[Credentials, str])r   r	   r   None)
__future__r   typingr   r   r   _extrasr   google.auth.credentialsr	   r   r    r   r   <module>r%      s!    " + + !3#*#r   