+
    ~j                    R   ^ RI Ht ^ RIt^ RIHtHtHt ^ RIHtH	t	 ^ RI
t
^RIHtHt ^RIHt ^RIHtHtHtHtHtHtHtHt ^RIHtHtHt ^R	IHt ^R
IH t  ^RI!H"t"H#t# ^RIH$t$ ^RI%H&t&H't'H(t( ^RI)H*t*H+t+H,t,H-t-H.t.H/t/ ^RI0H1t1H2t2 ^RI3H4t4 R R lt5R R lt6R R lt7R R lt8R R lt9]'       d-   ^RI:H;t;H<t<H=t=H>t> ^RI?H@t@HAtA ^RIBHCtCHDtD ^RIEHFtFHGtG ^RIHHItIHJtJ . R,OtK ! R" R ]'4      tL ! R# R!](4      tM ! R$ R%4      tN ! R& R'4      tO ! R( R)4      tP ! R* R+4      tQ]LtR]MtSR# )-    )annotationsN)TYPE_CHECKINGAnyMapping)Selfoverride)
_constants_exceptionsQuerystring)OmitHeadersTimeoutNotGiven	TransportProxiesTypesRequestOptions	not_given)is_givenis_mapping_tget_async_library)cached_property)__version__)StreamAsyncStream)APIStatusError)DEFAULT_MAX_RETRIESSyncAPIClientAsyncAPIClient)
TokenCacheInMemoryConfigAccessTokenAuthCredentialsFileAccessTokenProviderdefault_credentials)&warn_env_static_shadows_auto_discovery(warn_explicit_static_shadows_credentials)"_has_auto_discoverable_credentialsc                    V ^8  d   QhRRRR/# )   clientobjectreturnbool )formats   "f/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/anthropic/_client.py__annotate__r2   6   s     7 7F 7t 7    c                2    \        V 4      \        \        39   # )a   True only for the base ``Anthropic`` / ``AsyncAnthropic`` classes, not subclasses.

Subclasses (``AnthropicAWS``, ``AnthropicFoundry``) have their own auth paths
and must not run the credential chain or forward ``credentials`` through their
``__init__`` (which doesn't accept the kwarg).
)type	AnthropicAsyncAnthropic)r+   s   &r1   _is_base_clientr8   6   s     <I~666r3   c                    V ^8  d   QhRRRR/# )r*   credentialsr,   r-   Noner/   )r0   s   "r1   r2   r2   @   s      F t r3   c                :    \        V RR4      pVe
   V! 4        R# R# )zPRelease any resources owned by a credential provider, if it exposes ``close()``.closeN)getattr)r:   r=   s   & r1   _close_credentialsr?   @   s     K$/E r3   c               $    V ^8  d   QhRRRRRR/# )r*   r:   AccessTokenProvider | Nonebase_urlstrr-   r;   r/   )r0   s   "r1   r2   r2   G   s$      ,F RU Z^ r3   c                V    \        V RR4      p\        V4      '       d   V! V4       R# R# )uy  If the credential provider supports ``bind_base_url``, pass it the
client's resolved ``base_url`` so the token exchange and API calls hit
the same deployment without the caller passing the URL twice.

Providers without the hook (plain callables, custom impls) are left
untouched and MUST resolve their own token-exchange ``base_url`` — the
client does not second-guess them.
bind_base_urlN)r>   callable)r:   rB   binds   && r1   _bind_credentials_base_urlrH   G   s'     ;6D~~X r3   c               (    V ^8  d   QhRRRRRRRR/# )r*   api_key
str | None
auth_tokenr:   r,   r-   r;   r/   )r0   s   "r1   r2   r2   U   s*     	? 	?j 	?j 	?W] 	?bf 	?r3   c                R    Vf   R# V e   \        R4       Ve   \        R4       R# R# )zWarn when an explicit ``api_key=`` / ``auth_token=`` argument shadows
an explicit ``credentials=`` provider. Call *after* any copy-inheritance
merging so the params reflect the resolved values.NrJ   rL   )r'   rJ   rL   r:   s   $$$r1   _warn_explicit_shadowrO   U   s.     0;0> r3   c               $    V ^8  d   QhRRRRRR/# )r*   rJ   rK   rL   r-   r;   r/   )r0   s   "r1   r2   r2   a   s&     G G G G Gr3   c                   \        4       '       g   R# V e1   \        P                  P                  R4      '       d   \	        R4       Ve5   \        P                  P                  R4      '       d   \	        R4       R# R# R# )af  Warn when an ``ANTHROPIC_API_KEY`` / ``ANTHROPIC_AUTH_TOKEN`` from the
environment is set alongside signals that would normally drive profile /
federation auto-discovery (``ANTHROPIC_PROFILE``, a ``configs/`` directory,
or the workload-identity env trio). Per the credential-precedence spec,
the static credential wins and auto-discovery is silently skipped.NANTHROPIC_API_KEYANTHROPIC_AUTH_TOKEN)r(   osenvirongetr&   rJ   rL   s   $$r1   _warn_env_shadowrX   a   s]     .//rzz~~.ABB./BC"**..1G"H"H./EF #Ir3   )betamodelsmessagescompletions)ModelsAsyncModels)Beta	AsyncBeta)CompletionsAsyncCompletions)MessagesAsyncMessagesr6   r7   c                    a  ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R]R&   R	]R
&   ]P                  t]P                  tRRRRRRRRRRRRRRR]R]	RRRRRRRRR]/R V 3R lllt
]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R  R! l4       t]R" R# l4       t]]R$ R% l4       4       t]]R& R' l4       4       t]R( R) l4       t]R* R+ l4       t]]R, V 3R- ll4       4       t]R. R/ l4       t]]R0 R1 l4       4       t]R2 V 3R3 ll4       t]R4 V 3R5 ll4       tRRRRR]RRRRRRRRR]RRR]RRR6RRRR7RR8/ /R9 R: llt]t]R; R< l4       tR=t V ;t!# )>r6   rK   rJ   rL   webhook_keyrA   r:   TokenCache | None_token_cacheAccessTokenAuth | None_custom_authNconfigprofilerB   timeoutmax_retriesdefault_headersdefault_queryhttp_client_strict_response_validationFc               T    V ^8  d   QhRRRRRRRRRRR	RR
RRRRRRRRRRRRRRRRR/# )r*   rJ   rK   rL   r:   rA   rk   Mapping[str, Any] | Nonerl   rf   rB   str | httpx.URL | Nonerm   !float | Timeout | None | NotGivenrn   intro   Mapping[str, str] | Nonerp   Mapping[str, object] | Nonerq   httpx.Client | Nonerr   r.   rh   TokenCache | None | NotGivenr-   r;   r/   )r0   s   "r1   r2   Anthropic.__annotate__   s     P* P* P* 	P*
 0P* )P* P*  P* )P* 3P* P* 2P* 3P*" )#P*4 &*5P*6 37P*8 
