+
    jHàj1 ã                  óx  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI	t
^ RIHtHt ^ RIHtHtHt ^ RIHtHt ^ RIHtHtHt ^ RIHt ]P6                  ! R4      t]! 0 R…m4      tR	]R
&   RRRRRR/R R llt R R lt! ! R R]"]#,          4      t$R†RR/R R lllt%]
PL                  ! 4       t'RRRR/R R llt(R R lt)R R  lt*]PV                  PX                  3R! R" llt-R# R$ lt.R% R& lt/R' R( lt0RR/R) R* llt1RR/R+ R, llt2R- R. lt3]PV                  PX                  3R/ R0 llt4R1 R2 lt5R3 R4 lt6R5 R6 lt7R7RR8R/R9 R: llt8R; R< lt9R8R/R= R> llt:R? R@ lt;RA RB lt<R‡RD RE llt=RF RG lt>RH RI lt?RJ RK lt@RL RM ltARˆRN RO lltBRP RQ ltCRR RS ltDRT RU ltERV RW ltFRX RY ltGRZ R[ ltHR\ R] ltI] ! R^ R_4      4       tJR` Ra ltKRb Rc ltLRd Re ltMRf Rg ltNRh Ri ltORj Rk ltPRl Rm ltQRn Ro ltRR‰Rp Rq lltSRŠRrRRsRRtRCRuRRvRRwRRRRxRRyRRzR/
R{ R| llltTR} R~ ltUR‡R R€ lltVR‹R� R‚ lltWRƒ R„ ltXR# )ŒaZ  Picker provider listing: credential discovery, curated/live model lists, row builders for
list_authenticated_providers / list_picker_providers, and the parallel cache prefetch.

Split out of ``hermes_cli/model_switch.py``; every moved name is re-imported there so
``hermes_cli.model_switch.<name>`` keeps resolving (and monkeypatching) as before.)ÚannotationsN)Ú	dataclassÚfield)ÚAnyÚListÚOptional)Úbuild_command_token_providerÚmaterialize_probe_api_key)Úcustom_provider_aliasesÚcustom_provider_slugÚ	get_label)Úbase_url_host_matcheszhermes_cli.model_switchzfrozenset[str]Ú_UNCAPPED_PICKER_PROVIDERSÚapi_modeÚheadersÚcredential_identityc               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )é   Úapi_urlÚstrÚ	model_idsú	list[str]r   zOptional[str]r   zOptional[dict[str, str]]r   ú
str | NoneÚreturnÚNone© )Úformats   "ÚF/home/ubuntu/.hermes/hermes-agent/hermes_cli/model_switch_providers.pyÚ__annotate__r      s<   € ÷ 'ñ 'Øð'Ø&ð'Ø5Bð'à%ð'àCMð'àY]ñ'ó    c               óX  € ^ RI Hp V '       d	   V'       g   R#  ^ RIHpHp V! 4       pVP                  R4      ;'       g    . p	\        V	\        4      '       g   R# V P                  4       P                  R4      P                  4       p
RpV	 Fì  p\        V\        4      '       g   K  VP                  RR4      ;'       g    VP                  R	R4      P                  4       pVP                  R4      P                  4       V
8w  g   \        V4      V8w  d   K‹  Ve   V! V4      V8w  d   Kž  Ve   \        VR
R4      ^,          V8w  d   K½  \        WÁ4      '       g   KÐ  V Uu/ uF  qî/ bK  	  upVR&   RVR&   RpKî  	  V'       d   W˜R&   V! V4       R# R# u upi   \         d     R# i ; i)uö   Persist a successful ``/v1/models`` probe into the matching ``custom_providers`` entry.

Matches by base_url (slash-normalised), api_mode and headers. A failed config write is
swallowed â€” the picker still shows the live models for this session.)Ú_extra_headers_from_configN)Úload_configÚsave_configÚcustom_providersÚ/FÚbase_urlÚ ÚurlÚkey_envÚapi_key_envÚmodelsTÚmodels_discovered)Úhermes_cli.model_switchr!   Úhermes_cli.configr"   r#   ÚgetÚ
isinstanceÚlistÚstripÚrstripÚlowerÚdictÚ_entry_api_modeÚ_entry_credentialsÚ_discovered_catalog_staleÚ	Exception)r   r   r   r   r   r!   r"   r#   ÚcfgÚ	providersÚnorm_urlÚchangedÚentryÚ	entry_urlÚmodel_ids   &&$$$          r   Ú!_save_discovered_models_to_configrA      sˆ  € õ CßŸ)Ùðß>Ù‹mˆØ—G‘GÐ.Ó/×5Ð5°2ˆ	Ü˜)¤T×*Ò*Ùà—=‘=“?×)Ñ)¨#Ó.×4Ñ4Ó6ˆØˆÛˆEÜ˜e¤T×*Ò*ÙØŸ™ :¨rÓ2×JÐJ°e·i±iÀÀrÓ6J×QÑQÓSˆIØ×Ñ Ó$×*Ñ*Ó,°Ô8¼OÈEÓ<RÐV^Ô<^ÙØÒ"Ñ'AÀ%Ó'HÈGÔ'SÙØ"Ò.Ô3EÀeÈYÐXeÓ3fÐghÕ3ið  nAô  4AÙÜ,¨U×>Ò>ÙÙ<EÓF¹I°¨š|¹IÑFˆE�(‰OØ)-ˆEÐ%Ñ&ØŠGñ ÷  Ø&/Ð"Ñ#Ù˜Öñ ùò	 Gøô ô Úðús=   š&F ÁF ÁA$F ÃB F Å!FÅ,F ÆF ÆF ÆF)Æ(F)c               ó$   € V ^8„  d   QhRRRRRR/# )r   r>   r5   r   r   r   Úboolr   )r   s   "r   r   r   G   s!   € ÷ ñ  Tð °ið ÀDñ r   c                óÞ  € V P                  R4      p\        V\        4      ;'       d    VP                  R4      RJ pV P                  R4      RJ ;'       g    Tp\        V\        4      '       d#   T;'       d    T;'       g    \        V4      V8g  # \        V\        4      '       dF   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       * ;'       d    W!8g  # R# )ul  Whether a live probe may overwrite ``entry["models"]``.

A ``models`` mapping or list of dicts is user-curated per-model metadata â€” never replaced.
A mapping Hermes itself discovered (entry flag or legacy in-mapping sentinel) is ours to
refresh, but only when stale; a legacy-shape entry is always rewritten so the save migrates
it to the clean entry-level flag.r+   Ú__discovered_model_catalog__Tr,   c              3  óB   "  € T F  p\        V\        4      x € K  	  R # 5i©N)r0   r5   )Ú.0Úms   & r   Ú	<genexpr>Ú,_discovered_catalog_stale.<locals>.<genexpr>T   s   é € Ð=±H¨q”z !¤T×*Ð*³Hùs   ‚F)r/   r0   r5   r1   Úany)r>   r   ÚexistingÚlegacy_discoveredÚentry_discovereds   &&   r   r8   r8   G   sÁ   € ð �y‰y˜Ó"€HÜ" 8¬TÓ2×kÐk°x·|±|ÐDbÓ7cÐgkÐ7kÐØ—y‘yÐ!4Ó5¸Ð=×RÐRÐARÐÜ�(œD×!Ò!Ø×VÐVÐ%6×%UÐ%U¼$¸x».ÈIÑ:UÐVÜ�(œD×!Ò!ß“3Ñ=±HÓ=—3—3’3Ñ=±HÓ=Ó=Ô=×WÐWÀ(ÑBWÐWÙr   c                  ó   € ] tR t^XtRtRtR# )Ú_NativePickerModelListzBA successful native catalog, including an authoritative empty one.r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   r   r   rQ   rQ   X   s   † ÝLr   rQ   ÚcacheTc               ó<   € V ^8„  d   QhRRRRRRRRRR	R
RRRRRRR/	# )r   Úapi_keyr   r   r   Únative_catalog_providerÚpreserve_native_modelsrC   r   zdict[str, str] | NoneÚtimeoutÚfloatr   r   rX   r   zlist[str] | Noner   )r   s   "r   r   r   \   sq   € ÷ DDñ DDØðDDØðDDØ9<ðDDØVZðDDà"ðDDà49ðDDð ðDDð ,0ðDDð <LñDDr   c               ób  a aaaaaaaaaa€ ^ RI HpHp	Hp
 ^ RIHpHpHoHp \        S 4      '       d   V	! S SSSSV VVVVVV3R lR7      # V! SS R7      oR V3R llp\        ;QJ d&    R S;'       g    /  4       F  '       g   K   R	M	  R
M! R S;'       g    /  4       4      pS'       d>   S Uu0 uF  pVP                  4       kK  	  upoV! V3R l4       SP                  S4       S '       d   V'       g   V! R 4       RS  2SR&   T! SSS;'       g    RR7      pV'       d   S;'       g    RMSoV'       dC   S'       d   R# R VVVV3R llpV'       d   V	! S SSSSVVR7      MV! 4       pVe   V# V! S4      oV'       d   T	MT
! S SSSSR7      pV'       g	   V'       d   V# R# u upi )zDFetch picker models with native Ollama and cached generic discovery.)Ú_get_ollama_native_headersÚcached_fetch_api_modelsÚfetch_api_models)Ú_OLLAMA_LOCAL_MODELS_CACHE_TTLÚ_normalize_openai_base_urlÚfetch_ollama_local_modelsÚ should_use_ollama_native_catalogc                 ó<   <€ \        \        S 4      SSSSSSR R7      # )F)rX   )Ú_fetch_picker_live_modelsr	   )rZ   r   r   r   r[   r\   r]   s   €€€€€€€r   Ú<lambda>Ú+_fetch_picker_live_models.<locals>.<lambda>m   s$   ø€ Ô!:Ü)¨'Ó2°GÐ=TØ&¨°¸(È%õ"Qr   )r]   r   r   Úfetch_models)rZ   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   Ú/_fetch_picker_live_models.<locals>.__annotate__s   s   € ÷ +ñ +�tñ +r   c                ón   <€ \        S4       F$  pV ! VP                  4       4      '       g   K!  SV K&  	  R # rG   )Útupler4   )ÚpredÚkeyÚcandidate_headerss   & €r   Ú_dropÚ(_fetch_picker_live_models.<locals>._drops   s,   ø€ ÜÐ*Ö+ˆCÙ�C—I‘I“K× Ô Ø% cÒ*ó ,r   c              3  óF   "  € T F  qP                  4       R 8H  x € K  	  R# 5i)ÚauthorizationN©r4   )rH   rr   s   & r   rJ   Ú,_fetch_picker_live_models.<locals>.<genexpr>x   s   é € Ð"]ÉmÀc§9¡9£;°/Ö#AËmùs   ‚!TFc                ó   <€ V S9   # rG   r   )ÚkÚlowereds   &€r   ri   rj   {   s	   ø€ ˜˜Wšr   c                ó   € V R 8H  # )rw   r   )r{   s   &r   ri   rj   ~   s	   € ˜˜_Ò,r   zBearer ÚAuthorizationN)r   c               ó   € V ^8„  d   QhRR/# )r   r   z_NativePickerModelList | Noner   )r   s   "r   r   rn   ˆ   s   € ÷ 	Nñ 	NÐ'Dñ 	Nr   c                 ó<   <€ S! SSSR 7      p V f   R# \        V 4      # ))r]   r   N)rQ   )r+   r   re   Úresolved_headersr]   s    €€€€r   Ú_probe_native_catalogÚ8_fetch_picker_live_models.<locals>._probe_native_catalogˆ   s'   ø€ Ù.¨wÀÐQaÔbˆFØ!š>�4ÐMÔ/EÀfÓ/MÐMr   )r]   r   r   rk   Úttl_seconds)r]   r   r   )Úhermes_cli.modelsr`   ra   rb   Úhermes_cli.models_localrc   rd   re   rf   ÚcallablerL   r4   Úupdate)rZ   r   r[   r\   r   r]   r   rX   r`   ra   rb   rc   rd   rf   rt   Úcaller_has_authorizationrM   Ú
use_nativer‚   Únative_modelsÚgeneric_modelsrs   re   r|   r�   s   fffffff$             @@@@r   rh   rh   \   s­  ÿú€ ÷
 hÑg÷ó ô �×Òá&Ø�W g°wÈ÷Qò QôRð 	Rñ 3°7ÀGÔLÐ÷+ð +÷
  #›sÑ"]ÈgÏmÈmÐY[ÈmÓ"]ŸsŸsšsÑ"]ÈgÏmÈmÐY[ÈmÓ"]Ó]ÐßÙ4;Ó<±G¨�8—>‘>Ö#±GÑ<ˆÙÔ$Ô%Ø× Ñ  Ô)ß×/ÙÑ,Ô-Ø/6°w°iÐ-@Ð˜/Ñ*Ù1Ø Ð2C×2KÐ2KÀtôM€Jç4>Ð(×0Ð0¨DøÀGÐçß!Ù÷	Nó 	N÷" ñ $Ø˜¨'¸7ÈXØ2Ð@^õ`ñ 0Ó1ð	 	ð
 Ò$Ø Ð á,¨WÓ5ˆß16Ñ-Ð<LÐLØ� 'Ð3CÈhôX€Nç+¯zˆ>ÐC¸tÐCùòM =s   Â2F,Úraw_pool_presentFÚ
for_pickerc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úproviderr   r�   rC   rŽ   r   r   )r   s   "r   r   r   ¨   s*   € ÷ ñ ¨ð À4ð Ð]að Ðnrñ r   c               óª   €  ^ RI Hp V! V 4      pVP                  4       '       d   T;'       g    VP                  4       #  V#   \         d     T# i ; i)uú  Whether *provider* has a credential that can be selected now.

Legacy opaque ``auth.json`` pool values that do not deserialize into ``PooledCredential``
stay visible (``raw_pool_present``); a real pool's availability is authoritative â€” an
all-exhausted/dead pool is not authenticated. ``for_picker`` (human-facing pickers) also
accepts a pool whose entries are all in cooldown: a rate-limited provider is not a signed-out
one, and limits are per-model for many providers, so another model may still work.)Ú	load_pool)Úagent.credential_poolr’   Úhas_credentialsÚhas_availabler9   )r�   r�   rŽ   r’   Úpools   &$$  r   Ú_credential_pool_is_usabler—   ¨   sa   € ðÝ3Ù˜Ó"ˆØ×Ñ×!Ò!Ø×5Ð5 ×!3Ñ!3Ó!5Ð5ð "ð Ðøô ô ØØÐðús   ‚#A ¦A ¯A ÁAÁAc               ó   € V ^8„  d   QhRR/# )r   r   zOptional[_threading.Thread]r   )r   s   "r   r   r   º   s   € ÷ ñ Ð$?ñ r   c                 óØ   a€ ^ RI Ho \        P                  4       '       d   R# \        P	                  4        R V3R llp \
        P                  ! V RRR7      pVP                  4        V# )aO  Warm ``provider_models_cache.json`` in a daemon thread by running the picker path once.

The first ``/model`` open (or the first after the 1h TTL) otherwise blocks ~1-2s on serial
live ``/v1/models`` fetches. Fire-and-forget, at most once per process, fully
exception-isolated. Returns the thread (for tests) or None if already warmed.©Úlist_authenticated_providersNc               ó   € V ^8„  d   QhRR/# rm   r   )r   s   "r   r   Ú0prewarm_picker_cache_async.<locals>.__annotate__Å   s   € ÷ Gñ G�4ñ Gr   c            	     ó  <€  ^ RI Hp  V ! 4       pS! VP                  VP                  VP                  VP
                  VP                  VP                  ;'       g    . R7       R#   \         d    \        P                  RRR7        R# i ; i)é    )Úload_picker_context)Úcurrent_providerÚcurrent_base_urlÚcurrent_modelÚuser_providersr$   Úexcluded_providerszpicker cache prewarm failedT©Úexc_infoN)Úhermes_cli.inventoryr    r¡   r¢   r£   r¤   r$   r¥   r9   ÚloggerÚdebug)r    Úctxr›   s     €r   Ú_warmÚ)prewarm_picker_cache_async.<locals>._warmÅ   s}   ø€ ð
	GÝ@Ù%Ó'ˆCá(Ø!$×!5Ñ!5È×H\ÑH\Ø!×/Ñ/À×@RÑ@RØ!$×!5Ñ!5Ø#&×#9Ñ#9×#?Ð#?¸R÷	Aøô
 ô 	GÜ�L‰LÐ6ÀˆL×Fð	Gús   ƒAA& ÁA& Á&"BÂBTzpicker-cache-prewarm)ÚtargetÚdaemonÚname)r-   r›   Ú_picker_prewarm_doneÚis_setÚsetÚ
