ó
    ±"³j‚  ã                  óV   • S r SSKJr  SSKrSSKrSSKJr  SSKJr          SS jr	g)a)  The deprecated `fallback_model` spelling of the `fallback_subagent_model` field.

Shared by [`ImageGeneration`][pydantic_ai.capabilities.ImageGeneration] and
[`XSearch`][pydantic_ai.capabilities.XSearch], the two capabilities that fall back to a subagent
rather than to a local tool of their own.
é    )ÚannotationsN)ÚPydanticAIDeprecationWarning)Ú	UserErrorc               óš  • U(       d  gU(       a  [        U  S35      e[        R                  " 5       nSnUbz  UR                  R	                  SS5      R                  S5      S   S:X  aH  UR                  nUS-  nUb4  UR                  R	                  SS5      R                  S5      S   S:X  a  MH  [        R                  " S	[        US
9  g)aw  Warn on the deprecated `fallback_model` argument and refuse when both spellings are passed.

Takes only whether each argument was supplied, not the values: the caller keeps the value it
wants (`fallback_model if fallback_model is not None else fallback_subagent_model`) and this
only decides whether to warn or raise. Does nothing when `fallback_model` is omitted. When it is
passed, emits a [`PydanticAIDeprecationWarning`][pydantic_ai.exceptions.PydanticAIDeprecationWarning];
passing both refuses rather than picking one silently. The exception depends on the entry path:
direct construction raises [`UserError`][pydantic_ai.exceptions.UserError], while through
[`Agent.from_spec`][pydantic_ai.agent.Agent.from_spec] the same refusal surfaces as a
`ValueError` carrying that `UserError` as its `__cause__`, because `_spec.load_from_registry`
wraps every capability-constructor error.
Nuª   : cannot specify both `fallback_model` and `fallback_subagent_model` â€” `fallback_model` is the deprecated spelling of `fallback_subagent_model`, so pass only the latteré   Ú__name__Ú Ú.r   Úpydantic_aizF`fallback_model` is deprecated; use `fallback_subagent_model` instead.)Ú
stacklevel)
r   ÚinspectÚcurrentframeÚ	f_globalsÚgetÚ	partitionÚf_backÚwarningsÚwarnr   )Úcls_nameÚfallback_subagent_model_passedÚfallback_model_passedÚframer   s        Úp/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pydantic_ai/capabilities/_deprecated_fallback_model.pyÚcheck_deprecated_fallback_modelr      sË   € ö( !ØÞ%ÜØˆjð pð pó
ð 	
ô × Ò Ó"€EØ€JØ
Ñ
 §¡× 3Ñ 3°JÀÓ C× MÑ MÈcÓ RÐSTÑ UÐYfÓ fØ—‘ˆØ�a‰ˆ
ð Ñ
 §¡× 3Ñ 3°JÀÓ C× MÑ MÈcÓ RÐSTÑ UÐYfÕ fô ‡M‚MØPÜ$Øóó    )r   Ústrr   Úboolr   r   ÚreturnÚNone)
Ú__doc__Ú
__future__r   r   r   Úpydantic_ai._warningsr   Úpydantic_ai.exceptionsr   r   © r   r   Ú<module>r%      sF   ðñõ #ã Û å >Ý ,ð'Øð'ð
 %)ð'ð  ð'ð 
õ'r   