9P*r3   c                 < VRJ;'       g)    VRJ;'       g    VRJ;'       g    VRJ;'       g    VRJpV'       g?   \         P                  P                  R4      p\         P                  P                  R4      pWn        W n        Vf    \         P                  P                  R4      pW`n        Vf    \         P                  P                  R4      pVRJpVf   Rp\         P                  P                  R4      pVe|   / pVP                  R4       FK  pVP                  R	4      pV^ 8  g   K  VV^,           R P                  4       VVRV P                  4       &   KM  	  / VC\        V
4      '       d   T
M/ Cp
/ pVea   Vf   Ve   \        R
4      h\        \        V4      4      pTpVP                  4       pV'       g   VP                  '       d   VP                  pMWVeT   Ve   \        R
4      h\        VR7      pTpVP                  4       pV'       g   VP                  '       d   VP                  pVf{   Vfw   Vfs   \!        V 4      '       db   \#        V'       d   \%        V4      MRR7      pVe?   VP&                  pVP                  pV'       g   VP(                  '       d   VP(                  p\+        V\%        V4      4       W0n        \/        WVR7       \1        WR7       \3        V\4        4      '       g   Wn        MVe   \9        V4      MRV n        V P6                  e   \;        V P6                  4      MRV n        V'       d   / VCT
;'       g    / Cp
\>        SV `  \B        VV	VVV
VVR7       \D        V n#        R# )u  Construct a new synchronous Anthropic client instance.

Credentials are resolved in the following order (first match wins):

1. Explicit constructor arguments — ``api_key=``, ``auth_token=``,
   ``credentials=``, ``config=``, or ``profile=``. When any of these
   is passed, environment variables are not consulted for credentials.
2. ``ANTHROPIC_API_KEY`` / ``ANTHROPIC_AUTH_TOKEN`` environment
   variables.
3. ``ANTHROPIC_PROFILE`` environment variable — loads the named
   profile from ``<config_dir>/configs/<profile>.json``.
4. Workload identity federation environment variables —
   ``ANTHROPIC_IDENTITY_TOKEN[_FILE]`` +
   ``ANTHROPIC_FEDERATION_RULE_ID`` + ``ANTHROPIC_ORGANIZATION_ID``.
5. The active profile on disk — the profile named by
   ``<config_dir>/active_config``, or ``default``.

``credentials=``, ``config=``, and ``profile=`` are mutually exclusive.

If a static credential is supplied alongside a credentials provider
(``credentials=`` / ``config=`` / ``profile=``), or if
``ANTHROPIC_API_KEY`` / ``ANTHROPIC_AUTH_TOKEN`` is set alongside a
profile or federation configuration, the static credential takes
precedence and a one-shot warning is logged on the ``anthropic``
logger.
NrR   rS   ANTHROPIC_WEBHOOK_SIGNING_KEYANTHROPIC_BASE_URLhttps://api.anthropic.comANTHROPIC_CUSTOM_HEADERS
:=Pass at most one of `credentials=`, `config=`, or `profile=`.rl   rB   rN   rW   versionrB   rn   rm   rq   custom_headerscustom_queryrr   )$rT   rU   rV   rJ   rL   rf   splitfindstripr   	TypeErrorr!   dictextra_headersresolved_base_urlr#   r8   r%   rC   providerrB   rH   r:   rO   rX   
isinstancer   rh   r    r"   rj   super__init__r   r   _default_stream_clsselfrJ   rL   r:   rk   rl   rf   rB   rm   rn   ro   rp   rq   rr   rh   has_explicit_credentialbase_url_is_explicitcustom_headers_envparsedlinecoloncredential_headers	in_memory
creds_fileresult	__class__s   &$$$$$$$$$$$$$$          r1   r   Anthropic.__init__   sG   v 4 # #%# #$&# # T!# # d" 	  'jjnn%89G(>?J$ **..)HIK&zz~~&:;H
  (t32HZZ^^,FG)%'F*006		#A:37	3D3J3J3LF4<--/0 7 gf|O?\?\ObdfO .0&'*= _``&tF|4I#K!*!8!8!:'I,G,G,G$66 & _``(9J$K!+!9!9!;'J,H,H,H%777?z7Io^bNcNc(8#h-QlmF!$oo%+%9%9"+%H";H>&gR]^@,11 ,;F;R
; 7X\DBFBSBSB_OD,=,=>eiO!3O8M8M2OO 	##*&(C 	 		
 $* r3   c                   V ^8  d   QhRR/# )r*   r-   ra   r/   )r0   s   "r1   r2   r|   $  s     ! ![ !r3   c                	    ^RI Hp V! V 4      # )   )ra   )resources.completionsra   )r   ra   s   & r1   r\   Anthropic.completions#  s    64  r3   c                   V ^8  d   QhRR/# )r*   r-   rc   r/   )r0   s   "r1   r2   r|   *  s      ( r3   c                	    ^RI Hp V! V 4      # )r   )rc   )resources.messagesrc   )r   rc   s   & r1   r[   Anthropic.messages)  s    0~r3   c                   V ^8  d   QhRR/# )r*   r-   r]   r/   )r0   s   "r1   r2   r|   0  s       r3   c                	    ^RI Hp V! V 4      # )r   )r]   )resources.modelsr]   )r   r]   s   & r1   rZ   Anthropic.models/  s    ,d|r3   c                   V ^8  d   QhRR/# )r*   r-   r_   r/   )r0   s   "r1   r2   r|   6  s      d r3   c                	    ^RI Hp V! V 4      # )r   )r_   )resources.betar_   )r   r_   s   & r1   rY   Anthropic.beta5  s    (Dzr3   c                   V ^8  d   QhRR/# )r*   r-   AnthropicWithRawResponser/   )r0   s   "r1   r2   r|   <  s     . .#; .r3   c                	    \        V 4      # N)r   r   s   &r1   with_raw_responseAnthropic.with_raw_response;  s    '--r3   c                   V ^8  d   QhRR/# )r*   r-   AnthropicWithStreamedResponser/   )r0   s   "r1   r2   r|   @  s     3 3)F 3r3   c                	    \        V 4      # r   )r   r   s   &r1   with_streaming_response!Anthropic.with_streaming_response?      ,T22r3   c                   V ^8  d   QhRR/# r*   r-   r   r/   )r0   s   "r1   r2   r|   E       4 4K 4r3   c                	    \        R R7      # brackets)array_formatr   r   s   &r1   qsAnthropic.qsC       
33r3   c                   V ^8  d   QhRR/# r*   r-   zdict[str, str]r/   )r0   s   "r1   r2   r|   J       ; ;n ;r3   c                	6    / V P                   CV P                  C# r   _api_key_auth_bearer_authr   s   &r1   auth_headersAnthropic.auth_headersH        ;$$$:(9(9::r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   r|   N       & &~ &r3   c                	.    V P                   pVf   / # RV/# N	X-Api-KeyrJ   r   rJ   s   & r1   r   Anthropic._api_key_authM       ,,?IW%%r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   r|   U       
9 
9n 
9r3   c                	4    V P                   pVf   / # RRV 2/# NAuthorizationzBearer rL   r   rL   s   & r1   r   Anthropic._bearer_authT  *     __
I7:,!788r3   c                   V ^8  d   QhRR/# r*   r-   zdict[str, str | Omit]r/   )r0   s   "r1   r2   r|   c       
 
!6 
r3   c                	@   < / \         SV `  CR RRR/CV P                  C# )X-Stainless-Asyncfalseanthropic-version
2023-06-01)r   ro   _custom_headersr   r   s   &r1   ro   Anthropic.default_headersa  s9    
g%

 ""	
 	
r3   c               $    V ^8  d   QhRRRRRR/# r*   headersr   r   r-   r;   r/   )r0   s   "r1   r2   r|   l  s!     
 
 
' 
d 
r3   c                	   V P                   e1   VP                  R4      '       g   VP                  R4      '       g   R # VP                  R4      '       g   VP                  R4      '       d   R # VP                  R4      '       g&   \        VP                  R4      \        4      '       d   R # VP                  R4      '       g&   \        VP                  R4      \        4      '       d   R # \	        R4      hNr   r   z"Could not resolve authentication method. Expected one of api_key, auth_token, or credentials to be set. Or for one of the `X-Api-Key` or `Authorization` headers to be explicitly omitted"rh   rV   r   r   r   r   r   r   s   &&&r1   _validate_headersAnthropic._validate_headersk  s     ([1I1IRYR]R]^mRnRn;;''7;;{+C+C;;{##z.2D2D[2QSW'X'X;;'':n6H6H6Y[_+`+` J
 	
r3   c                   V ^8  d   QhRR/# r*   r-   zhttpx.Auth | Noner/   )r0   s   "r1   r2   r|          ! !. !r3   c                	    V P                   # r   rj   r   s   &r1   custom_authAnthropic.custom_auth          r3   c                    V ^8  d   QhRRRR/# r*   responsehttpx.Responser-   r.   r/   )r0   s   "r1   r2   r|          / /n / /r3   c                	   < VP                   R 8X  dU   V P                  eG   V P                  P                  4        VP                  P                  P                  R4      R8X  d   R# \        SV `  V4      #   zx-stainless-retry-count0Tstatus_coderh   
invalidaterequestr   rV   r   _should_retryr   r  r   s   &&r1   r  Anthropic._should_retry  c     3&4+<+<+H((*''++,EF#Mw$X..r3   c                   V ^8  d   QhRR/# r*   r-   r;   r/   )r0   s   "r1   r2   r|     s     - -t -r3   c                	N   < \         SV `  4        \        V P                  4       R # r   r   r=   r?   r:   r   s   &r1   r=   Anthropic.close  s    4++,r3   set_default_headersset_default_query_extra_kwargsc                X    V ^8  d   QhRRRRRRRRRRR	RR
RRRRRRRRRRRRRRRRRRR/# )r*   rJ   rK   rL   r:   %AccessTokenProvider | None | NotGivenrk   rt   rl   rf   rB   ru   rm   rv   rq   rz   rn   int | NotGivenro   rx   r  rp   ry   r  r  Mapping[str, Any]r-   r   r/   )r0   s   "r1   r2   r|     s     G
 G
 G
 	G

 ;G
 )G
 G
  G
 )G
 3G
 )G
 $G
 2G
 6G
 3G
  7!G