_threadingÚThreadÚstart)r¬   Útr›   s     @r   Úprewarm_picker_cache_asyncr¸   º   sX   ø€ õ EÜ×"Ñ"×$Ò$ÙÜ×ÑÔ÷Gð Gô 	×Ò ¨tÐ:PÔQ€AØ‡G�G„IØ€Hr   c               ó    € V ^8„  d   QhRRRR/# )r   Úprovider_slugsr   r   r   r   )r   s   "r   r   r   ×   s   € ÷ (4ñ (4°yð (4ÀTñ (4r   c                ó  a€ ^ RI HpHpHpHpHo \        P                  ! 4       p. pV! 4       pV  FO  pV! V4      p	V	'       g   K  V! VP                  V	4      V! V	4      VV	R8H  R7       e   K>  VP                  V	4       KQ  	  V'       g   R# ^ RI	p
R V3R llpV
P                  P                  \        ^\        V4      4      RR7      ;_uu_ 4       p\        VP                  W¶4      4       RRR4       R#   + '       g   i     R# ; i)	uI  Fetch the provider catalogs the serial picker loop would block on, in parallel.

Only providers the serial call cannot serve from disk are fetched â€” missing,
fingerprint-mismatched, or hard-expired entries. TTL-expired non-empty rows are served
inside the stale-serve window while revalidating off-thread, and an empty local-ollama
catalog is authoritative inside its own short native TTL, so prefetching either trades a
non-blocking serial read for a parallel fetch the picker waits on. Persistence is
``cached_provider_model_ids``'s own locked write; workers add none of their own.)Ú_credential_fingerprintÚ_disk_serve_tierÚ_load_provider_models_cacheÚ_normalized_cache_slugÚcached_provider_model_idsÚollama)Ú	is_ollamaNc               ó    € V ^8„  d   QhRRRR/# ©r   Úslugr   r   r   r   )r   s   "r   r   Ú8_prefetch_provider_models_parallel.<locals>.__annotate__ö   s   € ÷ ñ ˜ð  ñ r   c                óB   <€  S! V R R7       R#   \          d     R# i ; i)T)Úforce_refreshN)r9   )rÅ   rÀ   s   &€r   Ú
_fetch_oneÚ6_prefetch_provider_models_parallel.<locals>._fetch_oneö   s$   ø€ ð	Ù% d¸$×?øÜô 	Úð	ús   ƒ
 ��zmodel-cache-prefetch)Úmax_workersÚthread_name_prefix)r…   r¼   r½   r¾   r¿   rÀ   Útimer/   ÚappendÚconcurrent.futuresÚfuturesÚThreadPoolExecutorÚminÚlenr1   Úmap)rº   r¼   r½   r¾   r¿   ÚnowÚstale_slugsrX   rÅ   rr   Ú
concurrentrÉ   ÚexecutorrÀ   s   &            @r   Ú"_prefetch_provider_models_parallelrÙ   ×   sí   ø€ ÷;õ ;ô �)Š)‹+€Cð  €KÙ'Ó)€EÛˆÙ$ TÓ*ˆß‰3Ñ# E§I¡I¨c£NÑ4KÈCÓ4PÐRUØ.1°X©oô?ØBFôGà×Ñ˜sÖ#ñ	 ÷ Ùã÷ð ð 
×	Ñ	×	.Ñ	.Ü˜œ3˜{Ó+Ó,ÐAWð 
/÷ 
ô 
à	ÜˆX�\‰\˜*Ó2Ô3÷
÷ 
÷ 
ò 
ús   ÃC7Ã7D	c               ó   € V ^8„  d   QhRR/# ©r   r   rC   r   )r   s   "r   r   r     s   € ÷ 0ñ 0°4ñ 0r   c                óx   a€ \         ;QJ d    V3R  lV  4       F  '       g   K   R# 	  R# ! V3R  lV  4       4      # )c              3  ó4   <"  € T F  pS! V4      x € K  	  R # 5irG   r   )rH   ÚevÚread_envs   & €r   rJ   Ú_any_env.<locals>.<genexpr>  s   øé € Ð/¡h ‰x˜�|ˆ|£hùó   ƒTF©rL   )Úenv_varsrß   s   &fr   Ú_any_envrä     s,   ø€ ß‹3Ô/¡hÓ/�3Œ3Ð/Š3Ð/ˆ3Ô/¡hÓ/Ó/Ð/r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úseenr³   ÚexcludedÚkeysr   r   rC   r   )r   s   "r   r   r     s.   € ÷ Rñ R�ð R˜sð R¨3ð R°4ñ Rr   c                óD  a a€ V Uu. uF  q3P                  4       NK  	  pp\        ;QJ d    V 3R lV 4       F  '       g   K   RM	  RM! V 3R lV 4       4      ;'       g;    \        ;QJ d    V3R lV 4       F  '       g   K   R# 	  R# ! V3R lV 4       4      # u upi )zDTrue when any of *keys* (lowercased) is already emitted or excluded.c              3  ó,   <"  € T F	  qS9   x € K  	  R # 5irG   r   )rH   r{   ræ   s   & €r   rJ   Ú_skip.<locals>.<genexpr>	  s   øé € Ð*¡'˜Q�DŽy£'ùó   ƒTFc              3  ó,   <"  € T F	  qS9   x € K  	  R # 5irG   r   )rH   r{   rç   s   & €r   rJ   rë   	  s   øé € Ð1QÉÀA°x¶-Ëùrì   )r4   rL   )ræ   rç   rè   r{   r|   s   ff*  r   Ú_skiprî     sl   ù€ á"&Ó'¡$˜Q�w‰wŽy¡$€GÐ'ß‹3Ô*¡'Ó*�3�3Š3Ô*¡'Ó*Ó*×QÐQ¯c«cÔ1QÉÓ1Q¯c¬cÐQªcÐQ¨cÔ1QÉÓ1QÓ.QÐQùò (s   ‡Bc               ó$   € V ^8„  d   QhRRRRRR/# )r   Úmodels_dev_datar5   rç   r³   ræ   r   )r   s   "r   r   r     s!   € ÷ "8ñ "8¨dð "8¸cð "8Èñ "8r   c              #  óB  "  € ^ RI Hp ^ RIHpHp ^ RIHp ^ RIHp VP                  4        EFY  w  r‰VP                  V4      p
V
'       d   W¨8w  d	   W¦9   d   K-   ^ RIHp V! V4      pVe   VP                  V8w  d   KS  TP                  4       T9   d   Kj  TP                  4       T9   g   T	P                  4       T9   d   K–  T P                  T	4      p\!        T\"        4      '       g   K¿  TP                  T4      pT'       d   TP$                  R8w  g   T! T4      '       g   Kù  T'       d(   TP&                  '       d   \)        TP&                  4      MTP                  R. 4      p\!        T\(        4      '       g   EKS  Y‰Yï3x € EK\  	  R#   \         d     ELi ; i5i)	a£  Yield ``(hermes_id, mdev_id, pconfig, env_vars)`` for section-1 rows.

Skips vendor names that alias through an aggregator (bare "openai" -> "openrouter" would
silently switch a user onto an endpoint they may have no key for), aliases of another canonical
profile ("kimi" -> "kimi-coding"), non-api_key auth types (section 2 handles them) and
unroutable providers. PROVIDER_REGISTRY env var names win over models.dev's.©ÚPROVIDER_TO_MODELS_DEV)ÚPROVIDER_REGISTRYÚis_runtime_provider_routable)Ú_AGGREGATOR_PROVIDERS)ÚALIASES)Úget_provider_profileNrZ   Úenv)Úagent.models_devró   Úhermes_cli.authrô   rõ   r…   rö   Úhermes_cli.providersr÷   Úitemsr/   r;   rø   r°   r9   r4   r0   r5   Ú	auth_typeÚapi_key_env_varsr1   )rð   rç   ræ   ró   rô   rõ   rö   r÷   Ú	hermes_idÚmdev_idÚalias_targetrø   ÚprofÚpdataÚpconfigrã   s   &&&             r   Ú_iter_builtin_candidatesr    sI  é € õ 8ßOÝ7Ý,Ø4×:Ñ:×<Ñˆ	Ø—{‘{ 9Ó-ˆß˜LÔ5¸,Ô:_Ùð	Ý6Ù'¨	Ó2ˆDØÒ D§I¡I°Ô$:Ùð �?‰?Ó Ô$ÙØ�?‰?Ó Ô(¨G¯M©M«O¸xÔ,GÙØ×#Ñ# GÓ,ˆÜ˜%¤×&Ò&ÙØ#×'Ñ'¨	Ó2ˆß˜×)Ñ)¨YÔ6Ñ?[Ð\e×?fÒ?fÙß5<À×AY×AYÐAY”4˜×0Ñ0Ô1Ð_d×_hÑ_hÐinÐprÓ_sˆÜ�h¤×%Õ%Ø gÐ7Õ7ó/ =øô ô 	Úð	üsI   ‚AFÁ#FÁ>BFÄFÄ$	FÄ.FÅ :FÆ FÆFÆFÆFÆFc               ó    € V ^8„  d   QhRRRR/# )r   rè   r   r   rC   r   )r   s   "r   r   r   1  s   € ÷ 	ñ 	 Cð 	¨Dñ 	r   c                 óp  a€  ^ RI Hp V! 4       pVP                  R/ 4      o\        T;'       dC    \        ;QJ d'    V3R lV  4       F  '       g   K   R4      # 	  R4      # ! V3R lV  4       4      4      #   \
         d4   p\        P                  RT '       d
   T ^ ,          MRT4        Rp?R# Rp?ii ; i)	zFTrue when ``auth.json`` has a ``providers`` entry under any of *keys*.©Ú_load_auth_storer;   c              3  ó,   <"  € T F	  qS9   x € K  	  R # 5irG   r   )rH   r{   Úproviders_stores   & €r   rJ   Ú+_auth_store_has_provider.<locals>.<genexpr>7  s   øé € Ð!EÁ¸1 Ö"6Ãùrì   TFz"Auth store check failed for %s: %sr'   N)rû   r
  r/   rC   rL   r9   r©   rª   )rè   r
  ÚstoreÚexcr  s   *   @r   Ú_auth_store_has_providerr  1  s�   ø€ ðÝ4Ù Ó"ˆØŸ)™) K°Ó4ˆÜ�E×EÐEŸc›cÔ!EÁÓ!EŸcœcÓFÐFšcÓFÐF˜cÔ!EÁÓ!EÓEÓFÐFøÜô Ü�‰Ð9Çd¸4À¾7ÐPRÐTWÔXÝûðús3   ƒ,A7 °A7 ¼A7 ÁA7 ÁA7 Á"A7 Á7B5Â(B0Â0B5c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   rŽ   rC   r   r   )r   s   "r   r   r   =  s!   € ÷ 	ñ 	 ð 	°Dð 	ÀTñ 	r   c               óÀ   €  ^ RI Hp V! 4       pV'       d6   VP                  R/ 4      P                  V 4      '       d   \        V RVR7      # R#   \         d     R# i ; i)zMSection-1 pool check: only consult the pool when auth.json lists a raw entry.r	  Úcredential_poolT)r�   rŽ   F)rû   r
  r/   r—   r9   )r   rŽ   r
  r  s   &$  r   Ú_raw_pool_usabler  =  s]   € ðÝ4Ù Ó"ˆß�U—Y‘YÐ0°"Ó5×9Ñ9¸)×DÒDÜ-¨iÈ$Ð[eÔfÐfñ øô ô ØÙðús   ‚A —&A ¾A ÁAÁAc               ó$   € V ^8„  d   QhRRRRRR/# )r   rÅ   r   rŽ   rC   r   r   )r   s   "r   r   r   I  s!   € ÷ ñ �sð ¨4ð ¸Dñ r   c               óz   €  \        WR 7      #   \         d"   p\        P                  RY4        Rp?R# Rp?ii ; i)©rŽ   ú'Credential pool check failed for %s: %sNF)r—   r9   r©   rª   )rÅ   rŽ   r  s   &$ r   Ú_pool_usabler  I  s4   € ðÜ)¨$ÔFÐFøÜô Ü�‰Ð>ÀÔJÝûðús   ‚ Ž:™5µ:c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úpidr   Úhermes_slugr   rC   r   )r   s   "r   r   r   Q  s!   € ÷ ñ  ð °#ð ÈTñ r   c                ó  € ^ RI Hp RpVP                  R8X  d    ^ RIHp V! 4       pM(VP                  '       d   \        VP                  V4      pV'       gj   VP                  R8X  dY   W3 FQ  pVP                  V4      p	V	'       g   K  V	P                  '       g   K2  \        V	P                  V4      '       g   KP   R# 	  V'       g   VR	8X  d   \        V4      pV#   \
         d!   p\        P                  RT4        Rp?L³Rp?ii ; i)
a  Section-2 env/SDK credential check shared by the picker and the prefetch scan.

