o
    ưi                     @   s.  U d Z ddlmZ ddlmZmZmZ ddlmZm	Z	m
Z
 G dd deeZg dZee ed< g d	Zee ed
< g dZee ed< g dZee ed< ddddddddZeeef ed< ddddZeeef ed< dddZeeef ed< d d!d"d"d#Zeeef ed$< G d%d& d&eZe Zd'S )(z
Configuration for the Complexity Router.

Contains default keyword lists, weights, tier boundaries, and configuration classes.
All values are configurable via proxy config.yaml.
    )Enum)DictListOptional)	BaseModel
ConfigDictFieldc                   @   s    e Zd ZdZdZdZdZdZdS )ComplexityTierz'Complexity tiers for routing decisions.SIMPLEMEDIUMCOMPLEX	REASONINGN)__name__
__module____qualname____doc__r
   r   r   r    r   r   g/home/app/Keep/.python/lib/python3.10/site-packages/litellm/router_strategy/complexity_router/config.pyr	      s    r	   )-functionclassdefconstZletvarimportZexportreturnasyncawaittryZcatch	exceptionerrordebugapiZendpointrequestresponseZdatabasesqlqueryZschema	algorithmZ	implementZrefactoroptimizepython
javascript
typescriptjavarustgolangZreactZvueangularnodedockerZ
kubernetesgitcommitmergebranchzpull requestDEFAULT_CODE_KEYWORDS)zstep by stepzthink throughzlet's thinkzreason throughzanalyze thisz
break downzexplain your reasoningzshow your workzchain of thoughtzthink carefullyzconsider allevaluatezpros and conszcompare and contrastzweigh the optionsZlogicalZdeduceZinferZconcludeDEFAULT_REASONING_KEYWORDS)architecturedistributedZscalableZmicroservicezmachine learningzneural networkzdeep learningZ
encryptionZauthenticationauthorizationZperformanceZlatencyZ
throughputZ	benchmarkZconcurrencyZparallel	threadingZmemorycpuZgpuoptimizationprotocolZtcphttpZgrpcZ	websocket	containerZorchestrationDEFAULT_TECHNICAL_KEYWORDS)zwhat iszwhat'sdefinezdefinition ofzwho iszwho waszwhen didzwhen waszwhere isz	where waszhow manyzhow muchz	yes or noztrue or falsesimpleZbriefZshortZquickZhellohiZheyZthanksz	thank youZgoodbyeZbyeokayDEFAULT_SIMPLE_KEYWORDSg?g333333?g      ?g?gQ?g{Gz?)Z
tokenCountZcodePresenceZreasoningMarkersZtechnicalTermsZsimpleIndicatorsZmultiStepPatternsZquestionComplexityDEFAULT_DIMENSION_WEIGHTSg333333?gffffff?g333333?)Zsimple_mediumZmedium_complexZcomplex_reasoningDEFAULT_TIER_BOUNDARIES   i  )rC   complexDEFAULT_TOKEN_THRESHOLDSzgpt-4o-minizgpt-4ozclaude-sonnet-4-20250514)r
   r   r   r   DEFAULT_TIER_MODELSc                   @   s$  e Zd ZU dZedd ddZeeef ed< edd ddZ	eee
f ed	< ed
d ddZeeef ed< edd ddZeee
f ed< edddZeee  ed< edddZeee  ed< edddZeee  ed< edddZeee  ed< edddZee ed< eddZdS )ComplexityRouterConfigz'Configuration for the ComplexityRouter.c                   C      t  S N)rL   copyr   r   r   r   <lambda>u       zComplexityRouterConfig.<lambda>z*Mapping of complexity tiers to model names)default_factorydescriptiontiersc                   C   rN   rO   )rH   rP   r   r   r   r   rQ   {   rR   zScore boundaries between tierstier_boundariesc                   C   rN   rO   )rK   rP   r   r   r   r   rQ      rR   z8Token count thresholds for simple/complex classificationtoken_thresholdsc                   C   rN   rO   )rG   rP   r   r   r   r   rQ      rR   z"Weights for each scoring dimensiondimension_weightsNz(Keywords indicating code-related content)defaultrT   code_keywordsz.Keywords indicating reasoning-required contentreasoning_keywordsz%Keywords indicating technical contenttechnical_keywordsz(Keywords indicating simple/basic queriessimple_keywordsz1Default model to use if tier cannot be determineddefault_modelZallow)extra)r   r   r   r   r   rU   r   str__annotations__rV   floatrW   intrX   rZ   r   r   r[   r\   r]   r^   r   Zmodel_configr   r   r   r   rM   p   sN   
 rM   N)r   enumr   typingr   r   r   Zpydanticr   r   r   r`   r	   r5   ra   r7   rA   rF   rG   rb   rH   rK   rc   rL   rM   ZDEFAULT_COMPLEXITY_CONFIGr   r   r   r   <module>   s>    

	
7