" )#G
$ 
%G
r3   c                  Ve   Ve   \        R4      hVe   Ve   \        R4      hV P                  pVe   / VCVCpMVe   TpV P                  pVe   / VCVCpMVe   TpT	;'       g    V P                  p	Ve-   \	        V\
        4      '       d   Ve   \        R4      hRV/VCpMVe)   \	        V\
        4      '       g   \        R4      hRV/VCpMe\	        V\
        4      '       d   V P                  MTpVe>   \        V 4      '       d-   RV/VCp\	        V\
        4      '       d   RV P                  /VCpV P                  ! RRT;'       g    V P                  R	T;'       g    V P                  R
T;'       g    V P                  RT;'       g    V P                  R\	        V\
        4      '       d   V P                  MTRT	R\!        V
4      '       d   T
MV P"                  RVRV/	VB # zn
Create a new client instance re-using the same options given to the current client with optional overriding.
zPThe `default_headers` and `set_default_headers` arguments are mutually exclusivezLThe `default_query` and `set_default_query` arguments are mutually exclusiver   rk   rl   r:   rh   rJ   rL   rf   rB   rm   rq   rn   ro   rp   r/   
ValueErrorr   _custom_query_clientr   r   r   r:   r8   rh   r   rJ   rL   rf   rB   rm   r   rn   r   rJ   rL   r:   rk   rl   rf   rB   rm   rq   rn   ro   r  rp   r  r  r   paramsresolved_credentialss   &$$$$$$$$$$$$$$$   r1   copyAnthropic.copy  "   , &+>+Jopp$):)Fkll&&&44O4G ,)G##$00-0F*&F!11T\\k8448K _``%v??M k844 _``&A=AM7A+x7X7X4#3#3^i #/OD4I4I!.0D V V k844%3T5F5F$X-$XM~~ 
++t||
!44T__
 $77t'7'7
 ..	

 %/w$A$ADLLw
 $
 (0'<'<$BRBR
 $
 !
 
 	
r3   c               (    V ^8  d   QhRRRRRRRR/# 	r*   err_msgrC   bodyr,   r  r  r-   r   r/   )r0   s   "r1   r2   r|     8     $E $E$E 	$E
 !$E 
$Er3   c               	P   VP                   R 8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P
                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R	8X  d   \        P                  ! WVR7      # VP                   R
8  d   \        P                  ! WVR7      # \        WVR7      # i  )r  r1  r  i  i  i  i  i  i  i  i  r  r
   BadRequestErrorAuthenticationErrorPermissionDeniedErrorNotFoundErrorConflictErrorRequestTooLargeErrorUnprocessableEntityErrorRateLimitErrorOverloadedErrorInternalServerErrorr   r   r0  r1  r  s   &&$$r1   _make_status_errorAnthropic._make_status_error  b    3&..wPTUU3&227TXYY3&44WVZ[[3&,,WdSS3&,,WdSS3&33GUYZZ3&77Y]^^3&--gtTT3&..wPTUU3&227TXYYgtDDr3   rj   r   rh   rJ   rL   r:   rf   "__name__
__module____qualname____firstlineno____annotations__r	   HUMAN_PROMPT	AI_PROMPTr   r   r   r   r\   r[   rZ   rY   r   r   propertyr   r   r   r   r   ro   r   r  r  r=   r+  with_optionsrA  __static_attributes____classcell__r   s   @r1   r6   r6      s   ++##(( **L$$IP* #P* "&	P*
 37P* ,0P* #P* #'P* ,0P* 6?P* /P* 59P* 6:P*" ,0#P*4 -25P*6 6?7P* P*d ! !
  
  
  
 . . 3 3 4  4 ;  ; & & 
9 
9 
  
 
 
4 !  ! / / - -G
 #G
 "&	G

 >GG
 ,0G
 #G
 #'G
 ,0G
 6?G
 ,0G
 '0G
 59G
 9=G
 6:G
  :>!G
" ,.#G
V L$E $Er3   c                    a  ] tR tRt$ R]R&   R]R&   R]R&   R]R&   R]R	&   R
]R&   ]P                  t]P                  tRRRRRRRRRRRRRRR]R]	RRRRRRRRR	]/R V 3R lllt
]R R l4       t]R R l4       t]R R l4       t]R R  l4       t]R! R" l4       t]R# R$ l4       t]]R% R& l4       4       t]]R' R( l4       4       t]R) R* l4       t]R+ R, l4       t]]R- V 3R. ll4       4       t]R/ R0 l4       t]]R1 R2 l4       4       t]R3 V 3R4 ll4       t]R5 V 3R6 ll4       tRRRRR]RRRRRRRRR]RRR]RRR7RRRR8RR9/ /R: R; llt]t]R< R= l4       tR>t V ;t!# )?r7   i  rK   rJ   rL   rf   rA   r:   rg   rh   ri   rj   Nrk   rl   rB   rm   rn   ro   rp   rq   rr   Fc               T    V ^8  d   QhRRRRRRRRRRR	RR
RRRRRRRRRRRRRRRRR/# )r*   rJ   rK   rL   r:   rA   rk   rt   rl   rf   rB   ru   rm   rv   rn   rw   ro   rx   rp   ry   rq   httpx.AsyncClient | Nonerr   r.   rh   r{   r-   r;   r/   )r0   s   "r1   r2   AsyncAnthropic.__annotate__#  s     P/ P/ P/ 	P/
 0P/ )P/ P/  P/ )P/ 3P/ P/ 2P/ 3P/" .#P/4 &*5P/6 37P/8 