Vertex authenticates via OAuth2 (service-account JSON / ADC), not an API key, so it gets its
own probe; otherwise the provider is hidden from the picker even when fully configured.©rô   FÚvertex)Úhas_vertex_credentialsz"Vertex credential check failed: %sNrZ   Túazure-foundry)rû   rô   rþ   Úagent.vertex_adapterr   r9   r©   rª   Úextra_env_varsrä   r/   rÿ   Ú_azure_entra_configured)
r  r  Úoverlayrß   rô   Ú	has_credsr   r  rr   Úpcfgs
   &&&&      r   Ú_overlay_has_env_credsr(  Q  sà   € õ
 2Ø€IØ×Ñ˜HÔ$ð	DÝCÙ.Ó0‰Ið 
×	×	Ð	Ü˜W×3Ñ3°XÓ>ˆ	ß˜×*Ñ*¨iÔ7ØÓ%ˆCØ$×(Ñ(¨Ó-ˆDß‰t˜×-×-Ò-´(¸4×;PÑ;PÐRZ×2[Ô2[Úñ &÷ ˜¨Ô7Ü+¨HÓ5ˆ	ØÐøô ô 	DÜ�L‰LÐ=¸s×CÑCûð	Dús   ›C ÃD	Ã)DÄD	c               ó   € V ^8„  d   QhRR/# rÛ   r   )r   s   "r   r   r   j  s   € ÷ 	dñ 	d¸ñ 	dr   c                óÊ  € ^ RI Hp V! 4       p\        VP                  R4      ;'       g    R4      P	                  4       P                  4       R8w  gF   \        VP                  R4      ;'       g    R4      P	                  4       P                  4       R8w  d   R# \        \        VP                  R4      ;'       g    R4      P	                  4       ;'       g	    V ! R	4      4      # )
a  Azure Foundry under ``model.auth_mode: entra_id`` mints a per-request bearer, so no
``AZURE_FOUNDRY_API_KEY`` ever exists; the row is configured once the runtime resolver's own
inputs are (provider + auth_mode + an endpoint). No token is minted here (#27989).)Ú_get_model_config_dictr�   r'   r!  Ú	auth_modeÚentra_idFr&   ÚAZURE_FOUNDRY_BASE_URL)r…   r+  r   r/   r2   r4   rC   )rß   r+  Ú	model_cfgs   &  r   r$  r$  j  sª   € õ 9Ù&Ó(€IÜˆI�M‰M˜*Ó%×+Ð+¨Ó,×2Ñ2Ó4×:Ñ:Ó<ÀÔOÜ�9—=‘= Ó-×3Ð3°Ó4×:Ñ:Ó<×BÑBÓDÈ
ÔRÙÜ”�I—M‘M *Ó-×3Ð3°Ó4×:Ñ:Ó<×bÐbÁÐIaÓ@bÓcÐcr   c               ó   € V ^8„  d   QhRR/# rÛ   r   )r   s   "r   r   r   v  s   € ÷ Sñ S $ñ Sr   c                 óä   a € R R lo S ! R4      ;'       g[    S ! R4      ;'       d    S ! R4      ;'       g;    \         ;QJ d    V 3R lR	 4       F  '       g   K   R# 	  R# ! V 3R lR	 4       4      # )
zñTrue when explicit AWS auth config is present in the environment.

Deliberately avoids botocore's full credential chain: picker discovery runs for non-Bedrock
providers too, and botocore may probe EC2 IMDS (169.254.169.254) before giving up.c               ó    € V ^8„  d   QhRRRR/# )r   r°   r   r   rC   r   )r   s   "r   r   Ú._has_fast_aws_sdk_signal.<locals>.__annotate__{  s   € ÷ 6ñ 6�3ð 6˜4ñ 6r   c                óp   € \        \        P                  P                  V R 4      P	                  4       4      # ©r'   )rC   ÚosÚenvironr/   r2   ©r°   s   &r   Ú_setÚ&_has_fast_aws_sdk_signal.<locals>._set{  s%   € Ü”B—J‘J—N‘N 4¨Ó,×2Ñ2Ó4Ó5Ð5r   ÚAWS_BEARER_TOKEN_BEDROCKÚAWS_ACCESS_KEY_IDÚAWS_SECRET_ACCESS_KEYc              3  ó4   <"  € T F  pS! V4      x € K  	  R # 5irG   r   )rH   r°   r9  s   & €r   rJ   Ú+_has_fast_aws_sdk_signal.<locals>.<genexpr>€  s"   øé € ð Rñ 'Q˜d‰t�D�zˆzó 'Qùrá   TF)ÚAWS_PROFILEÚ&AWS_CONTAINER_CREDENTIALS_RELATIVE_URIÚ"AWS_CONTAINER_CREDENTIALS_FULL_URIÚAWS_WEB_IDENTITY_TOKEN_FILErâ   )r9  s   @r   Ú_has_fast_aws_sdk_signalrD  v  s‘   ø€ õ
6ñ 	Ð'Ó(÷ 	Rð 	RÙÐ$Ó%×GÐG©$Ð/FÓ*G÷	Rð 	Rç‹3ô Rñ 'Qó R�3Œ3ðSò ðSð ô Rñ 'Qó Ró RðSr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rÅ   r   r¡   r   rC   r   )r   s   "r   r   r   …  s!   € ÷ 
ñ 
¨ð 
Àð 
Èñ 
r   c                óF  € \        4       '       d   R# \        T ;'       g    R4      P                  4       P                  4       \        T;'       g    R4      P                  4       P                  4       8w  d   R#  ^ RIHp \        V! 4       4      #   \         d     R# i ; i)z\AWS SDK credential check; the full boto3 chain is only consulted for the *current* provider.Tr'   F)Úhas_aws_credentials)rD  r   r2   r4   Úagent.bedrock_adapterrG  rC   r9   )rÅ   r¡   rG  s   && r   Ú_has_aws_sdk_creds_for_listingrI  …  s~   € ä×!Ò!ÙÜ
ˆ4�:ˆ:�2ƒ×ÑÓ×$Ñ$Ó&¬#Ð.>×.DÐ.DÀ"Ó*E×*KÑ*KÓ*M×*SÑ*SÓ*UÔUÙðÝ=ÜÑ'Ó)Ó*Ð*øÜô Úðús   Á;B ÂB ÂB c               ó   € V ^8„  d   QhRR/# rÛ   r   )r   s   "r   r   r   ’  s   € ÷ Lñ L˜Dñ Lr   c                óH   € \        V 4      ;'       d    \        V R R4      R8H  # )rþ   r'   Úaws_sdk)rC   Úgetattr)r  s   &r   Ú_is_aws_sdkrN  ’  s"   € Ü�‹=×KÐKœW W¨k¸2Ó>À)ÑKÐKr   Úmerge_models_devÚnon_blockingc               ó0   € V ^8„  d   QhRRRRRRRRRRR	R
/# )r   rÅ   r   Úcuratedr5   Úfallback_keysrO  rC   rP  r   r1   r   )r   s   "r   r   r   –  s9   € ÷ 0ñ 0˜sð 0¨Tð 0À3ð 0ÐZ^ð 0Ø'+ð0Ø8<ñ0r   c               ó¬   € ^ RI HpHpHp ^ RIHp V! WR7      p	V	'       g-   \        Y;'       g    V 34      p	V'       d   W9   d	   V! W	4      p	V! V	4      # )ud  ``cached_provider_model_ids`` (the SAME disk-cached list ``hermes model`` builds), falling
back to the curated list (merged with models.dev for preferred providers) when live is empty.
``non_blocking`` (GUI read path) reads the disk cache only â€” a provider that is slow or down
contributes its curated list instead of stalling the whole picker (#114215).)Ú_MODELS_DEV_PREFERREDÚ_merge_with_models_devrÀ   )Úwithout_generation_models©rP  )r…   rU  rV  rÀ   Úhermes_cli.chat_catalogrW  Ú_first_curated)
rÅ   rR  rO  rP  rS  rU  rV  rÀ   rW  r   s
   &&$$*     r   Ú_live_or_curated_idsr[  –  sL   € ÷ kÑjÝAá)¨$ÔJ€IßÜ" 7×,DÐ,D¸d¸WÓEˆ	ß Ô =Ù.¨tÓ?ˆIÙ$ YÓ/Ð/r   c               ó    € V ^8„  d   QhRRRR/# )r   rR  r5   r   r1   r   )r   s   "r   r   r   §  s   € ÷ ñ ˜Dð ¨4ñ r   c                óV   € . pV F   pV P                  V. 4      pV'       g   K   V# 	  V# )z[First non-empty curated list under *keys*; the last key's (possibly empty) value otherwise.©r/   )rR  rè   r   rr   s   &&  r   rZ  rZ  §  s7   € à€IÛˆØ—K‘K  RÓ(ˆ	ß‰9ØØÐñ	 ð Ðr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   rÅ   r   rR  r5   rS  rP  rC   r   r1   r   )r   s   "r   r   r   ±  s8   € ÷ Gñ G 3ð G°ð GÀsð GØ+/ðGØ<@ñGr   c               óœ   €  \        W.VO5RRRV/ ;'       g    . #   \         d$    \        Y;'       g    T 34      ;'       g    . u # i ; i)z�Bedrock: live discovery reflects the active region (eu.*, ap.*) rather than the static
us.* list; any failure falls back to the curated list.rO  FrP  )r[  r9   rZ  )rÅ   rR  rP  rS  s   &&$*r   Ú_aws_live_or_curated_idsra  ±  sl   € ðGÜ# Dð ?°Mò ?ÐTYð ?Ø1=ñ?÷ Eð EØBDð	Eøäô GÜ˜g×'?Ð'?¸¸Ó@×FÐFÀBÒFðGús   ‚ š �A¶AÁAÁ
Ac               ó$   € V ^8„  d   QhRRRRRR/# )r   rR  r5   Úforce_fresh_nous_tierrC   r   r1   r   )r   s   "r   r   r   ¼  s!   € ÷ .ñ . Dð .Àð .È$ñ .r   c                óz  € V P                  R. 4      p ^ RIHp ^ RIHpHpHpHp ^ RIH	p V! RRR7      ;'       g    / p	 V! R4      ;'       g    / P                  RR4      ;'       g    Rp
V! VR	7      '       d   V! W)V
4      w  r+MV! W)V
4      w  r+V! W)4      p  ^ R
IHpHp V! W,! 4       RR7      p ^ RIHpHp V! RR7      pVe   V! VVP$                  4      pV#   \         d    Rp
 L�i ; i  \         d     Lci ; i  \         d    \        P                  RRR7        Lsi ; i  \         d     T# i ; i)aD  Nous serves a huge live catalog; the picker shows ONLY the curated agentic list, augmented
with the Portal's free/paid recommendations and paid-tier sale models, then narrowed by org
policy. Mirrors ``_model_flow_nous`` so GUI pickers match the CLI. A failed
recommendation fetch still yields a policy-filtered curated list.Únous)Úget_pricing_for_provider)Úcheck_nous_free_tierÚunion_with_nous_on_sale_modelsÚ&union_with_portal_free_recommendationsÚ&union_with_portal_paid_recommendations)Úget_provider_auth_stateT)Úcached_onlyÚportal_base_urlr'   )Úforce_fresh)Únous_policy_allowed_idsÚrestrict_to_nous_policy)Úrescue_emptyzNous model policy filter failedr¦   )Úfeatured_firstÚnous_picker_usage©Úany_age)r/   Úhermes_cli.models_pricingrf  r…   rg  rh  ri  rj  rû   rk  r9   ro  rp  r©   rª   Úhermes_cli.model_picker_usagerr  rs  Úfeatured_model_ids)rR  rc  r   rf  rg  rh  ri  rj  rk  ÚpricingÚportalÚ_ro  rp  rr  rs  Úusages   &&               r   Ú_nous_picker_model_idsr}  ¼  s^  € ð
 —‘˜F BÓ'€IðÝF÷	
ó 	
õ 	<ñ
 +¨6¸tÔD×JÐJÈˆð	Ù-¨fÓ5×;Ð;¸×@Ñ@ÐARÐTVÓW×]Ð]Ð[]ˆFñ  Ð,A×BÓBÙAÀ)ÐV\Ó]‰LˆI�qáAÀ)ÐV\Ó]‰LˆIÙ6°yÓJ‰IðGß^Ù+¨IÐ7NÓ7PÐ_cÔdˆ	ð	÷ 	TÙ!¨$Ô/ˆØÒÙ& y°%×2JÑ2JÓKˆIð Ðøô1 ô 	ØŠFð	ûô ô Ùðûô
 ô GÜ�‰Ð6ÀˆÖFðGûô ô ØØÐðúsv   ”(C2 ½C2 ÁC ÁC Á*C Á-C2 Á<C2 ÂC2 ÂD Â5(D+ ÃC/Ã,C2 Ã.C/Ã/C2 Ã2D Ã?D Ä"D(Ä'D(Ä+D:Ä9D:c               ó    € V ^8„  d   QhRRRR/# )r   Úrowr5   r   údict | Noner   )r   s   "r   r   r   í  s   € ÷ ñ ˜Tð  kñ r   c                ó
  € ^ RI Hp VP                  4       '       g   V # VP                  4       '       g   R# VP	                  4       '       g   V # \        V 4      pVP                  VR&   VP                  .VR&   ^VR&   RVR&   V# )uV  The one free-tier rule for a Nous picker row, shared by every row builder.

``row`` carries at least ``name`` and ``models``. A guest identity carrying inference turns
it into "Nous Â· free tier" with the single model ``nous/welcome`` (the welcome host serves
nothing else). A guest that ``nous.guest: false`` has switched off yields ``None``: no Nous
row at all, since there is nothing selectable. A real account (or no Nous state) passes the
row through untouched. Builders that compute the full catalog lazily should pass
``models=[]`` and only compute when the returned row still has no models.)Ú	anon_authNr°   r+   Útotal_modelsTÚfree_tier_row)Ú
hermes_clir‚  Ú	has_guestÚguest_allowedÚfree_inference_activer5   ÚFREE_TIER_LABELÚGUEST_MODEL)r  r‚  Úouts   &  r   Ú_free_tier_nous_rowrŒ  í  s†   € õ %Ø×Ñ× Ò Øˆ
Ø×"Ñ"×$Ò$ÙØ×*Ñ*×,Ò,Øˆ
Ü
ˆs‹)€CØ×+Ñ+€Cˆ�KØ×*Ñ*Ð+€Cˆ�MØ€CˆÑð  €CˆÑØ€Jr   r'   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   r   r1   Ú
max_modelsú
int | NonerÅ   r   r   r   )r   s   "r   r   r     s(   € ÷ "ñ "˜4ð "¨Zð "¸sð "ÈDñ "r   c                ó>   € Ve   V'       d   V\         9   d   V # V RV # )zvApply ``max_models``; rows in ``_UNCAPPED_PICKER_PROVIDERS`` show everything (``0`` still
means slug-only: no models).N)r   )r   rŽ  rÅ   s   &&&r   Ú_cap_modelsr‘    s'   € ð ÒŸj¨TÔ5OÔ-OØÐØ�[�jÐ!Ð!r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úgrpr5   r>   Úactive_modelr   r   r   r   )r   s   "r   r   r     s(   € ÷ (ñ (˜dð (¨4ð (¸sð (Àtñ (r   c                óì   € ^ RI HpHpHp \	        V R,          V.4       VP                  R4      pV! Wd! V4      4      '       d   RV R&   \	        V R,          V! V4      4       \        V R,          4       R# )a6  Fold one config entry's models into its group: the active selection first, then the declared
``models:`` ids. The active selection alone never suppresses discovery, and a dict-shaped
``models:`` is metadata rather than an allowlist (see ``_models_config_is_allowlist``), so only
list/string shapes pin the row.)Ú_declared_model_idsÚ_entry_models_discoveredÚ_models_config_is_allowlistr+   TÚhas_explicit_modelsN)r-   r–  r—  r˜  Ú_extend_uniquer/   Ú_split_chain_entries)r“  r>   r”  r–  r—  r˜  Úmodels_fields   &&&    r   Ú_absorb_entry_modelsr�    sg   € ÷
 sÑrÜ�3�x•= < .Ô1Ø—9‘9˜XÓ&€LÙ" <Ð1IÈ%Ó1P×QÒQØ%)ˆÐ!Ñ"Ü�3�x•=Ñ"5°lÓ"CÔDÜ˜˜X�Ö'r   c               ó    € V ^8„  d   QhRRRR/# )r   r+   r1   r   r   r   )r   s   "r   r   r     s   € ÷ Pñ P ð P¨$ñ Pr   c           	     óä   € \        V 4       F[  p\        V\        4      '       g   K  RV9   g   K$  \        YP	                  R4       Uu. uF  q"P                  4       NK  	  up4       K]  	  R# u upi )u  Split comma-separated fallback chains (``default_model: a,b,c`` â€” e.g. the volcengine
