+
    iHàjG  ã                  ó6  a€ 0 t $ R t^ RIHt ^ RIt^ RIHt RRRR^ðR^´R/tR]R&   ]	! R ]P                  4        4       R	 R
7       U Uu. uF5  w  rW]P                  R]P                  V 4      ,           R,           4      3NK7  	  upp tR]R&   R R ltR# u upp i )a>  Per-model stale-timeout FLOOR for known reasoning models.

Reasoning models routinely exceed the default chat-model stale detectors (stream 180s,
non-stream 90s): upstream proxies idle-kill the stream mid-think, surfacing as
``BrokenPipeError``/``RemoteProtocolError``. The stale-detector scaling applies
``max(default, floor)`` from :func:`get_reasoning_stale_timeout_floor`, so this never
overrides explicit per-model ``stale_timeout_seconds``/``request_timeout_seconds`` (that
branch never calls it), never lowers a threshold, and is ``None`` for non-allowlisted models.
)ÚannotationsN)ÚOptionaliX  i,  zdict[int, tuple[str, ...]]Ú_REASONING_STALE_TIMEOUT_FLOORSc              #  ó>   "  € T F  w  rV F  q3V3x € K
  	  K  	  R # 5i)N© )Ú.0ÚfloorÚslugsÚslugs   &   Ú=/home/ubuntu/.hermes/hermes-agent/agent/reasoning_timeouts.pyÚ	<genexpr>r   B   s!   é € ÐeÑ+R™<˜5Ó_dÐW[��Ñ_d‰Ó+Rùs   ‚c                ó(   € \        V ^ ,          4      ) # )é    )Úlen)Úkvs   &r   Ú<lambda>r   C   s   € œ˜B˜q�E›
‘{ó    )ÚkeyÚ^z(?:$|[\-._:])z(list[tuple[str, float, re.Pattern[str]]]Ú_SORTED_REASONING_FLOORSc               ó    € V ^8„  d   QhRRRR/# )é   ÚmodelÚobjectÚreturnzOptional[float]r   )Úformats   "r   Ú__annotate__r   H   s   € ÷ ñ ¨Vð ¸ñ r   c                ó  € V '       d   \        V \        4      '       g   R# V P                  4       P                  4       P	                  R^4      R,          p\
         F*  w  r#pVP                  V4      '       g   K  \        V4      u # 	  R# )a3  Stale-timeout floor (seconds) for a known reasoning model, else ``None``.

The aggregator prefix (up to the last ``/``) is stripped and the slug matched
start-anchored with an end-or-separator right anchor, so ``qwen3-235b`` matches ``qwen3``
but ``some-other-qwen3`` and ``llama-4-70b-o1-preview`` do not.
NÚ/éÿÿÿÿ)Ú
isinstanceÚstrÚstripÚlowerÚrsplitr   ÚsearchÚfloat)r   ÚnameÚ_slugr   Úpatterns   &    r   Ú!get_reasoning_stale_timeout_floorr*   H   si   € ÷ œ
 5¬#×.Ò.ÙØ�;‰;‹=×ÑÓ ×'Ñ'¨¨QÓ/°Õ3€Dß!9Ñˆ�gØ�>‰>˜$×ÔÜ˜“<Òñ ":ñ r   )znemotron-3-ultraznemotron-3-superznemotron-3.5-super-vlzdeepseek-r1zdeepseek-reasonerzdeepseek-flashzdeepseek-v4-flashzdeepseek-v4.1-flashzdeepseek-v4-proÚo1zo1-minizo1-proz
o1-previewÚo3zo3-prozgpt-5.6zgpt-6zclaude-fablezgemini-4)znemotron-3-nanoznemotron-3.5-lightningzqwq-32bzo3-minizo4-minizgrok-4-fast-reasoningzgrok-4.20-reasoningzgrok-4.5zgrok-4.6zox-alphazx-preview-f-freeÚinklingz
minimax-m2)zclaude-opus-4zclaude-opus-5)Úqwen3zclaude-sonnet-5zclaude-sonnet-4.5zclaude-sonnet-4.6zgrok-4-fast-non-reasoning)Ú__conditional_annotations__Ú__doc__Ú
__future__r   ÚreÚtypingr   r   Ú__annotations__ÚsortedÚitemsÚcompileÚescaper   r*   )r
   r   r/   s   00@r   Ú<module>r9      sÂ   øðôõ #ã 	Ý ð
 ð 
ð* ð 
ð Ð	+ð Ð	lðM'?Ð Ð!;ó 'ñ^ ÙeÐ+J×+PÑ+PÔ+RÓeÙ"õôFñ‰ˆð 
�"—*‘*˜T B§I¡I¨d£OÕ3Ð6FÕFÓGÓHñòFÐ ÐBó ÷ùóFs   Á	;B