9P/r3   c                 < VRJ;'       g)    VRJ;'       g    VRJ;'       g    VRJ;'       g    VRJpV'       g?   \         P                  P                  R4      p\         P                  P                  R4      pWn        W n        Vf    \         P                  P                  R4      pW`n        Vf    \         P                  P                  R4      pVRJpVf   Rp\         P                  P                  R4      pVe|   / pVP                  R4       FK  pVP                  R	4      pV^ 8  g   K  VV^,           R P                  4       VVRV P                  4       &   KM  	  / VC\        V
4      '       d   T
M/ Cp
/ pVea   Vf   Ve   \        R
4      h\        \        V4      4      pTpVP                  4       pV'       g   VP                  '       d   VP                  pMWVeT   Ve   \        R
4      h\        VR7      pTpVP                  4       pV'       g   VP                  '       d   VP                  pVf{   Vfw   Vfs   \!        V 4      '       db   \#        V'       d   \%        V4      MRR7      pVe?   VP&                  pVP                  pV'       g   VP(                  '       d   VP(                  p\+        V\%        V4      4       W0n        \/        WVR7       \1        WR7       \3        V\4        4      '       g   Wn        MVe   \9        V4      MRV n        V P6                  e   \;        V P6                  4      MRV n        V'       d   / VCT
;'       g    / Cp
\>        SV `  \B        VV	VVV
VVR7       \D        V n#        R# )u  Construct a new async AsyncAnthropic client instance.

Credentials are resolved in the following order (first match wins):

1. Explicit constructor arguments — ``api_key=``, ``auth_token=``,
   ``credentials=``, ``config=``, or ``profile=``. When any of these
   is passed, environment variables are not consulted for credentials.
2. ``ANTHROPIC_API_KEY`` / ``ANTHROPIC_AUTH_TOKEN`` environment
   variables.
3. ``ANTHROPIC_PROFILE`` environment variable — loads the named
   profile from ``<config_dir>/configs/<profile>.json``.
4. Workload identity federation environment variables —
   ``ANTHROPIC_IDENTITY_TOKEN[_FILE]`` +
   ``ANTHROPIC_FEDERATION_RULE_ID`` + ``ANTHROPIC_ORGANIZATION_ID``.
5. The active profile on disk — the profile named by
   ``<config_dir>/active_config``, or ``default``.

``credentials=``, ``config=``, and ``profile=`` are mutually exclusive.

If a static credential is supplied alongside a credentials provider
(``credentials=`` / ``config=`` / ``profile=``), or if
``ANTHROPIC_API_KEY`` / ``ANTHROPIC_AUTH_TOKEN`` is set alongside a
profile or federation configuration, the static credential takes
precedence and a one-shot warning is logged on the ``anthropic``
logger.
NrR   rS   r~   r   r   r   r   r   r   r   r   rN   rW   r   )$rT   rU   rV   rJ   rL   rf   r   r   r   r   r   r!   r   r   r   r#   r8   r%   rC   r   rB   rH   r:   rO   rX   r   r   rh   r    r"   rj   r   r   r   r   r   r   s   &$$$$$$$$$$$$$$          r1   r   AsyncAnthropic.__init__#  sG   v 4 # #%# #$&# # T!# # d" 	  'jjnn%89G(>?J$ **..)HIK&zz~~&:;H
  (t32HZZ^^,FG)%'F*006		#A:37	3D3J3J3LF4<--/0 7 gf|O?\?\ObdfO .0&'*= _``&tF|4I#K!*!8!8!:'I,G,G,G$66 & _``(9J$K!+!9!9!;'J,H,H,H%777?z7Io^bNcNc(8#h-QlmF!$oo%+%9%9"+%H";H>&gR]^@,11 ,;F;R
; 7X\DBFBSBSB_OD,=,=>eiO!3O8M8M2OO 	##*&(C 	 		
 $/ r3   c                   V ^8  d   QhRR/# )r*   r-   rb   r/   )r0   s   "r1   r2   rU    s     & &- &r3   c                	    ^RI Hp V! V 4      # )r   )rb   )r   rb   )r   rb   s   & r1   r\   AsyncAnthropic.completions  s    ;%%r3   c                   V ^8  d   QhRR/# )r*   r-   rd   r/   )r0   s   "r1   r2   rU    s     # #- #r3   c                	    ^RI Hp V! V 4      # )r   )rd   )r   rd   )r   rd   s   & r1   r[   AsyncAnthropic.messages  s    5T""r3   c                   V ^8  d   QhRR/# )r*   r-   r^   r/   )r0   s   "r1   r2   rU    s     ! ! !r3   c                	    ^RI Hp V! V 4      # )r   )r^   )r   r^   )r   r^   s   & r1   rZ   AsyncAnthropic.models  s    14  r3   c                   V ^8  d   QhRR/# )r*   r-   r`   r/   )r0   s   "r1   r2   rU    s      i r3   c                	    ^RI Hp V! V 4      # )r   )r`   )r   r`   )r   r`   s   & r1   rY   AsyncAnthropic.beta  s    -r3   c                   V ^8  d   QhRR/# )r*   r-   AsyncAnthropicWithRawResponser/   )r0   s   "r1   r2   rU    s     3 3#@ 3r3   c                	    \        V 4      # r   )re  r   s   &r1   r    AsyncAnthropic.with_raw_response  r   r3   c                   V ^8  d   QhRR/# )r*   r-   "AsyncAnthropicWithStreamedResponser/   )r0   s   "r1   r2   rU    s     8 8)K 8r3   c                	    \        V 4      # r   )ri  r   s   &r1   r   &AsyncAnthropic.with_streaming_response  s    1$77r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   rU    r   r3   c                	    \        R R7      # r   r   r   s   &r1   r   AsyncAnthropic.qs  r   r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   rU    r   r3   c                	6    / V P                   CV P                  C# r   r   r   s   &r1   r   AsyncAnthropic.auth_headers  r   r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   rU    r   r3   c                	.    V P                   pVf   / # RV/# r   r   r   s   & r1   r   AsyncAnthropic._api_key_auth  r   r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   rU    r   r3   c                	4    V P                   pVf   / # RRV 2/# r   r   r   s   & r1   r   AsyncAnthropic._bearer_auth  r   r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   rU    r   r3   c                	V   < / \         SV `  CR R\        4        2RR/CV P                  C# )r   zasync:r   r   )r   ro   r   r   r   s   &r1   ro   AsyncAnthropic.default_headers  sE    
g%
6*;*=)>!?
 ""	
 	