agent plans) into individually selectable ids. The raw chain stays first so the server-side
fallback behaviour itself remains the default pick; the split ids follow it. Fixes #50557.Ú,N)r1   r0   r   rš  Úsplitr2   )r+   ÚmodelÚparts   &  r   r›  r›    sN   € ô �f–ˆÜ�eœS×!Ô! c¨U¦lÜ˜6¿[¹[ÈÔ=MÓ#NÑ=M°T§J¡J¦LÑ=MÑ#NÖOó ùâ#Ns   ÁA-c               ó    € V ^8„  d   QhRRRR/# )r   r®   r1   r   r   r   )r   s   "r   r   r   '  s   € ÷  ñ  ˜4ð  ¨4ñ  r   c                ó^   € V F&  pV'       g   K  W 9  g   K  V P                  V4       K(  	  R# )zMAppend each truthy item of *items* not already in *target* (order preserved).N)rÎ   )r®   rý   Úitems   && r   rš  rš  '  s"   € ãˆß‰4�DÖ&Ø�M‰M˜$Öó r   c               ó    € V ^8„  d   QhRRRR/# )r   r(   r   r   r   r   )r   s   "r   r   r   .  s   € ÷ 6ñ 6�3ð 6˜3ñ 6r   c                ó‚   € \        T ;'       g    R 4      P                  4       P                  R4      P                  4       # )r'   r%   )r   r2   r3   r4   )r(   s   &r   Ú	_norm_urlr©  .  s1   € ô
 ˆs�yˆy�b‹>×ÑÓ!×(Ñ(¨Ó-×3Ñ3Ó5Ð5r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r>   r5   rè   rp   r   r   r   )r   s   "r   r   r   6  s&   € ÷ Pñ P˜4ð P uð PÈcñ Pr   c                ó0   a € \        V 3R  lV 4       R4      # )c              3  ó|   <"  € T F1  pSP                  VR 4      '       g   K  SP                  VR 4      x € K3  	  R# 5i)r'   Nr^  )rH   rr   r>   s   & €r   rJ   Ú"_entry_base_url.<locals>.<genexpr>7  s/   øé € ÐJ©t¨°u·y±yÀÀb×7IÔ#�—‘˜3 ×#Ð#«tùs   ƒ<¢<r'   ©Únext)r>   rè   s   f&r   Ú_entry_base_urlr°  6  s   ø€ ÜÔJ©tÓJÈBÓOÐOr   c               ó    € V ^8„  d   QhRRRR/# )r   r>   r5   r   r   r   )r   s   "r   r   r   :  s   € ÷ ^ñ ^˜4ð ^ Jñ ^r   c                óÈ   € \        V P                  R 4      ;'       g    V P                  R4      ;'       g    R4      P                  4       P                  4       ;'       g    R# )r   Ú	transportr'   N)r   r/   r2   r4   )r>   s   &r   r6   r6   :  sJ   € Üˆu�y‰y˜Ó$×DÐD¨¯	©	°+Ó(>×DÐDÀ"ÓE×KÑKÓM×SÑSÓU×]Ð]ÐY]Ð]r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r>   r5   Úkey_env_keysr   r   ztuple[Any, str, str]r   )r   s   "r   r   r   >  s'   € ÷ \ñ \˜dð \°3ð \Ð;Oñ \r   c                óŠ  a € \        \        V 3R lV 4       R4      4      P                  4       p\        S P	                  RR4      S P	                  R4      ;'       g    R4      pVe   W2VP
                  3# \        S P	                  RR4      ;'       g    R4      P                  4       pYBT;'       g    V'       d   RV 23# R3# )z@Unminted credential, env fallback, and stable grouping identity.c              3  óx   <"  € T F/  pSP                  V4      '       g   K  SP                  V4      x € K1  	  R # 5irG   r^  )rH   r{   r>   s   & €r   rJ   Ú%_entry_credentials.<locals>.<genexpr>@  s'   øé € ÐK©l¨¸e¿i¹iÈ¿lœ˜Ÿ	™	 !Ÿ˜«lùs   ƒ:¡:r'   Úkey_cmdr°   ÚcustomrZ   zenv:)r   r¯  r2   r   r/   Úcache_identity)r>   rµ  r)   ÚsourceÚinline_api_keys   f*   r   r7   r7   >  s®   ø€ ä”$ÔK©lÓKÈRÓPÓQ×WÑWÓY€GÜ)¨%¯)©)°I¸rÓ*BÀEÇIÁIÈfÓDU×DaÐDaÐYaÓb€FØÒØ × 5Ñ 5Ð5Ð5Ü˜Ÿ™ 9¨bÓ1×7Ð7°RÓ8×>Ñ>Ó@€NØ N×$[Ð$[Ï7¸¸g¸YÐ7GÐ[Ð[ÐXZÐ[Ð[r   c               ó   € V ^8„  d   QhRR/# )r   r>   r5   r   )r   s   "r   r   r   H  s   € ÷ ñ ˜$ñ r   c                ó|   € V P                  RR4      p\        V\        4      '       d   VP                  4       R9  pV# )zL``discover_models`` (default True); ``"false"/"no"/"0"`` strings mean False.Údiscover_modelsT>   Ú0ÚnoÚfalse)r/   r0   r   r4   )r>   Údiscovers   & r   Ú_discover_flagrÅ  H  s7   € à�y‰yÐ*¨DÓ1€HÜ�(œC× Ò Ø—>‘>Ó#Ð+?Ñ?ˆØ€Or   c               ó    € V ^8„  d   QhRRRR/# )r   r°   r   r   r   )r   s   "r   r   r   P  s   € ÷ ]ñ ]˜#ð ] #ñ ]r   c                ó0   a € \        V 3R lR 4       S 4      # )uM   Text before the per-model separator Hermes's own writer uses ("â€”" / " - ").c              3  ó€   <"  € T F3  qS9   g   K  SP                  V4      ^ ,          P                  4       x € K5  	  R# 5i)rŸ   N)r¡  r2   )rH   Úsepr°   s   & €r   rJ   Ú"_display_prefix.<locals>.<genexpr>R  s2   øé € ÐU±~°ÐPTÉÔ+�—‘˜C“ Õ#×)Ñ)×+Ð+³~ùs   ƒ>�.>)u   â€”z - r®  r8  s   fr   Ú_display_prefixrË  P  s   ø€ äÔU±~ÓUÐW[Ó\Ð\r   c               ó    € V ^8„  d   QhRRRR/# )r   Údisplay_namer   r   r   )r   s   "r   r   r   U  s   € ÷ 	'ñ 	' cð 	'¨cñ 	'r   c                óâ   € \        V 4      pVP                  4       p\        R \        V4       4       R4      pVe*   V^8¼  d#   RP	                  VRV 4      P                  4       pT;'       g    T # )uà   Section-3 row label: strip the per-model suffix and trailing version tokens ("Palantir
Claude 4.7 Opus" -> "Palantir Claude") â€” cut at the first token containing a digit, only when
>= 2 words remain (avoids over-trimming).c              3  óÞ   "  € T Fc  w  r\         ;QJ d+    R  VP                  R4       4       F  '       g   K   RM 	  RM! R  VP                  R4       4       4      '       g   K_  Vx € Ke  	  R# 5i)c              3  ó@   "  € T F  qP                  4       x € K  	  R # 5irG   )Úisdigit)rH   Úcs   & r   rJ   Ú0_group_display_name.<locals>.<genexpr>.<genexpr>[  s   é € Ð7]É_È¿	¹	¿¸Ë_ùó   ‚z.,()TFN)rL   r2   )rH   Úir·   s   &  r   rJ   Ú&_group_display_name.<locals>.<genexpr>[  sC   é € Ð^¡™˜·C³CÑ7]ÈQÏWÉWÐU[Ì_Ó7]·C·C²CÑ7]ÈQÏWÉWÐU[Ì_Ó7]×4]—1’1£ùs   ‚2A-·'A-Á#
A-NÚ )rË  r¡  r¯  Ú	enumerateÚjoinr2   )rÍ  Úgrp_displayÚtoksÚcut_ats   &   r   Ú_group_display_namerÝ  U  sj   € ô " ,Ó/€KØ×ÑÓ€DÜÑ^¤¨4¤Ó^Ð`dÓe€FØÒ˜f¨œkØ—h‘h˜t G V˜}Ó-×3Ñ3Ó5ˆØ×&Ð&˜,Ð&r   c               ó@   € 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   rZ   r   r   r   r[   r™  rC   r   r€  r   r   Ú
probe_liveÚdiscovery_allowedÚfast_custom_prober   ztuple[list | None, bool]r   )r   s   "r   r   r   a  s`   € ÷ )ñ )Øð)Øð)Ø9<ð)ØSWð)àð)à$.ð)à<@ð)àUYð)ð ð)ð !9ñ)r   c          
     óš  € V'       d   RMRp	V'       dc    \        WW#WIVR7      p
\        V
\        4      pV'       d   V'       d   R# V
e+   V
'       g   V'       d	   V'       d   Y«;'       d    V
'       * 3# R# V'       dv    ^ RIHp V! WRW”VR7      pV'       d   \        V\        4      '       d   R# V'       g   \        V\        4      '       d"   T\        V\        4      ;'       d    V'       * 3#  R# R#   \         d     R# i ; i  \        \        \        \        \        \        \        P                  P                  3 d     R# i ; i)u  Return ``(models, native_catalog_empty)`` for a custom endpoint row.

``probe_live`` runs the native-aware picker fetch; otherwise, when discovery is allowed, a
warm same-fingerprint cache entry still serves the full catalog with no round-trip.
``has_explicit_models`` gates the *probe* (a network-cost guard for keyless endpoints that
declare a catalog), never the cache read â€” applying it to the read re-pins the endpoint to
its declared subset. Returns ``(None, False)`` when nothing usable was found.

