
    X
j                    R    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dS )    )annotations)TYPE_CHECKINGAnycast   )google_auth)Credentials
project_id
str | Nonereturntuple[Credentials, str]c                   	 ddl m} n"# t          $ r}t          d          |d }~ww xY wt	          j        dg          \  }}t          t          |          }|                     |                       | s|} | st          d          || fS )Nr   Requestz^Could not import google.auth, you need to install the SDK with `pip install anthropic[vertex]`z.https://www.googleapis.com/auth/cloud-platform)scopeszCould not resolve project_id)
google.auth.transport.requestsr   ModuleNotFoundErrorRuntimeErrorr   defaultr   r   refresh
ValueError)r
   r   errcredentialsloaded_project_ids        `/home/kuhnn/.hermes/hermes-agent/venv/lib/python3.11/site-packages/anthropic/lib/vertex/_auth.py	load_authr      s    :::::::   m
 
	
 &1%8@A& & &"K" sK((K		""" '&
 97888
""s   	 
(#(r   r	   Nonec                L    ddl m} |                      |                       d S )Nr   r   )r   r   r   )r   r   s     r   refresh_authr   )   s4    666666		"""""    N)r
   r   r   r   )r   r	   r   r   )
__future__r   typingr   r   r   _extrasr   google.auth.credentialsr	   r   r    r    r   <module>r&      s    " " " " " " + + + + + + + + + + ! ! ! ! ! ! 4333333# # # #.# # # # # #r    