r3   c               $    V ^8  d   QhRRRRRR/# r   r/   )r0   s   "r1   r2   rU    s!     
 
 
' 
d 
r3   c                	   V P                   e1   VP                  R4      '       g   VP                  R4      '       g   R # VP                  R4      '       g   VP                  R4      '       d   R # VP                  R4      '       g&   \        VP                  R4      \        4      '       d   R # VP                  R4      '       g&   \        VP                  R4      \        4      '       d   R # \	        R4      hr   r   r   s   &&&r1   r    AsyncAnthropic._validate_headers  s     ([1I1IRYR]R]^mRnRn;;''7;;{+C+C;;{##z.2D2D[2QSW'X'X;;'':n6H6H6Y[_+`+` J
 	
r3   c                   V ^8  d   QhRR/# r   r/   )r0   s   "r1   r2   rU    r   r3   c                	    V P                   # r   r  r   s   &r1   r  AsyncAnthropic.custom_auth  r  r3   c                    V ^8  d   QhRRRR/# r  r/   )r0   s   "r1   r2   rU    r	  r3   c                	   < VP                   R 8X  dU   V P                  eG   V P                  P                  4        VP                  P                  P                  R4      R8X  d   R# \        SV `  V4      # r  r  r  s   &&r1   r  AsyncAnthropic._should_retry  r  r3   c                   V ^8  d   QhRR/# r  r/   )r0   s   "r1   r2   rU  '  s     - -T -r3   c                	j   <"   \         SV `  4       G R j  xL
  \        V P                  4       R #  L5ir   r  r   s   &r1   r=   AsyncAnthropic.close&  s*     gmo 	4++, 	s   313r  r  r  c                X    V ^8  d   QhRRRRRRRRRRR	RR