``fast_custom_probe`` picks the discovery budget (1.5s fast / 5s full) independently of the
caller's exhausted-pool visibility flag: a picker that keeps cooldown providers visible
still deserves the full budget when it is the one surface that live-probes the current
custom endpoint.ç      ø?ç      @)r   r]   r   )ra   T)Ú
cache_onlyr]   r   r   )NF)rh   r0   rQ   r9   r…   ra   ÚImportErrorÚOSErrorÚRuntimeErrorÚTimeoutErrorÚ	TypeErrorÚ
ValueErrorÚhttpÚclientÚHTTPException)rZ   r   r[   r™  r   r   rß  rà  rá  r]   Úlive_modelsÚ	is_nativera   Úcached_modelss   &&&&$$$$$     r   Ú_discover_endpoint_modelsrò  a  s;  € ÷  '‰c¨C€Gßð
	Ü3ØÐ"9Ø¸8ôEˆKô # ;Ô0FÓGˆIß×0Ø"Ð"ØÒ&¯K×?R×V_Ø"×%BÐ%B°{´?ÐCÐCð Ð÷ 
ð
	ÝAÙ3Ø¨T¸7Ð^fôˆM÷ #¤z°-ÔAW×'XÒ'XØ"Ð"ß¤
¨=Ô:P× QÒ QØ$¤j°Ô@VÓ&W×&mÐ&mÐ`mÔ\mÐmÐmð !Rð Ðˆ;Ðøô ô 	Øð Ðð	ûô œW¤l´LÄ)ÌZÔY]×YdÑYd×YrÑYrÐsô 	ØØÐð	úsY   –.C6 ÁC6 ÁC6 ÁC6 ÁC6 Á#C6 Á,C6 Â 1D Â2D Â:-D Ã(D Ã6DÄDÄ>E
Å	E
c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   rð   r5   rR  údict[str, list[str]]rç   r   r   r   )r   s   "r   r   r   �  s,   € ÷ .-ñ .-Øð.-Ø$8ð.-ØDMð.-ØR[ñ.-r   c                óö  aa€ ^ RI Hp ^ RIHp ^ RIHp ^ RIHp ^ RIH	p V Uu0 uF3  qˆ'       g   K  \        V4      P                  4       P                  4       kK5  	  p	p. o\        4       oR VV3R llp
\        W	S4       F2  w  r¼rÞ\        Wã4      '       g   \!        V4      '       g   K*  V
! W»4       K4  	  VP#                  4        UUu/ uF	  w  ppVVbK  	  pppVP#                  4        F‚  w  ppVP%                  VV4      p\'        SV	VV4      '       g   VP(                  R8X  d   K?  \+        VVVV4      '       g&   \-        VV4      '       g   \/        V4      '       g   Kx  V
! VVV4       K„  	  V F×  p\'        SV	VP0                  4      '       d   K"  VP%                  VP0                  4      p\3        T;'       d+    VP4                  ;'       d    \        VP4                  V4      4      pV'       g9   \-        VP0                  4      '       g   \/        VP0                  4      '       g   Kº  V
! VP0                  VP0                  4       KÙ  	  S Uu. uF  pVR	8w  g   K  VNK  	  up# u upi u uppi u upi )
au  Quick-scan which providers have credentials, without fetching model lists.

Mirrors the credential checks of sections 1, 2 and 2b of :func:`list_authenticated_providers`
but never calls ``cached_provider_model_ids``; feeds :func:`_prefetch_provider_models_parallel`.
Env vars are read through the per-profile secret scope. AWS SDK providers are skipped
(heavier detection).©Ú_scoped_key_envrò   r  ©ÚHERMES_OVERLAYS©ÚCANONICAL_PROVIDERSc               ó$   € V ^8„  d   QhRRRRRR/# )r   rÅ   r   rè   r   r   r   )r   s   "r   r   Ú4_collect_authed_provider_slugs.<locals>.__annotate__ž  s!   € ÷ -ñ -�Cð - ð -¨ñ -r   c                óZ   <€ SP                  V 4       SP                  R  V 4       4       R# )c              3  ó@   "  € T F  qP                  4       x € K  	  R # 5irG   rx   )rH   r{   s   & r   rJ   Ú@_collect_authed_provider_slugs.<locals>._emit.<locals>.<genexpr>   s   é € Ð,¡t !—G‘G—I�I£tùrÔ  N)rÎ   rˆ   )rÅ   rè   ræ   Úslugss   &*€€r   Ú_emitÚ-_collect_authed_provider_slugs.<locals>._emitž  s!   ø€ Ø�‰�TÔØ�‰Ñ,¡tÓ,Ö,r   rL  re  )r-   r÷  rú   ró   rû   rô   rü   rù  r…   rû  r   r2   r4   r³   r  rä   r  rý   r/   rî   rþ   r(  r  r  rÅ   rC   rÿ   )rð   rR  rç   r÷  ró   rô   rù  rû  ÚpÚexcluded_setr  r   Ú_mdev_idÚ_pconfigrã   r{   ÚvÚmdev_to_hermesr  r%  r  ÚcpÚ	cp_configr&  Úsræ   r  s   &&&                      @@r   Ú_collect_authed_provider_slugsr  �  s  ù€ õ 8Ý7Ý1Ý4Ý5Ù4<ÓB±H¨qÃÔ*”C˜“F—L‘L“N×(Ñ(Ö*±H€LÐBØ€EÜ“U€D÷-ñ -ô 4LÈOÐkoÖ3pÑ/ˆ	˜XÜ�H×.Ò.Ô2BÀ9×2MÔ2MÙ�)Ö'ñ 4qð (>×'CÑ'CÔ'EÔFÑ'E™t˜q !�a˜’dÑ'E€NÑFØ'×-Ñ-Ö/‰ˆˆWØ$×(Ñ(¨¨cÓ2ˆÜ��| S¨+×6Ò6¸'×:KÑ:KÈyÔ:XÙä" 3¨°W¸o×NÒNÜ'¨¨[×9Ò9¼\È+×=VÔ=VÙ�+˜s KÖ0ñ 0ó "ˆÜ��| R§W¡W×-Ò-ÙØ%×)Ñ)¨"¯'©'Ó2ˆ	ÜØ×nÐn˜)×4Ñ4×nÐn¼À)×B\ÑB\Ð^mÓ9nópˆ	çÔ0°·±×9Ò9¼\È"Ï'É'×=RÔ=RÙ�"—'‘'˜2Ÿ7™7Ö#ñ "ñ Ó,‘u�!  V¡�AˆA‘uÑ,Ð,ùòC Cùó Gùò* -s   ¥	I+³+I+ÃI0É	I6É"I6c                  óÈ  € ] tR tRt$ RtR]R&   R]R&   R]R&   R]R&   R	]R
&   R	]R&   R	]R&   R	]R&   R	]R&   R]R&   R]R&   RtR]R&   RtR	]R&   ]! ]	R7      t
R]R&   ]! ]R7      tR]R&   ]! ]R7      tR]R&   ]! ]R7      tR]R&   ]R R l4       t]R  R! l4       t]R" R# l4       tR$ R% ltR& R' ltR(R)/R* R+ lltR,R-R.R/R/ R0 lltR1 R2 ltR3R)/R4 R5 lltR6 R7 ltR8tR# )9Ú_PickerBuildi¾  ac  State threaded through the ``list_authenticated_providers`` sections: 1 built-ins mapped to
models.dev, 2 Hermes-only overlays, 2b canonical providers missed by 1/2, 3 ``providers:``
entries + 3b the bare active custom endpoint, 4 ``custom_providers:`` entries. Row-builder
imports of ``hermes_cli.auth/models`` stay lazy so tests can patch those modules.r   r¡   r¢   r£   r�  rŽ  rC   rŽ   rc  Úprobe_custom_providersÚprobe_current_custom_providerÚrefreshr³   rç   r5   rR  Núbool | Nonerá  FÚnon_blocking_catalogs)Údefault_factoryr1   ÚresultsÚ
seen_slugsÚbuiltin_endpointsÚsection3_pairsc               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   Ú_PickerBuild.__annotate__Ý  s   € ÷ -ñ - sñ -r   c                	ó6   € V P                   P                  4       # rG   )r¡   r4   ©Úselfs   &r   Úcurrent_provider_normÚ"_PickerBuild.current_provider_normÜ  s   € à×$Ñ$×*Ñ*Ó,Ð,r   c               ó   € V ^8„  d   QhRR/# r  r   )r   s   "r   r   r  á  s   € ÷ 9ñ 9 sñ 9r   c                	óT   € V P                   P                  R 4      P                  4       # )r%   )r¢   r3   r4   r  s   &r   Úcurrent_base_url_normÚ"_PickerBuild.current_base_url_normà  s"   € à×$Ñ$×+Ñ+¨CÓ0×6Ñ6Ó8Ð8r   c               ó   € V ^8„  d   QhRR/# rÛ   r   )r   s   "r   r   r  å  s   € ÷ ]ñ ]¨Dñ ]r   c                óN   € V P                   f   V P                  # V P                   # )zENone defers to for_picker so pre-existing callers keep their timeout.)rá  rŽ   r  s   &r   Úresolved_fast_custom_probeÚ'_PickerBuild.resolved_fast_custom_probeä  s$   € ð #'×"8Ñ"8Ò"@ˆt�‰Ð\Àd×F\ÑF\Ð\r   c               ó    € V ^8„  d   QhRRRR/# )r   Úrow_is_currentrC   r   r   )r   s   "r   r   r  é  s   € ÷ lñ l°$ð l¸4ñ lr   c               	óh   € \        V P                  ;'       g    V P                  ;'       d    T4      # rG   )rC   r  r  )r  r+  s   &$r   Úcan_probe_customÚ_PickerBuild.can_probe_customé  s*   € Ü�D×/Ñ/×jÐj°D×4VÑ4V×4iÐ4iÐ[iÓkÐkr   c               ó    € V ^8„  d   QhRRRR/# rÄ   r   )r   s   "r   r   r  ì  s   € ÷ 
/ñ 
/¨Cð 
/°Dñ 
/r   c                ód  € ^ RI Hp VP                  V4      pV'       g   R# \        VRR4      '       d+   \        P
                  P                  VP                  R4      MRp\        T;'       g    \        VRR4      ;'       g    R4      pV'       d   V P                  P                  V4       R# R# )z°Prefer the live env override (e.g. DASHSCOPE_BASE_URL) over the static inference_base_url
so dedup matches what a user typing that URL into custom_providers would actually hit.r  NÚbase_url_env_varr'   Úinference_base_url)
rû   rô   r/   rM  r6  r7  r1  r©  r  Úadd)r  rÅ   rô   r'  r(   Únormeds   &&    r   Úrecord_builtin_endpointÚ$_PickerBuild.record_builtin_endpointì  sŠ   € õ 	6Ø ×$Ñ$ TÓ*ˆßÙÜ;BÀ4ÐI[Ð]_×;`Ò;`Œb�j‰j�n‰n˜T×2Ñ2°BÔ7ÐfhˆÜ˜3×OÐO¤'¨$Ð0DÀbÓ"I×OÐOÈRÓPˆßØ×"Ñ"×&Ñ& vÖ.ñ r   Úuncapped_okTc               ó4   € V ^8„  d   QhRRRRRRRRRRR	RR
R/# )r   rÅ   r   r°   Ú
is_currentrC   r   r1   r¼  r7  r   r   r   )r   s   "r   r   r  ø  sD   € ÷ +ñ +Øð+Ø"ð+Ø04ð+ØAEð+ØORð+Ødhð+à	ñ+r   c               	óJ  € R TRTRTRRR\        Y@P                  V'       d   TMR4      R\        V4      RV/pVR	8X  d   \        V4      pVe   V P                  P                  V4       V P                  P                  VP                  4       4       V P                  V4       R
# )rÅ   r°   r9  Úis_user_definedFr+   r'   rƒ  r¼  re  N)
r‘  rŽ  rÓ   rŒ  r  rÎ   r  r3  r4   r5  )r  rÅ   r°   r9  r   r¼  r7  r  s   &&&&&&$ r   Úadd_builtin_rowÚ_PickerBuild.add_builtin_rowø  s’   € ð �D˜& $¨°jÐBSÐUZØ”k )¯_©_Çk¹dÐWYÓZØœC 	›N¨H°fð>ˆð �6Œ>ô & cÓ*ˆCØŠ?Ø�L‰L×Ñ Ô$Ø�‰×Ñ˜DŸJ™J›LÔ)Ø×$Ñ$ TÖ*r   r¼  zuser-configÚshownc               ó<   € 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+   r1   r9  rC   Únative_catalog_emptyr¼  r>  úlist | Noner   r   r   )r   s   "r   r   r    sT   € ÷ *ñ *Øð*Ø"ð*Ø-0ð*Ø:>ð*ØLPð*Øhlð*àð*à/:ð*àFJñ*r   c               óÐ   € V P                   P                  RTRTRTRRRVf   TMTR\        V4      R	VR
VRV/	4       V P                  P	                  VP                  4       4       R# )z7Append a user-defined endpoint row (sections 3, 3b, 4).rÅ   r°   r9  r;  Tr+   Nrƒ  r¼  r   r@  )r  rÎ   rÓ   r  r3  r4   )	r  rÅ   r°   r   r+   r9  r@  r¼  r>  s	   &&&&&&&$$r   Úadd_endpoint_rowÚ_PickerBuild.add_endpoint_row  sn   € ð 	�‰×ÑØ�D˜& $¨°jÐBSÐUYØ ¢‘f°5¸.Ì#ÈfË+ÐW_ÐagØ�wÐ 6Ð8LðNô 	Oð 	�‰×Ñ˜DŸJ™J›LÖ)r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r°   r   Úurl_normr   rC   r   )r   s   "r   r   r    s!   € ÷ ñ ¨ð ¸ð Àñ r   c                óÎ   € \        V4      P                  4       P                  4       V3pV^ ,          '       d   V^,          '       g   R# V P                  P	                  V4       R# )zYRemember a (display_name, base_url) pair for section-4 dedup; False when either is blank.FT)r   r2   r4   r  r3  )r  r°   rF  Úpairs   &&& r   Úrecord_section3_pairÚ!_PickerBuild.record_section3_pair  sK   € ä�D“	—‘Ó!×'Ñ'Ó)¨8Ð4ˆØ�Q—”˜D ŸGœGÙØ×Ñ×Ñ Ô%Ùr   Úurl_match_okc          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   rÅ   r   Úaliasesr³   rF  rK  rC   r   r   )r   s   "r   r   r    s8   € ÷ Nñ N¨ð N°cð NÀSð NÐ[_ð NÐkoñ Nr   c               ó@  € \        V4      P                  4       P                  4       V P                  8H  ;'       gd    V P                  V9   ;'       gM    V P                  R8H  ;'       d6    \	        V P
                  4      ;'       d    W0P
                  8H  ;'       d    T# )zQRow is current by slug/alias, or (bare ``custom`` provider) by matching base_url.rº  )r   r2   r4   r   rC   r$  )r  rÅ   rM  rF  rK  s   &&&&$r   Úendpoint_is_currentÚ _PickerBuild.endpoint_is_current  s¢   € ô �‹I�O‰OÓ×#Ñ#Ó%¨×)CÑ)CÑC÷ Mð MØ×)Ñ)¨WÑ4÷Mð Mð ×*Ñ*¨hÑ6÷ Lð L¼4À×@ZÑ@ZÓ;[÷ Lð LØ× :Ñ :Ñ:÷Lð LØ?Kð	Nr   c               ó<   € V ^8„  d   QhRRRRRRRRRR	R
RRRRRRR/	# )r   rZ   r   r   r   Únative_providerr™  rC   r   r€  r   r   rà  r9  r   ztuple[list | None, bool, bool]r   )r   s   "r   r   r  #  sV   € ÷ <ñ <Øð<Ø%(ð<Ø;>ð<ØUYð<àð<à(2ð<àGKð<àY]ð<ð 
(ñ<r   c               ó¾   € T;'       d5    \        V4      ;'       g    V'       * ;'       d    V P                  VR7      p	\        WW4WVV	WpP                  R7	      w  r«W«V	3# )al  Probe policy shared by sections 3 and 4 (returns ``(models, native_empty, probed)``):
with an api_key live /models is the source of truth (replaces the partial ``models:``
subset); without one, an allowlist-shaped ``models:`` narrows a public endpoint and skips
the probe. A dict-shaped ``models:`` is metadata, so still probe; pin with
``discover_models: false``.)r+  ©r   r   rß  rà  rá  )rC   r-  rò  r(  )r  rZ   r   rR  r™  r   r   rà  r9  rß  Ú
discoveredr@  s   &&&&&$$$$   r   Údiscover_endpointÚ_PickerBuild.discover_endpoint#  sx   € ð ÷ Að A¤4¨£=×#KÐ#KÐ8KÔ4K÷ Að AØ×%Ñ%°ZÐ%Ó@ð 	ô ,EØ˜oØ¸:Ø/×CbÑCbô,dÑ(ˆ
ð °Ð;Ð;r   r   )rR   rS   rT   rU   rV   Ú__annotations__rá  r  r   r1   r  r³   r  r  r  Úpropertyr   r$  r(  r-  r5  r<  rC  rI  rO  rV  rW   r   r   r   r  r  ¾  s%  ‡ ñYð ÓØÓØÓØÓØÓØÓØ Ó Ø#'Ó'ØƒMØƒMØƒMð &*Ð�{Ó)à"'Ð˜4Ó'Ù¨$Ô/€GˆTÓ/Ù¨CÔ0€J�Ó0á"°3Ô7Ð�sÓ7á°Ô4€N�CÓ4àô-ó ð-ð ô9ó ð9ð ô]ó ð]õlõ
/ð+Øko÷+ð *à&ð*à=A÷*õðNÐbf÷ N÷<ñ <r   r  c               ó$   € V ^8„  d   QhRRRRRR/# ©r   Úbr  r¤   r5   r   r   r   )r   s   "r   r   r   6  s&   € ÷ Zñ Z˜ð Z°tð ZÀñ Zr   c           	     ó>  € RV P                   9   g   RV P                  9   d   R# VP                  R4      p\        V\        4      '       d   \        VR4      '       d   R# V P                  R8H  pV'       g   \        V\        4      '       g   R# ^ RIHp \        V\        4      '       d   V! VP                  R4      4      M. p\        \        P                  . VOV P                  P                  R. 4      O4      4      pV P                  R\        R4      W6R4       R# )uˆ  Section 0: the active / ``providers:``-configured LM Studio row from the live catalog.

LM Studio has no models.dev mapping and its overlay row (section 2) needs a credential, so a
hand-written ``model.provider: lmstudio`` left the slug unclaimed until section 3, where a bare
``providers.lmstudio: {request_timeout_seconds: ...}`` block (no ``base_url``/``models``) cannot
discover anything and rendered a one-model ``user-config`` row â€” discarding the catalog
``_build_curated_lists`` had already live-probed into ``b.curated["lmstudio"]``. A block that
points the slug at an endpoint of its own stays with section 3's custom-endpoint handling.ÚlmstudioN©r–  r+   Úhermes©r&   Úapir(   )rç   r  r/   r0   r5   r°  r   r-   r–  r1   ÚfromkeysrR  r<  r   )r\  r¤   Ú
configuredr9  r–  Úconfigured_modelsr   s   &&     r   Ú_lap_lmstudio_rowrf  6  sß   € ð �Q—Z‘ZÔ :°·±Ô#=ÙØ×#Ñ# JÓ/€JÜ�*œd×#Ò#¬¸
ÐD^×(_Ò(_ÙØ×(Ñ(¨JÑ6€Jßœ* Z´×6Ò6ÙÝ;ÜISÐT^Ô`d×IeÒIeÑ+¨J¯N©N¸8Ó,DÔEÐkmÐÜ”T—]‘]Ð#WÐ%6Ð#W¸¿¹¿¹ÀzÐSUÓ9VÐ#WÓXÓY€IØ×Ñ�j¤)¨JÓ"7¸ÐPXÖYr   c               ó(   € V ^8„  d   QhRRRRRRRR/# ©r   r\  r  Údatar5   r¤   r   r   r   )r   s   "r   r   r   M  s.   € ÷ hñ h˜ð h¨Tð hÀ4ð hÈDñ hr   c                óÚ  € ^ RI HpHp ^ RIHp \        WP                  V P                  4       EF7  w  rgr‰\        W”4      '       g   \        W`P                  R7      '       g   K6  \        W`P                  V P                  R7      p
\        V\        4      '       d   VP!                  V4      MRp\        V\        4      '       d   V! VP!                  R4      4      M. p\#        \        P%                  . VOV
O4      4      p
V! V4      pV'       d   VP&                  '       d   VP&                  MV'       d   VP&                  MTpV P)                  WnV P*                  Wg39   V
R4       EK:  	  R# )z9Section 1: models.dev-mapped providers with api_key auth.)r–  r÷  )Úget_provider_infor  rX  Nr+   zbuilt-in)r-   r–  r÷  rú   rk  r  rç   r  rä   r  rŽ   r[  rR  r  r0   r5   r/   r1   rc  r°   r<  r¡   )r\  ri  r¤   r–  r÷  rk  r   r  r  rã   r   rd  re  ÚpinforÍ  s   &&&            r   Ú_lap_builtin_rowsrm  M  s  € çLÝ2Ü1IÈ$×PZÑPZÐ\]×\hÑ\h×1iÑ-ˆ	˜Gô ˜×3Ò3Ô7GÈ	×^jÑ^j×7kÓ7kÙÜ(¨·I±IÈA×LcÑLcÔdˆ	ô 7AÀÔQU×6VÒ6V�^×'Ñ'¨	Ô2Ð\`ˆ
ÜMWÐXbÔdh×MiÒMiÑ/°
·±¸xÓ0HÔIÐoqÐÜœŸ™Ð'GÐ):Ð'G¸YÐ'GÓHÓIˆ	Ù! 'Ó*ˆß'.°7·<·<°<�w—|’|×TYÀeÇjÂjÐ_fˆØ	×ÑØ Q×%7Ñ%7¸IÐ;OÑ%OÐQZÐ\f÷	hó 2jr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   r\  r  r  r   r  r   rC   r   )r   s   "r   r   r   b  s)   € ÷ *ñ *˜,ð *¨Sð *¸sð *ÐPTñ *r   c                ó   € VP                   R8X  d   \        W P                  4      pM^ RIHp \        WW54      pV'       g^   VP                   R8X  dM    ^ RIHp V! V4      ;'       g    / p\        VP                  R4      ;'       g    VP                  R4      4      pT;'       g    \        W4      pV'       g     \        W P                  R	7      '       d   R
pV'       ga   VR8X  dZ    ^ RIHp	Hp
 V
