
    n                        S r SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJr  Sr\	R                  \	R                   " \	R"                  R$                  5       " S S	\R&                  5      5       5       r\	R                  \	R                   " \	R"                  R(                  5       " S
 S\R&                  5      5       5       rg)z;Lists supported model servers for GKE Inference Quickstart.    )
exceptions)util)base)commands)logzt
To list all supported model servers for a model, run:

$ {command} --model=deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
c                   4    \ rS rSrSr\S 5       rS rS rSr	g)List!   zzList supported model servers for a given model.

To get supported models, run `gcloud container ai profiles models
list`.
c                 &    U R                  SSSS9  g Nz--modelTz
The model.)requiredhelpadd_argumentparsers    7lib/surface/container/ai/profiles/model_servers/list.pyArgs	List.Args*       
      c                    [         R                  " [        R                  R                  5      n[         R
                  " [        R                  R                  5      n UR                  UR                  S9nUR                  R                  U5      nUR                  (       a  UR                  $ / $ ! [        R                   a*  n[        R                  " U[         R                  5      eS nAff = f)N)model)r   GetClientInstancer   ReleaseTrackGAGetMessagesModule&GkerecommenderModelServersFetchRequestr   modelServersFetchapitools_exceptions	HttpErrorapi_lib_exceptionsHttpExceptionHTTP_ERROR_FORMAT)selfargsclientmessagesrequestresponseerrors          r   RunList.Run2   s    ##D$5$5$8$89F%%d&7&7&:&:;H
L??

 @ g $$**73h			$$$	(( L,,UD4J4JKKLs   AB1 /B1 1C/%C**C/c                     U(       aI  [         R                  R                  S5        U H#  n[         R                  R                  SU5        M%     g [         R                  R                  S5        g NzSupported model servers:z- z!No supported model servers found.r   outPrintr&   _	resourcesmodel_server_names       r   DisplayList.DisplayB   G    	ggmm./(
d-.  ) 
ggmm78r    N
__name__
__module____qualname____firstlineno____doc__staticmethodr   r-   r8   __static_attributes__r;   r   r   r	   r	   !   s&      L 9r   r	   c                   4    \ rS rSrSr\S 5       rS rS rSr	g)	ListAlphaK   a  List supported model servers for a given model.

To get supported models, run `gcloud alpha container ai profiles models
list` or to get all supported model and server combinations, run `gcloud alpha
container ai profiles model-and-server-combinations
list`.
c                 &    U R                  SSSS9  g r   r   r   s    r   r   ListAlpha.ArgsV   r   r   c                    [         R                  " [        R                  R                  5      n[         R
                  " [        R                  R                  5      n UR                  UR                  S9nUR                  R                  U5      nUR                  (       a  UR                  $ / $ ! [        R                   aG  n[        R                  " SU 35        [        R                  R!                  SU 35        / s S nA$ S nAff = f)N)	modelNamezAn error has occurred: )r   r   r   r   ALPHAr   %GkerecommenderModelServersListRequestr   r   r	   modelServerNamesr   Errorr   r,   statusr3   )r&   r'   r(   r)   r*   r+   es          r   r-   ListAlpha.Run^   s    ##D$5$5$;$;<F%%d&7&7&=&=>H>>JJ ? g $$))'2h		"	"(((	 	ii)!-.	jj045is%   AB1 /B1 1D<DDDc                     U(       aI  [         R                  R                  S5        U H#  n[         R                  R                  SU5        M%     g [         R                  R                  S5        g r0   r1   r4   s       r   r8   ListAlpha.Displayp   r:   r   r;   Nr<   r;   r   r   rE   rE   K   s%      $9r   rE   N)rA   apitools.base.pyr   r!   %googlecloudsdk.api_lib.ai.recommenderr   googlecloudsdk.api_lib.utilr#   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   googlecloudsdk.corer   _EXAMPLEDefaultUniverseOnlyReleaseTracksr   r   r	   rK   rE   r;   r   r   <module>r]      s    B > 6 H ( 3 * # D%%(()%98== %9 * %9P D%%++,)9 )9 - )9r   