RRRRRRRRRRRRRRRRRRR/# )r*   rJ   rK   rL   r:   r  rk   rt   rl   rf   rB   ru   rm   rv   rq   rT  rn   r   ro   rx   r  rp   ry   r  r  r!  r-   r   r/   )r0   s   "r1   r2   rU  /  s     G
 G
 G
 	G

 ;G
 )G
 G
  G
 )G
 3G
 .G
 $G
 2G
 6G
 3G
  7!G
" )#G
$ 
%G
r3   c                  Ve   Ve   \        R4      hVe   Ve   \        R4      hV P                  pVe   / VCVCpMVe   TpV P                  pVe   / VCVCpMVe   TpT	;'       g    V P                  p	Ve-   \	        V\
        4      '       d   Ve   \        R4      hRV/VCpMVe)   \	        V\
        4      '       g   \        R4      hRV/VCpMe\	        V\
        4      '       d   V P                  MTpVe>   \        V 4      '       d-   RV/VCp\	        V\
        4      '       d   RV P                  /VCpV P                  ! RRT;'       g    V P                  R	T;'       g    V P                  R
T;'       g    V P                  RT;'       g    V P                  R\	        V\
        4      '       d   V P                  MTRT	R\!        V
4      '       d   T
MV P"                  RVRV/	VB # r#  r$  r(  s   &$$$$$$$$$$$$$$$   r1   r+  AsyncAnthropic.copy/  r-  r3   c               (    V ^8  d   QhRRRRRRRR/# r/  r/   )r0   s   "r1   r2   rU  }  r2  r3   c               	P   VP                   R 8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P
                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R8X  d   \        P                  ! WVR7      # VP                   R	8X  d   \        P                  ! WVR7      # VP                   R