! 4       pV	! 4       pV'       d   VP                  R4      '       g    V'       d   VP                  R4      '       d   R
pV# V#   \         d!   p\        P                  RY4        Rp?LÌRp?ii ; i  \         d!   p\        P                  RY(4        Rp?L¾Rp?ii ; i  \         d"   p\        P                  RT4        Rp?T# Rp?ii ; i)z{Section-2 credential ladder: env/SDK, external-process executable, auth store, pool,
anthropic's external credential files.rL  rö  Úexternal_process)Úget_auth_statusÚ	logged_inrd  ú(External-process check failed for %s: %sNr  Tr  Ú	anthropic)Úread_claude_code_credentialsÚread_hermes_oauth_credentialsÚaccessTokenz)Anthropic external creds check failed: %s)rþ   rI  r¡   r-   r÷  r(  rû   rq  rC   r/   r9   r©   rª   r  r—   rŽ   Úagent.anthropic_credentialsru  rv  )r\  r  r  r%  r&  r÷  rq  Ú_ext_statusr  ru  rv  Úhermes_credsÚcc_credss   &&&&         r   Ú_overlay_has_credsr|  b  s‰  € ð ×Ñ˜IÔ%Ü2°;×@RÑ@RÓS‰	å;Ü*¨3¸WÓVˆ	÷ ˜×*Ñ*Ð.@Ô@ð	OÝ7Ù)¨+Ó6×<Ð<¸"ˆKÜ˜[Ÿ_™_¨[Ó9×ZÐZ¸[¿_¹_È\Ó=ZÓ[ˆIð
 ×GÐGÔ5°cÓG€Ißð	VÜ)¨+Ç,Á,×OÓOØ �	÷ ˜¨Ô3ð	KßoÙ8Ó:ˆLÙ3Ó5ˆHß ×!1Ñ!1°-×!@Ò!@ÇhÐS[×S_ÑS_Ð`m×SnÒSnØ �	ð Ðˆ9Ðøô1 ô 	OÜ�L‰LÐCÀS×NÑNûð	Oûô ô 	VÜ�L‰LÐBÀK×UÑUûð	Vûô ô 	KÜ�L‰LÐDÀc×JÐJØÐûð	Kúsl   ÁE Á)E Â	E Â=E3 Ã+F! Ä	F! Ä F! Ä(F! Ä?F! ÅE0ÅE+Å+E0Å3FÅ>FÆFÆ!GÆ,GÇGc               ó(   € V ^8„  d   QhRRRRRRRR/# rh  r   )r   s   "r   r   r   �  s(   € ÷ '&ñ '&˜ð '&¨Tð '&À4ð '&ÈDñ '&r   c                óÞ  € ^ RI Hp ^ RIHp ^ RIHp VP                  4        UUu/ uF  w  rgWvbK	  	  pppVP                  4        EF  w  ršVP                  W™4      p\        V P                  V P                  W›4      '       d   K@  \        W	Wº4      '       g   KT  VR9   d$   \        W°P                  RV P                  R7      pMºV
P                  R8X  d$   \!        W°P                  W¹V P                  R7      pM†VR8X  d^   \#        R	\%        V4      R
. /4      pVRJ;'       d    VR
,          '       * pV'       d!   \'        V P                  V P(                  4      M. pM"\        W°P                  W¹V P                  R7      p\+        V\,        4      '       d+   VP                  V4      ;'       g    VP                  V	4      MRp\+        V\,        4      '       d8   \/        \,        P1                  . V! VP                  R
4      4      OVO4      4      pV P3                  V\%        V4      V P4                  W¹39   VR4       V P                  P7                  V	P9                  4       4       EK  	  R# u uppi )zQSection 2: Hermes-only providers (nous, openai-codex, copilot, opencode-go, ...).rò   r_  rø  F©rO  rP  rL  rX  re  r°   r+   Nr`  >   Úcopilotúcopilot-acpúopenai-codex)rú   ró   r-   r–  rü   rù  rý   r/   rî   r  rç   r|  r[  rR  r  rþ   ra  rŒ  r   r}  rc  r0   r5   r1   rc  r<  r¡   r3  r4   )r\  ri  r¤   ró   r–  rù  r{   r  r	  r  r%  r  r   Útier_rowÚreal_accountrd  s   &&&             r   Ú_lap_overlay_rowsr…  �  s  € å7Ý;Ý4ð (>×'CÑ'CÔ'EÔFÑ'E™t˜q�a’dÑ'E€NÑFØ'×-Ñ-×/‰ˆØ$×(Ñ(¨Ó2ˆÜ�—‘˜qŸz™z¨3×<Ò<ÙÜ! !¨+×?Ò?ÙØÐDÔDô -¨[¿)¹)ÐV[Ø:;×:QÑ:QôS‰Ià×Ñ )Ô+Ü0°¿i¹iÈØ>?×>UÑ>UôW‰Ià˜FÔ"ô +¨F´I¸kÓ4JÈHÐVXÐ+YÓZˆHØ#¨4Ð/×JÐJ¸ÀÕ8JÔ4JˆLßVbÔ.¨q¯y©y¸!×:QÑ:QÔRÐhj‰Iä,¨[¿)¹)À[Ø:;×:QÑ:QôSˆIô T^Ð^lÔnr×SsÒSs�^×'Ñ'¨Ó4×OÐO¸×8JÑ8JÈ3Ó8OøÐy}ˆ
Ü�j¤$×'Ò'ÜœTŸ]™]Ð+gÑ-@ÀÇÁÐPXÓAYÓ-ZÐ+gÐ]fÐ+gÓhÓiˆIØ	×ÑØœ ;Ó/°×1CÑ1CÈÐGYÑ1YÐ[dÐfnô	pà	�‰×Ñ˜Ÿ™›×%ó= 0ùó Gs   ¦I)c               ó    € V ^8„  d   QhRRRR/# )r   r\  r  r   r   r   )r   s   "r   r   r   ¹  s   € ÷ %iñ %i˜<ð %i¨Dñ %ir   c           
     ó˜  € ^ RI Hp ^ RIHp V EFø  p\	        V P
                  V P                  VP                  4      '       d   K7  VP                  VP                  4      pRpV'       Ed   VP                  '       Ed    VP                   Uu0 uF,  p\        P                  P                  V4      '       g   K*  VkK.  	  pp\        V4      pVP                  P                  R4      '       d   VP                  VP                  RR 4      MRpV'       d   \        VP                  4      M	\        4       p	V'       dC   Yyu;8:  d   \        VP                  4      8  d"   M MVP                  V P                  8w  d   EKo  T;'       gz    \!        VP                  4      ;'       g]    \#        VP                  V P$                  R7      ;'       g4    \'        V4      ;'       d!    \)        VP                  V P                  4      pV'       gG   VeC   VP*                  R8X  d2    ^ RI Hp
 \        V
! VP                  4      P                  R	4      4      pV'       g   EKK  \'        V4      '       d.   \5        VP                  V P6                  V P8                  R7      pM-\;        VP                  V P6                  RV P8                  R7      pV P=                  VP                  VP>                  VP                  V P                  8H  VRRR7       EKû  	  R# u upi   \.         d,   p\0        P3                  R
TP                  T4        Rp?LõRp?ii ; i)z7Section 2b: CANONICAL_PROVIDERS missed by sections 1/2.r  rú  Fz-cnNr  rp  )Ú$get_external_process_provider_statusrd  rs  rX  r  Ú	canonical)r7  éýÿÿÿ) rû   rô   r…   rû  rî   r  rç   rÅ   r/   rÿ   r6  r7  rC   Úendswithr³   r¡   r  r  rŽ   rN  rI  rþ   rˆ  r9   r©   rª   ra  rR  r  r[  r<  Úlabel)r\  rô   rû  r
  r  r&  rÞ   ÚlitÚsibÚsib_varsrˆ  r  r   s   &            r   Ú_lap_canonical_rowsr�  ¹  sv  € å1Ý5Ü!ˆÜ�—‘˜qŸz™z¨2¯7©7×3Ò3ÙØ%×)Ñ)¨"¯'©'Ó2ˆ	Øˆ	ßˆ9˜×3×3Ñ3Ø )× :Ò :ÓQÑ :˜"¼b¿j¹j¿n¹nÈR×>P—2�2Ñ :ˆCÐQÜ˜S›	ˆIð :<¿¹×9IÑ9IÈ%×9PÒ9PÐ#×'Ñ'¨¯©°°¨Ô5ÐVZˆCß47”s˜3×/Ñ/Ô0¼S»UˆHß�sÖH¬¨Y×-GÑ-GÓ)H×HÈRÏWÉWÐXY×XjÑXjÔMjÚØ÷ dð dÔ!9¸"¿'¹'Ó!B÷ dð dÄlÐSU×SZÑSZÐgh×gsÑgsÔFt÷ dð dÜ˜	Ó"×bÐbÔ'EÀbÇgÁgÈq×OaÑOaÓ'bð 	ç˜YÒ2°y×7JÑ7JÐN`Ô7`ðWÝPÜ Ñ!EÀbÇgÁgÓ!N×!RÑ!RÐS_Ó!`Óa�	÷ ÚÜ�y×!Ò!Ü0°·±¸!¿)¹)ÐRS×RiÑRiÔj‰Iä,¨R¯W©W°a·i±iÐRWØ:;×:QÑ:QôSˆIà	×ÑØ�G‰G�R—X‘X˜rŸw™w¨!×*<Ñ*<Ñ<¸iÈÐbgð 	÷ 	ióA "ùò Røô" ô WÜ—‘ÐGÈÏÉÐRU×VÑVûðWús$   Â'LÂ9LÈ0LÌM	Ì!MÍM	c               ó$   € V ^8„  d   QhRRRRRR/# r[  r   )r   s   "r   r   r   á  s!   € ÷ 9:ñ 9:˜|ð 9:¸Tð 9:Àdñ 9:r   c                ó  € ^ RI HpHp ^ RIHpHp / pVP                  4        EFµ  w  rx\        V\        4      '       d.   V! V4      '       d    VP                  4       V P                  9   d   KK  V! VP                  R4      4      ;'       g    Tp	\        VR4      p
\        VRR4      w  r¼pV! V4      p\        V
4      V\        V4      \!        \#        VP                  4       4      4      3pWö9  dg   RTR\%        V	4      RT
R. R	R
RT;'       g	    V! V4      RTRVP                  R4      R\'        V
4      ;'       d    \)        V4      R. R\+        4       /Wo&   Wo,          p\-        TYˆP                  RR4      ;'       g    VP                  RR4      4       VR,          P/                  V	4       VR,          P1                  \3        V	\5        V4      4      4       EK¸  	  VP7                  4        EF  pVR,          VR,          VR,          r©p\9        VR,          4      pV'       gf   \;        \5        V
4      P=                  4       P                  4       R4      '       d/   \9        V P>                  P                  R4      ;'       g    . 4      p\        V
4      pVR,           Uu0 uF  p\5        V4      P                  4       kK  	  ppV PA                  VVV4      pT PC                  VR,          T
\5        V4      P=                  4       P                  4       R9   d   TMRVR	,          VR,          ;'       g    RVR,          VR,          VR7      w  pppVe   TpV PE                  WyV
VVV4       V P                  P1                  V4       VR,          ;'       g    V	. FO  pV PG                  VV4      '       g   K  V P                  PI                  \K        V4      P                  4       4       KQ  	  V PG                  V	V4       EK  	  R# u upi )aV  Section 3: ``providers:`` dict entries, grouped by (api_url, credential, api_mode,
extra_headers) so keyed providers on one endpoint with the same wire protocol collapse into
one row (two Palantir Claude entries -> one "Palantir Claude" row); a different
key_env/api_mode/headers keeps distinct rows since the wire protocol or tenant differs.©r!   r÷  )Úcoerce_provider_idÚis_provider_enabledr°   r)   r*   rÅ   r   r+   r™  FrZ   r   r   rà  Ú	raw_namesrM  Údefault_modelr'   r¢  zapi.openai.comÚopenairº  N©r   r   rà  r9  ra  >   rÁ   úcustom:ollama)&r-   r!   r÷  r.   r”  r•  rý   r0   r5   r4   r  r/   r°  r7   r©  r6   rp   ÚsortedrÝ  rC   rÅ  r³   r�  rÎ   rˆ   r
   r   Úvaluesr1   r   r2   rR  rO  rV  rC  rI  r3  r   )r\  r¤   r!   r÷  r”  r•  Ú	ep_groupsÚep_nameÚep_cfgrÍ  r   r½  r)   Úcred_identityr   Ú	group_keyr“  Úmodels_listÚep_url_normÚaliasÚ
ep_aliasesr9  rU  r@  r{  Úraw_names   &&                        r   Ú_lap_user_provider_rowsr§  á  s�  € ÷
 TßIØ#%€IØ)×/Ñ/×1‰ˆÜ˜&¤$×'Ò'Ñ/BÀ6×/JÒ/JÈgÏmÉmËoÐab×amÑamÔNmÙÙ)¨&¯*©*°VÓ*<Ó=×HÐHÀˆÜ! &Ð*DÓEˆÜ1CÀFÈIÐWdÓ1eÑ.ˆ Ù,¨VÓ4ˆÜ˜wÓ'¨¼ÈÓ8OÔQVÔW]Ð^e×^kÑ^kÓ^mÓWnÓQoÐpˆ	àÔ%ð ˜ Ô)<¸\Ó)JÈIÐW^Ð`hÐjlØ% uØ˜>×EÐE©_¸WÓ-EØ˜7 J°·
±
¸:Ó0FØ#¤T¨'£]×%MÐ%M´~ÀfÓ7MÈ{Ð\^Ð`iÔknÓkpð$rˆIÑ ð Õ"ˆä˜S &¯*©*°_ÀbÓ*I×*dÐ*dÈVÏZÉZÐX_ÐacÓMdÔeØˆKÕ×Ñ Ô-ØˆI�×ÑÔ5°lÄCÈÃLÓQ×Rñ- 2ð0 ×Ñ×!ˆØ),¨V­°c¸&µkÀ3ÀyÅ>˜wˆÜ˜3˜x�=Ó)ˆçÔ4´S¸³\×5GÑ5GÓ5I×5OÑ5OÓ5QÐSc×dÒdÜ˜qŸy™yŸ}™}¨XÓ6×<Ð<¸"Ó=ˆKä Ó(ˆØ69¸)¶nÓE±n¨U”c˜%“j×&Ñ&Ö(±nˆ
ÐEØ×*Ñ*¨7°JÀÓLˆ
Ø./×.AÑ.AØ�	�N˜GÜ˜7“|×)Ñ)Ó+×1Ñ1Ó3Ð7RÔR‰GÐX`ØÐ%Õ&°°Iµ×0FÐ0FÀ$ÐQTÐU_ÕQ`Ø!Ð"5Õ6À:ð	 /Bó /OÑ+ˆ
Ð(¨!ð
 Ò!Ø$ˆKà	×Ñ˜7°'¸;È
ÐThÔiØ	�‰×Ñ˜JÔ'ð ˜KÕ(×:Ð:¨\¨NÒ:ˆHØ×%Ñ% h°×<Ô<Ø—‘× Ñ Ô!5°hÓ!?×!EÑ!EÓ!GÖHñ ;ð 	
×Ñ˜|¨[×9ó3 "ùò Fs   Ê "Pc               ó$   € V ^8„  d   QhRRRRRR/# )r   r\  r  r$   rA  r   r   r   )r   s   "r   r   r     s&   € ÷ 2Hñ 2H˜Lð 2H¸Kð 2HÈDñ 2Hr   c                óT  a
€ RV P                   9   d   R# R;o
pV P                  R8X  d,   V P                  '       d   V P                  o
V P                  pMù ^ RIHp V! 4       P                  R4      p\        V\        4      '       g   R# \        VP                  R4      ;'       g    R4      P                  4       o
\        VP                  R4      ;'       g    R4      P                  4       P                  4       R8w  g	   S
'       g   R# \        VP                  RVP                  R	R4      4      ;'       g    R4      P                  4       p\        ;QJ d)    V
3R
 lT;'       g    .  4       F  '       g   K   RM	  RM! V
3R
 lT;'       g    .  4       4      '       d   R# S
P                  4       P                  R4      pV P                  R8H  ;'       d    V P                  \!        V4      8H  pV'       d   V.M. pRp \#        RTRRRR\%        V P&                  ;'       g    V P(                  ;'       d    T4      RV P*                  R7	      w  r˜V	e   T	pT P-                  RRYWYhR\/        YpP0                  4      R7       R#   \         d    Rp EL#i ; i  \         d     LMi ; i)u\  Section 3b: ``model.provider: custom`` + ``model.base_url`` with no named
providers:/custom_providers row â€” surface it so /model does not look like it ignored
config.yaml.

The endpoint comes from the caller's current-provider slice when the session is on it,
and otherwise from the static config.yaml ``model:`` block: the row used to appear only
while it happened to be the active provider, so switching away made it vanish and the
unconfigured-canonical fallback substituted a misleading 0-model placeholder (#59702).
``is_current`` is then true only when the caller's slice points back at this URL.rº  Nr'   )r"   r¢  r&   r�   Údefaultr°   c              3  ó”   <"  € T F=  p\        V\        4      ;'       d!    \        \        V4      4      \        S4      8H  x € K?  	  R # 5irG   )r0   r5   r©  r°  )rH   r
  r&   s   & €r   rJ   Ú'_lap_bare_custom_row.<locals>.<genexpr>;  s>   øé € ð ,á)ˆBô 	�2”tÓ×VÐV¤¬?¸2Ó+>Ó!?Ä9ÈXÓCVÑ!VÔVÛ)ùs
   ƒAŸ)ATFr%   rT  zCustom endpointzmodel-config)r¼  r>  )r  r   r¢   r£   r.   r"   r/   r9   r0   r5   r   r2   r4   rL   r3   r$  r©  rò  rC   r  r  r(  rC  r‘  rŽ  )r\  r$   r—  r"   Ú	cfg_modelr   r9  r+   r@  rU  r&   s   &&        @r   Ú_lap_bare_custom_rowr®    sP  ø€ ð �1—<‘<ÔÙØ!Ð!€Hˆ}Ø×Ñ (Ô*¨q×/A×/AÐ/AØ×%Ñ%ˆØŸ™‰ð	Ý5Ù#›×)Ñ)¨'Ó2ˆIô
 ˜)¤T×*Ò*ÙÜ�y—}‘} ZÓ0×6Ð6°BÓ7×=Ñ=Ó?ˆÜˆy�}‰}˜ZÓ(×.Ð.¨BÓ/×5Ñ5Ó7×=Ñ=Ó?À8ÔK×S[ÙÜ˜IŸM™M¨)°Y·]±]À6È2Ó5NÓO×UÐUÐSUÓV×\Ñ\Ó^ˆß
