ó
    ±"³j¿  ã                  óV   • S r SSKJr  SSKJrJr  SSKJr  SSK	J
r
  Sr " S S\5      rg	)
u³  The identity shared by every kind of model.

Kept apart from [`pydantic_ai.models`][pydantic_ai.models] because it is not specific to the
request-response models defined there: [`RealtimeModel`][pydantic_ai.realtime.RealtimeModel] is a
model too, and lives in [`pydantic_ai.realtime`][pydantic_ai.realtime]. Both need the same identity â€”
a name, a provider, and a display label â€” for model resolution and OpenTelemetry attributes.
é    )Úannotations)ÚABCÚabstractmethod)ÚTracebackType)ÚSelf)ÚAbstractModelc                  óÈ   • \ rS rSrSr\\SS j5       5       r\\SS j5       5       r\SS j5       r	\SS j5       r
\SS j5       r\SS j5       rSS	 jr        SS
 jrSrg)r   é   z9Shared identity for request-response and realtime models.c                ó   • [        5       e)zThe model name.©ÚNotImplementedError©Úselfs    ÚY/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pydantic_ai/models/_abstract.pyÚ
model_nameÚAbstractModel.model_name   s   € ô "Ó#Ð#ó    c                ó   • [        5       e)a  The model provider, ex: openai.

Use to populate the `gen_ai.system` OpenTelemetry semantic convention attribute,
so should use well-known values listed in
https://opentelemetry.io/docs/specs/semconv/attributes-registry/gen-ai/#gen-ai-system
when applicable.
r   r   s    r   ÚsystemÚAbstractModel.system   s   € ô "Ó#Ð#r   c                ó   • g)z0The base URL for the provider API, if available.N© r   s    r   Úbase_urlÚAbstractModel.base_url(   s   € ð r   c                ó8   • U R                    SU R                   3$ )zAThe fully qualified model name in `'provider:model_name'` format.Ú:)r   r   r   s    r   Úmodel_idÚAbstractModel.model_id-   s   € ð —+‘+�˜a §¡Ð0Ð1Ð1r   c                ó   • g)a¶  The maximum number of tokens the model can handle at once, input and output combined, or `None` when unknown.

Models with a profile read it from the profile's `context_window`, which is filled from
[genai-prices](https://github.com/pydantic/genai-prices) when no profile layer sets it. Wrapper
models report their wrapped model's; a [`FallbackModel`][pydantic_ai.models.fallback.FallbackModel]
reports the smallest among its candidates.
Nr   r   s    r   Úcontext_windowÚAbstractModel.context_window2   s   € ð r   c                ó^  • U R                   nSU;   a  UR                  S5      S   nUR                  S5      n/ n[        U5       HÕ  u  pEUS:X  a5  UR                  5       S:X  a!  UR	                  UR                  5       5        M@  UR                  SS5      R                  5       (       aQ  U(       a7  US   R                  SS5      R                  5       (       a  US    SU 3US'   M£  UR	                  U5        M¶  UR	                  UR                  5       5        M×     SR                  U5      $ )	zÞHuman-friendly display label for the model.

Handles common patterns:
- gpt-5 -> GPT 5
- claude-sonnet-4-5 -> Claude Sonnet 4.5
- gemini-2.5-pro -> Gemini 2.5 Pro
- meta-llama/llama-3-70b -> Llama 3 70b (OpenRouter style)
Ú/éÿÿÿÿÚ-r   ÚgptÚ.Ú Ú )
r   ÚsplitÚ	enumerateÚlowerÚappendÚupperÚreplaceÚisdigitÚ
capitalizeÚjoin)r   ÚlabelÚpartsÚresultÚiÚparts         r   r3   ÚAbstractModel.label=   sõ   € ð —‘ˆà�%‹<Ø—K‘K Ó$ RÑ(ˆEà—‘˜CÓ ˆØˆÜ  Ö'‰GˆAØ�A‹v˜$Ÿ*™*›,¨%Ó/Ø—‘˜dŸj™j›lÖ+Ø—‘˜c 2Ó&×.Ñ.×0Ñ0Þ˜f R™j×0Ñ0°°bÓ9×AÑA×CÑCØ$*¨2¡J <¨q°°Ð!7�F˜2“Jà—M‘M $Ö'à—‘˜dŸo™oÓ/Ö0ñ (ð �x‰x˜ÓÐr   c              ƒ  ó   #   • U $ 7f)zEnter the model context.r   r   s    r   Ú
__aenter__ÚAbstractModel.__aenter__Z   s
   é € àˆùs   ‚c              ƒ  ó   #   • g7f)zExit the model context.Nr   )r   Úexc_typeÚexc_valÚexc_tbs       r   Ú	__aexit__ÚAbstractModel.__aexit__^   s   é � ùs   ‚r   N)ÚreturnÚstr)rB   z
str | None)rB   z
int | None)rB   r   )r=   ztype[BaseException] | Noner>   zBaseException | Noner?   zTracebackType | NonerB   zbool | None)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úpropertyr   r   r   r   r   r    r3   r:   r@   Ú__static_attributes__r   r   r   r   r      s»   † ÙCàØó$ó ó ð$ð Øó$ó ó ð$ð óó ðð ó2ó ð2ð óó ðð ó ó ð ô8ð&à,ð&ð &ð&ð %ð	&ð
 
÷&r   r   N)rH   Ú
__future__r   Ú_annotationsÚabcr   r   Útypesr   Útyping_extensionsr   Ú__all__r   r   r   r   Ú<module>rQ      s+   ðñõ 3ç #Ý å "à
€ôQ&�Cõ Q&r   