8  d   \        P                  ! WVR7      # \        WVR7      # r4  r5  r@  s   &&$$r1   rA  !AsyncAnthropic._make_status_error|  rC  r3   rD  rE  rQ  s   @r1   r7   r7     s   ++##(( **L$$IP/ #P/ "&	P/
 37P/ ,0P/ #P/ #'P/ ,0P/ 6?P/ /P/ 59P/ 6:P/" 15#P/4 -25P/6 6?7P/ P/d & &
 # #
 ! !
  
 3 3 8 8 4  4 ;  ; & & 
9 
9 
  
 
 
( !  ! / / - -G
 #G
 "&	G

 >GG
 ,0G
 #G
 #'G
 ,0G
 6?G
 15G
 '0G
 59G
 9=G
 6:G
  :>!G
" ,.#G
V L$E $Er3   c                      ] tR tRt$ R]R&   R R lt]R R l4       t]R R	 l4       t]R
 R l4       t	]R R l4       t
RtR# )r   i  r6   r'  c                    V ^8  d   QhRRRR/# r*   r+   r6   r-   r;   r/   )r0   s   "r1   r2   %AnthropicWithRawResponse.__annotate__        y T r3   c                	    Wn         R # r   r'  r   r+   s   &&r1   r   !AnthropicWithRawResponse.__init__      r3   c                   V ^8  d   QhRR/# )r*   r-   z&completions.CompletionsWithRawResponser/   )r0   s   "r1   r2   r    s     D DC Dr3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )CompletionsWithRawResponse)r   r  r'  r\   )r   r  s   & r1   r\   $AnthropicWithRawResponse.completions  s    E)$,,*B*BCCr3   c                   V ^8  d   QhRR/# )r*   r-   z messages.MessagesWithRawResponser/   )r0   s   "r1   r2   r    s     > >: >r3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )MessagesWithRawResponse)r   r  r'  r[   )r   r  s   & r1   r[   !AnthropicWithRawResponse.messages  s    ?&t||'<'<==r3   c                   V ^8  d   QhRR/# )r*   r-   zmodels.ModelsWithRawResponser/   )r0   s   "r1   r2   r    s     : :4 :r3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )ModelsWithRawResponse)r   r  r'  rZ   )r   r  s   & r1   rZ   AnthropicWithRawResponse.models  s    ;$T\\%8%899r3   c                   V ^8  d   QhRR/# )r*   r-   zbeta.BetaWithRawResponser/   )r0   s   "r1   r2   r    s     6 6. 6r3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )BetaWithRawResponse)r   r  r'  rY   )r   r  s   & r1   rY   AnthropicWithRawResponse.beta  s    7"4<<#4#455r3   r  NrF  rG  rH  rI  rJ  r   r   r\   r[   rZ   rY   rO  r/   r3   r1   r   r     s_     D D
 > >
 : :
 6 6r3   r   c                      ] tR tRt$ R]R&   R R lt]R R l4       t]R R	 l4       t]R
 R l4       t	]R R l4       t
RtR# )re  i  r7   r'  c                    V ^8  d   QhRRRR/# r*   r+   r7   r-   r;   r/   )r0   s   "r1   r2   *AsyncAnthropicWithRawResponse.__annotate__        ~ $ r3   c                	    Wn         R # r   r  r  s   &&r1   r   &AsyncAnthropicWithRawResponse.__init__  r  r3   c                   V ^8  d   QhRR/# )r*   r-   z+completions.AsyncCompletionsWithRawResponser/   )r0   s   "r1   r2   r    s     I IH Ir3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )AsyncCompletionsWithRawResponse)r   r  r'  r\   )r   r  s   & r1   r\   )AsyncAnthropicWithRawResponse.completions  s    J.t||/G/GHHr3   c                   V ^8  d   QhRR/# )r*   r-   z%messages.AsyncMessagesWithRawResponser/   )r0   s   "r1   r2   r    s     C C? Cr3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )AsyncMessagesWithRawResponse)r   r  r'  r[   )r   r  s   & r1   r[   &AsyncAnthropicWithRawResponse.messages  s    D+DLL,A,ABBr3   c                   V ^8  d   QhRR/# )r*   r-   z!models.AsyncModelsWithRawResponser/   )r0   s   "r1   r2   r    s     ? ?9 ?r3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )AsyncModelsWithRawResponse)r   r  r'  rZ   )r   r  s   & r1   rZ   $AsyncAnthropicWithRawResponse.models  s    @)$,,*=*=>>r3   c                   V ^8  d   QhRR/# )r*   r-   zbeta.AsyncBetaWithRawResponser/   )r0   s   "r1   r2   r    s     ; ;3 ;r3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )AsyncBetaWithRawResponse)r   r  r'  rY   )r   r  s   & r1   rY   "AsyncAnthropicWithRawResponse.beta  s    <'(9(9::r3   r  Nr  r/   r3   r1   re  re    sa     I I
 C C
 ? ?
 ; ;r3   re  c                      ] tR tRt$ R]R&   R R lt]R R l4       t]R R	 l4       t]R
 R l4       t	]R R l4       t