ƒsô ,à#×)Ð) rÐ)ó,‡s‡s‚sô ,à#×)Ð) rÐ)ó,÷ ,ò ,ñ 	Ø�n‰nÓ×%Ñ% cÓ*€GØ×(Ñ(¨HÑ4×fÐf¸×9PÑ9PÔT]Ð^eÓTfÑ9f€Jß -ˆm‰_°2€FØ Ðð	Ü+DØ�˜ 5°$ÀÜ˜AŸI™I×YÐY¨!×*IÑ*I×*XÐ*XÈjÓZØ"Ø×:Ñ:ô	,<Ñ(ˆ
ð
 Ò!ØˆFð ×ÑØÐ# W°jØ¤[°¿¹Ó%Fð ö Høô9 ô 	Ø‹Ið	ûô4 ô Ùðús0   ÁJ È"J È%J È9 J ÊJÊJÊJ'Ê&J'c               ó$   € V ^8„  d   QhRRRRRR/# )r   r\  r  r$   r1   r   r   r   )r   s   "r   r   r   R  s&   € ÷ N)ñ N) ð N)Àð N)È$ñ N)r   c                óä
  a € ^ RI HpHp ^ RIHp / pV EF÷  p\        V\        4      '       g   K  V! VP                  R4      4      p\        \        V4      ;'       g    R4      P                  4       P                  R4      pV'       d	   V'       g   K€  \        VR4      w  ršpT	;'       g	    V! V