RtR# )r   i  r6   r'  c                    V ^8  d   QhRRRR/# r  r/   )r0   s   "r1   r2   *AnthropicWithStreamedResponse.__annotate__  r  r3   c                	    Wn         R # r   r  r  s   &&r1   r   &AnthropicWithStreamedResponse.__init__  r  r3   c                   V ^8  d   QhRR/# )r*   r-   z,completions.CompletionsWithStreamingResponser/   )r0   s   "r1   r2   r    s     J JI Jr3   c                	F    ^RI Hp V! V P                  P                  4      # )r   ) CompletionsWithStreamingResponse)r   r  r'  r\   )r   r  s   & r1   r\   )AnthropicWithStreamedResponse.completions  s    K/0H0HIIr3   c                   V ^8  d   QhRR/# )r*   r-   z&messages.MessagesWithStreamingResponser/   )r0   s   "r1   r2   r    s     D D@ Dr3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )MessagesWithStreamingResponse)r   r  r'  r[   )r   r  s   & r1   r[   &AnthropicWithStreamedResponse.messages  s    E,T\\-B-BCCr3   c                   V ^8  d   QhRR/# )r*   r-   z"models.ModelsWithStreamingResponser/   )r0   s   "r1   r2   r    s     @ @: @r3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )ModelsWithStreamingResponse)r   r  r'  rZ   )r   r  s   & r1   rZ   $AnthropicWithStreamedResponse.models  s    A*4<<+>+>??r3   c                   V ^8  d   QhRR/# )r*   r-   zbeta.BetaWithStreamingResponser/   )r0   s   "r1   r2   r    s     < <4 <r3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )BetaWithStreamingResponse)r   r  r'  rY   )r   r  s   & r1   rY   "AnthropicWithStreamedResponse.beta  s    =():):;;r3   r  Nr  r/   r3   r1   r   r     sc     J J
 D D
 @ @
 < <r3   r   c                      ] tR tRt$ R]R&   R R lt]R R l4       t]R R	 l4       t]R
 R l4       t	]R R l4       t
RtR# )ri  i  r7   r'  c                    V ^8  d   QhRRRR/# r  r/   )r0   s   "r1   r2   /AsyncAnthropicWithStreamedResponse.__annotate__  r  r3   c                	    Wn         R # r   r  r  s   &&r1   r   +AsyncAnthropicWithStreamedResponse.__init__  r  r3   c                   V ^8  d   QhRR/# )r*   r-   z1completions.AsyncCompletionsWithStreamingResponser/   )r0   s   "r1   r2   r    s     O ON Or3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )%AsyncCompletionsWithStreamingResponse)r   r  r'  r\   )r   r  s   & r1   r\   .AsyncAnthropicWithStreamedResponse.completions  s    P4T\\5M5MNNr3   c                   V ^8  d   QhRR/# )r*   r-   z+messages.AsyncMessagesWithStreamingResponser/   )r0   s   "r1   r2   r    s     I IE Ir3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )"AsyncMessagesWithStreamingResponse)r   r  r'  r[   )r   r  s   & r1   r[   +AsyncAnthropicWithStreamedResponse.messages  s    J1$,,2G2GHHr3   c                   V ^8  d   QhRR/# )r*   r-   z'models.AsyncModelsWithStreamingResponser/   )r0   s   "r1   r2   r    s     E E? Er3   c                	F    ^RI Hp V! V P                  P                  4      # )r   ) AsyncModelsWithStreamingResponse)r   r  r'  rZ   )r   r  s   & r1   rZ   )AsyncAnthropicWithStreamedResponse.models  s    F/0C0CDDr3   c                   V ^8  d   QhRR/# )r*   r-   z#beta.AsyncBetaWithStreamingResponser/   )r0   s   "r1   r2   r    s     A A9 Ar3   c                	F    ^RI Hp V! V P                  P                  4      # )r   )AsyncBetaWithStreamingResponse)r   r  r'  rY   )r   r  s   & r1   rY   'AsyncAnthropicWithStreamedResponse.beta  s    B-dll.?.?@@r3   r  Nr  r/   r3   r1   ri  ri    se     O O
 I I
 E E
 A Ar3   ri  )r   r   r   r   r6   r7   ClientAsyncClient)T
__future__r   rT   typingr   r   r   typing_extensionsr   r   httpx r	   r
   _qsr   _typesr   r   r   r   r   r   r   r   _utilsr   r   r   _compatr   _versionr   
_streamingr   r   r   _base_clientr   r   r   lib.credentialsr    r!   r"   r#   r$   r%   lib.credentials._authr&   r'   lib.credentials._constantsr(   r8   r?   rH   rO   rX   	resourcesrY   rZ   r[   r\   r   r]   r^   resources.beta.betar_   r`   r   ra   rb   resources.messages.messagesrc   rd   __all__r6   r7   r   re  r   ri  r  r  r/   r3   r1   <module>r     s    # 	 . . ,  % 	 	 	 
 % ! D '   K7	?G  >>54DD	OE OEdKE^ KE\6 6>; ;>< <>A A> 
r3   