4      p\        V4      p\        V4      pV! V4      p\        V4      p\        VP                  R4      ;'       g    R4      P                  4       pW‹V\!        \#        VP%                  4       4      4      VP'                  4       3pT;'       g    TpVP)                  VR\+        VV4      RVR	VR
RRVR. RRRRRVRVR\-        4       /4      pVR
,          ;'       g    TVR
&   VR,          ;'       d    TVR&   VR,          P/                  \1        VV4      4       \3        TYfP                  R4      ;'       g    RP                  4       4       EKú  	  \-        4       p\5        V 3R lVP7                  4        4       4      pVP7                  4        EF  pVR	,          VP                  R
R4      VR,          prÈVP'                  4       S P8                  9   d   VP'                  4       V9  d   K]  VP'                  4       V9   d@   T^ppV RV 2P'                  4       S P8                  9   d   V^,          pK/  V RV 2pVVR&   \;        V4      p\        VR,          4      P                  4       P'                  4       V3pV^ ,          '       d$   V^,          '       d   VS P<                  9   d   EK  V'       d   VS P>                  9   d   EK:  S PA                  TVR,           Uu0 uF  p\        V4      P'                  4       kK  	  upVV^8H  R7      pS PC                  YÈR\        V4      P                  4       P'                  4       \        VP                  R4      ;'       g    R4      P                  4       P'                  4       09   d   RMR\E        VP                  R4      4      VP                  R4      ;'       g    RVP                  R4      \E        V4      ;'       d    VP                  RR4      VR7      w  ppp VeN   VVR&   V '       dA    \G        TTVP                  R4      VP                  R4      ;'       g    RVR,          R7       S PK                  VVR,          VR	,          VR,          VV4       VPM                  VP'                  4       4       EK  	  R# u upi   \H         d     Lci ; i)u  Section 4: ``custom_providers:`` entries (one model each) grouped into one row per
(endpoint, credential identity, api_mode, extra_headers, display prefix). Four "Ollama â€” X"
entries on one host become one "Ollama" row; distinct prefixes sharing a proxy URL keep
their own rows.r“  )r”  r°   r'   r%   r)   Úprovider_keyrÅ   r   rZ   r   r+   r™  FrÀ  Tr   Úextra_headersrM  r¢  c              3  ó–   <"  € T F>  pSP                   '       g   K  \        VR ,          4      SP                   8X  g   K:  ^x € K@  	  R# 5i)r   N)r$  r©  )rH   r“  r\  s   & €r   rJ   Ú,_lap_custom_provider_rows.<locals>.<genexpr>v  s?   øé € ð "]Ù$ˆcØ×"Õ"ô 	
Ü'0°°YµÓ'@ÀA×D[ÑD[Ñ'[÷ 	
Š“_ùs   ƒA	œA	¿
A	Ú-)rK  rÁ   rº  Nr™  )r   r   r   )'r-   r!   r÷  r.   r”  r0   r5   r/   r   r°  r2   r3   r7   r6   rÅ  rË  rp   r›  rý   r4   Ú
setdefaultr   r³   rˆ   r
   r�  Úsumrœ  r  r©  r  r  rO  rV  rC   rA   r9   rC  r3  )!r\  r$   r!   r÷  r”  Úgroupsr>   r¦  r   r½  r)   r   rZ   r   rÄ  Úentry_extra_headersÚprefixr±  r¡  rÍ  r“  Úsection4_slugsÚcurrent_url_group_countrÅ   Ú	base_slugÚnÚgrp_url_normÚpair_keyr¤  r9  rU  r@  rß  s!   f&                               r   Ú_lap_custom_provider_rowsrÁ  R  sÇ  ø€ ÷
 TÝ4Ø "€FÜ!ˆÜ˜%¤×&Ò&ÙÙ% e§i¡i°Ó&7Ó8ˆÜ”o eÓ,×2Ð2°Ó3×9Ñ9Ó;×BÑBÀ3ÓGˆßŸwÙÜ1CÀEÈ9Ó1UÑ.ˆ Ø ×<Ð<¡O°GÓ$<ˆÜ" 5Ó)ˆÜ! %Ó(ˆÙ8¸Ó?ÐÜ  Ó*ˆÜ˜5Ÿ9™9 ^Ó4×:Ð:¸Ó;×AÑAÓCˆØ¨X´u¼VÐDW×D]ÑD]ÓD_Ó=`Ó7aÐci×coÑcoÓcqÐrˆ	Ø×)Ð) ˆØ×Ñ 	ØÔ(¨°|ÓDÀfÈlØ�w 	¨2Ð/DÀmÐU]Ð_aÐcxÐzØ˜t Z°¸?ÐL_Ø”s“uð	,ó ˆð
 ˜Y�×2Ð2¨7ˆˆI‰Ø!$Ð%6Õ!7×!DÐ!D¸HˆÐÑØˆI�×ÑÔ5°hÀÓMÔNä˜S %¯)©)°GÓ*<×*BÐ*BÀ×)IÑ)IÓ)K×Lñ3 "ô6 ›%€NÜ!ô "]Ø—]‘]”_ó"]ó ]Ðð �}‰}�ˆØ!$ Y¥°·±¸ÀBÓ1GÈÈVÍ˜$�à�:‰:‹<˜1Ÿ<™<Ô'¨D¯J©J«LÀÔ,NÙà�:‰:‹<˜>Ô)Ø �qˆIØ�K˜q  Ð$×*Ñ*Ó,°·±Ô<Ø�Q•’Ø�[  ! Ð%ˆDØˆC�‰KÜ  Ó)ˆÜ˜˜F�Ó$×*Ñ*Ó,×2Ñ2Ó4°lÐCˆØ�A�;Œ;˜8 AŸ;œ;¨8°q×7GÑ7GÔ+GÚ÷ ˜L¨A×,?Ñ,?Ô?ÚØ×*Ñ*Ø°3°y¶>ÓB±>¨%”3�u“:×#Ñ#Ö%±>ÑBÀLØ0°AÑ5ð +ó 7ˆ
ð 89×7JÑ7JØØ ¤S¨£Y§_¡_Ó%6×%<Ñ%<Ó%>ÄÀCÇGÁGÈFÃO×DYÐDYÐWYÓ@Z×@`Ñ@`Ó@b×@hÑ@hÓ@jÐ$kÔk‰HÐqyÜ�—‘Ð.Ó/Ó0¸#¿'¹'À/Ó:R×:ZÐ:ZÐVZØ—W‘W˜ZÓ(¼DÀ»M×<nÐ<nÈcÏgÉgÐVgÐimÓNnØ!ð 8Kó 8#Ñ4ˆ
Ð(¨*ð Ò!Ø&ˆC�‰MßðÜ5Ø °c·g±g¸jÓ6IÐSV×SZÑSZÐ[jÓSk×SsÐSsÐosØ,/Ð0EÕ,FõHð
 	
×Ñ˜4  V¥¨c°)­n¸cÀ(½mÈZÐYmÔnØ×Ñ˜4Ÿ:™:›<×(óO ùò* Cøô !ô Ùðús   Î"UÓ.U!Ó;U!Õ!U/Õ.U/c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   r¡   r   r¢   r£   rP  rC   r   rô  r   )r   s   "r   r   r   £  s2   € ÷ (ñ (¨3ð (À#ð (ÐVYð (Ø&*ð(Ø7Kñ(r   c                óÔ  € ^ RI HpHpHp \	        V4      pV UU	u. uF  w  r‰VNK	  	  up	pVR&   ^ RIHp
 V
! 4        F[  pVP                  '       g   K  VP                  VP                  4      '       d   K:  \        VP                  4      W{P                  &   K]  	  V! 4       VR&   RV9  d   ^ RI Hp V! VR7      VR&   V P                  4       P                  4       R8H  pRV9  dî   \        P                  P                  R	4      '       g.   \        P                  P                  R
4      '       g	   V'       dœ   ^ RIHp ^ RIHp \        P                  P                  R
4      ;'       g    V'       d   V'       d   TMR;'       g    Rp V! \        P                  P                  R	R4      VRR7      pV'       g   V'       d   V'       d   V.pVVR&   V# u up	pi   T d    . p L3i ; i)a	  Curated model lists keyed by hermes provider id, plus the dynamic ones (nous manifest,
Ollama Cloud, LM Studio live probe). ``non_blocking`` (GUI read path) takes cached Ollama Cloud
ids and warms them in the background rather than waiting on an 8s probe (#114215).)ÚOPENROUTER_MODELSÚ_PROVIDER_MODELSÚget_curated_nous_model_idsÚ
openrouter)Úlist_providersre  zollama-cloud)Úfetch_ollama_cloud_models©rå  r^  Ú
LM_API_KEYÚLM_BASE_URL)Úfetch_lmstudio_models)Ú	AuthErrorNzhttp://127.0.0.1:1234/v1r'   rã  )rZ   r&   r]   )r…   rÄ  rÅ  rÆ  r5   r;   rÈ  Úfallback_modelsr/   r°   r1   rÉ  r2   r4   r6  r7  r†   rÍ  rû   rÎ  )r¡   r¢   r£   rP  rÄ  rÅ  rÆ  rR  Úmidr{  rÈ  Ú_pprÉ  Úis_current_lmstudiorÍ  rÎ  Úlm_baseÚlives   &&&&              r   Ú_build_curated_listsrÕ  £  s�  € ÷
 bÑaÜ$(Ð)9Ó$:€GÙ/@ÔAÑ/@¡V S›SÑ/@ÒA€GˆLÑõ )ÙÖˆØ××Ò w§{¡{°3·8±8×'<Ô'<Ü $ S×%8Ñ%8Ó 9ˆG—H‘HÓñ  ñ 1Ó2€GˆF�OØ˜WÔ$Ý?á";À|Ô"Tˆ�Ñð +×0Ñ0Ó2×8Ñ8Ó:¸jÑHÐØ˜Ô ¤b§j¡j§n¡n°\×&BÒ&BÄbÇjÁjÇnÁnÐUb×FcÒFc×gzÝAÝ-ä�J‰J�N‰N˜=Ó)÷ *ð *ß$7×<LÑ ÐRV÷*ð *à)ð 	ð	Ù(´·±·±ÀÈbÓ1QÐ\cÐmpÔqˆD÷ ×+·Ø!�?ˆDØ"ˆ�
ÑØ€NùóC Bøð8 ô 	ØŠDð	ús   ›GÆ
)G Ç	G'Ç&G'rc  rŽ  r£   r  r  r  r¥   r  rá  c               ó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   r¡   r   r¢   r¤   r€  r$   rA  rc  rC   rŽ  r�  r£   r  r  r  rŽ   r¥   r  rá  r  r   ú
list[dict]r   )r   s   "r   r   r   Î  sÁ   € ÷ QKñ QKØðQKØ25ðQKØLWðQKà!ðQKàDHðQKð ðQKð 36ðQKð FJðQKð !ð	QKð IMð	QKð
 ðQKð
 3>ðQKð  ðQKð =HðQKð T^ñQKr   c       
        óZ  € ^ RI Hp ^ RIHpHp \        V4      pV'       d   Rp ^ RIHp V! 4        V! V 4      p \        T;'       g    R4      P                  4       p\        T;'       g    R4      P                  4       pV! V4      pV! 4       p\        YTYZTY‰Y{;'       g    .  Uu0 uF4  pV'       g   K  \        V4      P                  4       P                  4       kK6  	  upWÍ\        WVVR7      R7      pV'       g	   V'       d   . M \        TVP                  T;'       g    . 4      p\!        V4      ^8”  d    \#        V4       \%        T\'        V\(        4      '       d   TM/ 4       \+        VVV4       \-        VVV4       \/        V4       V'       d#   \'        V\(        4      '       d   \1        VV4       \3        VV4       V'       d#   \'        V\4        4      '       d   \7        VV4       \9        VP:                  W&4      #   \         d     ELái ; iu upi   \         d     Lãi ; i)uŠ  Detect which providers have credentials and list their curated (not full models.dev) models.

Returns dicts with ``slug`` (the --provider value), ``name``, ``is_current``,
``is_user_defined``, ``models`` (up to max_models), ``total_models``, ``source``
("built-in", "hermes", "canonical", "user-config", "model-config").
``force_fresh_nous_tier`` bypasses the short Nous tier cache (account-sensitive flows only);
``refresh`` busts the model-id disk cache up front (explicit user action only);
``probe_custom_providers`` enables live ``/models`` discovery for saved custom endpoints (CLI
true, GUI false); ``probe_current_custom_provider`` probes only the selected custom endpoint.
``non_blocking_catalogs`` is the GUI read path (``model.options``): provider catalogs come from
the disk cache only and stale/missing ones warm in the background, so a degraded provider
never stalls the picker (#114215). ``fast_custom_probe`` overrides the custom-endpoint
discovery budget ``for_picker`` otherwise implies (1.5s vs 5s) â€” ``None`` keeps the
historical coupling, ``False`` retains the full 5s budget for callers that only want
exhausted-pool visibility (#103843).)Úfetch_models_dev)r”  Ústringify_provider_mapF)Úclear_provider_models_cacher'   rX  )r¡   r¢   r£   rŽ  rŽ   rc  r  r  r  rç   r  rá  rR  )rú   rÙ  r.   r”  rÚ  rC   r…   rÛ  r9   r   r2   r  r4   rÕ  r  rR  rÓ   rÙ   rf  r0   r5   rm  r…  r�  r§  r®  r1   rÁ  Ú_finalize_picker_rowsr  )r¡   r¢   r¤   r$   rc  rŽ  r£   r  r  r  rŽ   r¥   r  rá  rÙ  r”  rÚ  rÛ  ri  r  r\  Úprefetch_slugss   &&&&$$$$$$$$$$        r   r›   r›   Î  sì  € õ. 2ßLä Ð!6Ó7Ð÷
 Ø %Ðð	ÝEÙ'Ô)ñ *Ð*:Ó;ÐÜÐ+×1Ð1¨rÓ2×8Ñ8Ó:ÐÜ˜×+Ð+¨Ó,×2Ñ2Ó4€MÙ+¨NÓ;€NÙÓ€Dô 	Ø)Ð\iØÐLaØ5Ø×D\ÐD\ÐZ\ÐD\Ó"cÑD\¸aÔabÔ#9¤3 q£6§<¡<£>×#7Ñ#7Ö#9ÑD\Ñ"cØ3Ü$Ð%5ÈØ2GôIô	J€A÷ %×(=‘bÜ9¸$ÀÇ	Á	ÐK]×KcÐKcÐacÓdð ä
ˆ>Ó˜QÔð	Ü.¨~Ô>ô �a¬:°nÄd×+KÒ+K™ÐQSÔTÜ�a˜˜~Ô.Ü�a˜˜~Ô.Ü˜Ôßœ* ^´T×:Ò:Ü  >Ô2Ü˜Ð,Ô-ßœJÐ'7¼×>Ò>Ü! !Ð%5Ô6ä  §¡¨NÓJÐJøô[ ô 	Úð	üò" #døô ô 	Ùð	ús/   ¥H Â'
HÂ6+HÄ;H ÈHÈHÈH*È)H*c               ó$   € V ^8„  d   QhRRRRRR/# )r   r  r1   r£   r   r   r   )r   s   "r   r   r   "  s"   € ÷ %ñ % 4ð %Èð %ÐPTñ %r   c           	     ó  €  ^ RI Hp \        V\        4      '       Ed   VP	                  4        UUu0 uFT  w  rE\        V\        4      '       g   K  V! V4      '       d   K-  \        V4      P                  4       P                  4       kKV  	  pppV'       dŽ   V  Uu. uF�  p\        VP                  RR4      4      P                  4       P                  4       V9  g   KA  \        VP                  RR4      4      P                  4       P                  4       V9  g   K  VNKƒ  	  p pT'       d®   T  F§  pTP                  R4      '       d   TP                  R4      '       d   K3  TP                  R4      ;'       g    . p	Y)9  dT   ^ RI
Hp
 T
! TP                  R4      T4      '       d    M1T.T	OTR&   TP                  R	\        T	4      4      ^,           TR	&    M	  T P                  R
 R7       T # u uppi u upi   \         d     Lâi ; i)z[Post-passes: drop ``providers.<name>.enabled: false`` rows, inject the current model, sort.)r•  Úprovider_idr'   rÅ   r9  r@  r+   )Ú!_model_requires_account_discoveryrƒ  c                ó2   € V R ,          '       * V R,          ) 3# )r9  rƒ  r   )Úrs   &r   ri   Ú'_finalize_picker_rows.<locals>.<lambda>F  s   €  A l¥OÔ 3°a¸Õ6GÐ5GÑHr   )rr   )r.   r•  r0   r5   rý   r   r2   r4   r/   r9   r…   rá  rÓ   Úsort)r  r¤   r£   r•  r°   r:   Údisabledrã  r  r+   rá  s   &&&        r   rÜ  rÜ  "  sÁ  € ðÝ9Ü�n¤d×+Ó+à;I×;OÑ;OÔ;QôKÙ;Q©i¨dÜ˜c¤4×(ô *Ù1DÀS×1Iô *”�D“	—‘Ó!×'Ñ'Ö)Ñ;Qð ñ K÷ á&óPÙ&˜!Ü˜1Ÿ5™5 °Ó3Ó4×:Ñ:Ó<×BÑBÓDÈHÑTô ä˜AŸE™E &¨"Ó-Ó.×4Ñ4Ó6×<Ñ<Ó>ÀhÑN÷ �A™wð ð P÷ ÛˆCØ—7‘7˜<×(Ò(¨C¯G©GÐ4J×,KÒ,KÙØ—W‘W˜XÓ&×,Ð,¨"ˆFØÔ*ÝOá4°S·W±W¸V³_Àm×TÒTÙØ!.Ð 8°Ð 8��H‘Ø&)§g¡g¨n¼cÀ&»kÓ&JÈQÕ&N��NÑ#Ùñ ð ‡L�LÑH€LÔIØ€Nùó=KùòPøô ô ÙðúsF   ‚0G9 ²G.ÁG.Á!+G.ÂG9 Â>G4Ã9G4ÄG4Ä"G9 Ç.G9 Ç9HÈHc               ó$   € V ^8„  d   QhRRRRRR/# )r   r;   r×  r¡   r   r   r   )r   s   "r   r   r   J  s"   € ÷ ñ ¨Jð È#ð ÐWañ r   c           
     óð   €  ^ RI Hp V! V4      pVf   V # V.V  Uu. uF5  p\        VP                  RR4      4      P	                  4       R8w  g   K3  VNK7  	  up,           # u upi   \
         d    T u # i ; i)aA  Add the virtual MoA provider row used by interactive model pickers.

``list_authenticated_providers()`` only returns real/auth-backed providers; the CLI inventory
adds MoA separately, so gateway pickers need the same virtual row here. Reuses the
inventory's single row builder so the row shape stays defined in one place.)Ú_moa_provider_rowrÅ   r'   Úmoa)r¨   ré  r   r/   r4   r9   )r;   r¡   ré  Úmoa_rowr  s   &&   r   Ú_prepend_moa_picker_providerrì  J  sw   € ðÝ:Ù#Ð$4Ó5ˆØŠ?ØÐØˆy¡yÓ\¡y !´C¸¿¹¸fÀbÓ8IÓ4J×4PÑ4PÓ4RÐV[Ñ4[ŸA˜A¡yÑ\Õ\Ð\ùÒ\øÜô ØÒðús-   ‚A% –A% œ0A ÁA ÁA% Á A% Á%A5Á4A5c               óH   € 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$   rA  rŽ  r�  r£   Úinclude_moarC   r¥   r  r  r  r   r×  r   )r   s   "r   r   r   Z  sz   € ÷ *ñ *Øð*Ø25ð*ØLWð*à!ð*à6@ð*àX[ð*ð ð*ð 4?ð*ð  ð	*ð BFð	*ð
 $(ð*ð
 5?ñ*r   c                óØ  € ^ RI Hp ^ RIHp V! WW#VVRVW‰V
R7      pV'       d   \	        WÐR7      p. pV Fæ  p\        VP                  RR4      4      P                  4       R8X  dH    V! VR	7       UUu. uF  w  ppVNK
  	  ppp\        V4      p\        VVR4      VR
&   \        V4      VR&   \        VP                  R4      4      ;'       d    \        VP                  R4      4      pVP                  R
4      '       g   V'       g   KÕ  VP                  V4       Kè  	  ^ RIHp V! V4       \#        V4       V# u uppi   \         d    \        TP                  R
. 4      4      p Läi ; i)u  Interactive-picker variant of :func:`list_authenticated_providers`.

OpenRouter's list is replaced with :func:`hermes_cli.models.fetch_openrouter_models` (curated
snapshot filtered against the live catalog) and rows left with no models are dropped â€” except
custom endpoints, where the user may supply their own model set through config.
``non_blocking_catalogs`` makes every catalog read cache-only: provider catalogs warm in the
background, OpenRouter's stale disk copy is served as-is; the ``probe_*`` flags are forwarded.rš   )Úfetch_openrouter_modelsT)r¡   r¢   r¤   r$   rŽ  r£   rŽ   r¥   r  r  r  )r¡   rÅ   r'   rÇ  rÊ  r+   rƒ  r;  r   )Údrop_unofferable_model_ids)r-   r›   r…   rð  rì  r   r/   r4   r9   r1   r5   r‘  rÓ   rC   rÎ   Úhermes_cli.models_validaterñ  Ú_attach_window_model_notes)r¡   r¢   r¤   r$   rŽ  r£   rî  r¥   r  r  r  r›   rð  r;   Úfilteredr  rÐ  r{  Úlive_idsÚis_custom_endpointrñ  s   &&&&&&&&&&&          r   Úlist_picker_providersr÷  Z  sK  € õ EÝ9Ù,Ø)Ø%ÐU_Ø#°ÐI[Ø3Ø&CôE€I÷ Ü0°Ô^ˆ	à€HÛˆÜˆq�u‰u�V˜RÓ Ó!×'Ñ'Ó)¨\Ô9ð5Ù.EÐQfÕ.gÔhÑ.g¡F C¨›CÑ.g�Ñhô �Q“ˆAÜ% h°
¸LÓIˆAˆh‰KÜ # H£ˆAˆnÑä! !§%¡%Ð(9Ó":Ó;×VÐVÄÀQÇUÁUÈ9ÓEUÓ@VÐØ�5‰5��?Š?×0Ñ0Ø�O‰O˜AÖñ õ Fá˜xÔ(Ü˜xÔ(Ø€Oùó iøÜô 5Ü §¡ h°Ó 3Ó4’ð5ús$   Á'E Á3D:ÂE Ä:E Å &E)Å(E)c               ó    € V ^8„  d   QhRRRR/# )r   r;   r×  r   r   r   )r   s   "r   r   r   ‡  s   € ÷ Añ A¨*ð A¸ñ Ar   c                ó:  €  \        R V  4       R4      pVf   R# ^ RIHpHpHp V! 4       pT;'       g
    V! RR7      pVf   R# ^ RIHp V! 4       pVP                  R. 4       U	u. uF  p	\        V	4      NK  	  p
p	V! W¨4      P                  4        U	Uu/ uF  w  r›V! V4      ;p'       g   K  WœbK  	  pp	pV'       d   WÑR&   Vf   R# VP                  4       pV'       d   WáR	&   R# R# u up	i u upp	i   \         d    \        P                  R
RR7        R# i ; i)uà  Nous on a usage-window plan, for the messaging pickers (same words as the CLI/TUI/desktop pickers):
``model_labels`` {id: "Large" | "Free"} (plan shape, any-age snapshot; other levels carry no tag), and
from a fresh snapshot only (a stale percent would mislabel it) ``plan_line`` (the limit line: "Weekly
limit reached Â· resets in 21h Â· paid models now use your credits (pay as you go)").
Every field is omitted when empty and for any account not on a window plan. Never raises.c              3  ó†   "  € T F7  p\        VP                  R R4      4      P                  4       R8X  g   K3  Vx € K9  	  R# 5i)rÅ   r'   re  N)r   r/   r4   )rH   r  s   & r   rJ   Ú-_attach_window_model_notes.<locals>.<genexpr>Ž  s2   é € ÐV¡	˜1¬S°·±°v¸rÓ1BÓ-C×-IÑ-IÓ-KÈvÑ-U—Q’Q£	ùs
   ‚0A·
AN)rs  Úusage_level_labelÚusage_levelsTrt  )Úcached_pricingr+   Úmodel_labelsÚ	plan_linezwindow model notes failedr¦   )r¯  rw  rs  rü  rý  Úagent.plan_limitsrþ  r/   r   rý   Ú
limit_liner9   r©   rª   )r;   re  rs  rü  rý  Úfreshr|  rþ  ry  rI   r+   ÚlvrŒ  ÚlabelsÚlines   &              r   ró  ró  ‡  s  € ðAÜÑV¡	ÓVÐX\Ó]ˆØŠ<ÙßdÑdÙ!Ó#ˆØ×8Ð8Ñ*°4Ô8ˆØŠ=ÙÝ4Ù Ó"ˆØ"&§(¡(¨8°RÔ"8Ó9Ñ"8˜Q”#�a–&Ñ"8ˆÐ9Ù(4°VÓ(E×(KÑ(KÔ(MÔrÑ(M™u˜qÑ[lÐmoÓ[pÐRpÐRWÓRp”(�!’(Ñ(MˆÑrßØ#)�Ñ ØŠ=ÙØ×ÑÓ!ˆßØ $�Óñ ùò :ùÛrøô ô AÜ�‰Ð0¸4ˆ×@ðAúsQ   ‚C4 ›C4 µC4 Á!C4 Á&C)Á:C4 ÂC.Â.C.Â4C4 Ã	C4 Ã!C4 Ã)C4 Ã4"DÄD>   re  rÇ  úopencode-goúopencode-zen)Nrä  Nr5  ))r&   r(   rb  )F)r'   r'   NN)r'   r'   NNNr'   FNFTF)YÚ__conditional_annotations__rV   Ú
__future__r   ÚloggingÚhttp.clientrì  r6  rÍ   Ú	threadingr´   Údataclassesr   r   Útypingr   r   r   Úagent.command_token_sourcer   r	   rü   r
   r   r   Úutilsr   Ú	getLoggerr©   Ú	frozensetr   rX  rA   r8   r1   r   rQ   rh   ÚEventr±   r—   r¸   rÙ   r7  r/   rä   rî   r  r  r  r  r(  r$  rD  rI  rN  r[  rZ  ra  r}  rŒ  r‘  r�  r›  rš  r©  r°  r6   r7   rÅ  rË  rÝ  rò  r  r  rf  rm  r|  r…  r�  r§  r®  rÁ  rÕ  r›   rÜ  rì  r÷  ró  )r	  s   @r   Ú<module>r     sµ  øðôVõ #ã Û Û 	Û Û ß (ß &Ñ &ß ^ß YÑ YÝ 'ð 
×	Ò	Ð4Ó	5€ñ
 .7Ò7lÓ-mÐ ˜NÓ mð'ØEIð'à(,ð'àPT÷'õTô"M˜T #�Yô MñDDð 37÷DDð DDðR "×'Ò'Ó)Ð ðÈ%ð Ðdi÷ õ$õ:(4ðV !#§
¡
§¡÷ 0õRõ"8õJ	ð	¸5÷ 	ð°%÷ õð2 &(§Z¡Z§^¡^÷ 	dõSõ
õLð0Ðaeð 0Ø.3÷0õ"ðGØ27÷Gõ.õb÷6"õ(õPõ õ6÷Põ^õ\õõ]õ
	'õ)õX.-ðb ÷t<ð t<ó ðt<õnZõ.hõ**õZ'&õT%iõP9:õx2HõjN)÷b(ñVQKàKPðQKð "ðQKð 9;ðQKð MRðQKð $(ð	QKð PUð	QKð
 ðQKð
 AEðQKð #(ðQKð KO÷QKð QKõh%÷P÷ *÷ZAr   