ó
    ±"³j§V  ã                  óÒ  • S SK Jr  S SKrS SKrS SKrS SKrS SKJr  S SKJ	r	  S SK
JrJr  S SKJrJr  S SKJr  S SKJrJr  S S	KJrJrJrJr  S S
KJr  S SKJr  S SKJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'  SSK(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6  SSK7J8r8  SSK9J:r:  SSK(J;r;J<r<J=r=J>r>J?r?  SSK@JArA  SrBS S jrC\" SS9 " S S5      5       rD\" SS9 " S S\A5      5       rES!S jrFg)"é    )ÚannotationsN)ÚAsyncGenerator)Úasynccontextmanager)Ú	dataclassÚfield)ÚAnyÚLiteral)ÚPriceCalculation)ÚMeterProviderÚget_meter_provider)ÚSpanÚTracerÚTracerProviderÚget_tracer_provider)ÚAttributeValue)Úto_json)	ÚDEFAULT_INSTRUMENTATION_VERSIONÚ(TIME_TO_FIRST_CHUNK_HISTOGRAM_BOUNDARIESÚTOKEN_HISTOGRAM_BOUNDARIESÚCachedMessageJsonÚMessageJsonCacheÚget_instructionsÚmessage_json_fragmentÚopen_model_request_spanÚsafe_to_jsoné   )Ú_otel_messages)Ú
RunContext)ÚPydanticAIDeprecationWarning)ÚBaseToolReturnPartÚModelMessageÚModelRequestÚModelRequestPartÚModelResponseÚRetryPromptPartÚSystemPromptPartÚToolAvailabilityDeltaPart)ÚModelSettings)Ú	UsageBaseé   )ÚKnownModelNameÚModelÚModelRequestContextÚModelRequestParametersÚStreamedResponse)ÚWrapperModel)Úinstrument_modelÚInstrumentationSettingsÚInstrumentedModelc                ór   • U(       a/  [        U [        5      (       d  USL a
  [        5       n[        X5      n U $ )zYWrap `model` in an `InstrumentedModel` so OTel/Logfire spans are emitted around requests.T)Ú
isinstancer3   r2   )ÚmodelÚ
instruments     Ú\/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pydantic_ai/models/instrumented.pyr1   r1   3   s1   € æœ* UÔ,=×>Ñ>Ø˜ÒÜ0Ó2ˆJä! %Ó4ˆà€Ló    F)Úinitc                  ó*  • \ rS rSr% Sr\" SS9rS\S'   SrS\S	'   Sr	S\S
'   Sr
S\S'   \rS\S'   SrS\S'   SSSSS\SS.             SS jjrSS jr      SS jr SSS.         SS jjjrSS jrS S jr S       S!S jjrSrg)"r2   é>   aÎ  Options for instrumenting models and agents with OpenTelemetry.

Used in:

- [`Instrumentation`][pydantic_ai.capabilities.Instrumentation] capability
- [`Agent.instrument`][pydantic_ai.agent.Agent.instrument] / [`Agent.instrument_all()`][pydantic_ai.agent.Agent.instrument_all]
- [`InstrumentedModel`][pydantic_ai.models.instrumented.InstrumentedModel]

See the [Debugging and Monitoring guide](https://pydantic.dev/docs/ai/integrations/logfire/) for more info.
F)Úreprr   ÚtracerTÚboolÚinclude_binary_contentÚinclude_contentÚ include_model_request_parametersúLiteral[2, 3, 4, 5, 6]ÚversionÚ$use_aggregated_usage_attribute_namesN)Útracer_providerÚmeter_providerr@   rA   rB   rD   rE   c               ó.  • SSK Jn  U=(       d
    [        5       nU=(       d
    [        5       nSn	UR	                  X˜5      U l        UR                  X˜5      U l        X0l        X@l	        XPl
        US;  a  [        S5      eUS;   a  [        R                  " S[        SS	9  X`l        Xpl        [#        S
SSS9n
 U R                  R$                  " S0 U
DS[&        0D6U l        U R                  R%                  SSSS9U l        [#        SSSS9n U R                  R$                  " S0 UDS[.        0D6U l        g! [*         a$    U R                  R$                  " S0 U
D6U l         Nƒf = f! [*         a$    U R                  R$                  " S0 UD6U l         gf = f)u  Create instrumentation options.

Args:
    tracer_provider: The OpenTelemetry tracer provider to use.
        If not provided, the global tracer provider is used.
        Calling `logfire.configure()` sets the global tracer provider, so most users don't need this.
    meter_provider: The OpenTelemetry meter provider to use.
        If not provided, the global meter provider is used.
        Calling `logfire.configure()` sets the global meter provider, so most users don't need this.
    include_binary_content: Whether to include binary file data in the instrumentation events:
        user prompts and model responses, tool returns, the agent's output and the arguments
        its output function receives, and run and tool deferral metadata. The media type is
        recorded either way. Binary content is found inside dictionaries, lists and
        `ToolReturn`s, but not inside your own types: a `BinaryContent` held as a field of a
        model or dataclass you define is still recorded in full.
    include_content: Whether to include prompts, completions, and tool call arguments and responses
        in the instrumentation events.
    include_model_request_parameters: Whether to emit the `model_request_parameters` span attribute on
        model request spans. This serializes the full `ModelRequestParameters` (output configuration
        and every tool definition, including fields that are not sent to the model such as tool
        `metadata` and, when not requested, `return_schema`). Defaults to `True`. Set to `False` to
        omit it entirely, which is useful when large tool output schemas make the attribute big enough
        to strain span export. The OpenTelemetry `gen_ai.tool.definitions` attribute (tool name,
        description, and parameters) is always emitted regardless of this setting.
    version: Version of the data format. This is unrelated to the Pydantic AI package version.
        Defaults to version 5. Versions 2, 3, and 4 are deprecated compatibility formats
        and emit a `PydanticAIDeprecationWarning` when used.
        Version 2 uses the newer OpenTelemetry GenAI spec and stores messages in the following attributes:
            - `gen_ai.system_instructions` for instructions passed to the agent.
            - `gen_ai.input.messages` and `gen_ai.output.messages` on model request spans.
            - `pydantic_ai.all_messages` on agent run spans.
        Version 3 is the same as version 2, with additional support for thinking tokens.
        Version 4 is the same as version 3, with GenAI semantic conventions for multimodal content:
            URL-based media uses type='uri' with uri and mime_type fields (and modality for image/audio/video).
            Inline binary content uses type='blob' with mime_type and content fields (and modality for image/audio/video).
            https://opentelemetry.io/docs/specs/semconv/gen-ai/non-normative/examples-llm-calls/#multimodal-inputs-example
        Version 5 is the same as version 4, but CallDeferred and ApprovalRequired exceptions
            no longer record an exception event or set the span status to ERROR â€” the span is left
            as UNSET, since deferrals are control flow, not errors.
        Version 6 is the same as version 5, but tool results are emitted in a message with
            `role='tool'` rather than `role='user'`, which is the role the GenAI semantic
            conventions pair with the `tool_call_response` parts they carry. Opt in to it when
            your telemetry consumer keys on the message role; it is not the default.
    use_aggregated_usage_attribute_names: Whether to use `gen_ai.aggregated_usage.*` attribute names
        for token usage on agent run spans instead of the standard `gen_ai.usage.*` names.
        Defaults to True to prevent double-counting in observability backends that aggregate span
        attributes across parent and child spans.
        Note: `gen_ai.aggregated_usage.*` is a custom namespace, not part of the OpenTelemetry
        Semantic Conventions. It may be updated if OTel introduces an official convention.
r   )Ú__version__zpydantic-ai)r   é   é   é   é   z8Instrumentation version must be one of 2, 3, 4, 5, or 6.)r   rJ   rK   zTInstrumentation format versions 2, 3, and 4 are deprecated; use `version=5` instead.r   )Ú
stacklevelzgen_ai.client.token.usagez{token}z/Measures number of input and output tokens used)ÚnameÚunitÚdescriptionÚ#explicit_bucket_boundaries_advisoryzoperation.costz{USD}zMonetary cost)rP   rQ   z+gen_ai.client.operation.time_to_first_chunkÚszWTime from issuing a streaming request to the first chunk being surfaced to the consumerN© )Úpydantic_airI   r   r   Ú
get_tracerr>   Ú	get_meterÚmeterr@   rA   rB   Ú
ValueErrorÚwarningsÚwarnr   rD   rE   ÚdictÚcreate_histogramr   Útokens_histogramÚ	TypeErrorÚcost_histogramr   Útime_to_first_chunk_histogram)ÚselfrF   rG   r@   rA   rB   rD   rE   rI   Ú
scope_nameÚtokens_histogram_kwargsÚ$time_to_first_chunk_histogram_kwargss               r8   Ú__init__Ú InstrumentationSettings.__init__R   s©  € õz 	,à)×BÔ-@Ó-BˆØ'×?Ô+=Ó+?ˆØ"ˆ
Ø%×0Ñ0°ÓIˆŒØ#×-Ñ-¨jÓFˆŒ
Ø&<Ô#Ø.ÔØ0PÔ-à˜/Ó)ÜÐWÓXÐXð �iÓÜ�MŠMØfÜ,Øòð
 ŒØ4XÔ1ô #'Ø,ØØIñ#
Ðð
		Ø$(§J¡J×$?Ò$?ñ %Ø)ñ%ä4Nò%ˆDÔ!ð #Ÿj™j×9Ñ9ØØØ'ð :ð 
ˆÔô
 04Ø>ØØqñ0
Ð,ð
		Ø15·±×1LÒ1Lñ 2Ø6ñ2ä4\ò2ˆDÕ.øô! ó 	à$(§J¡J×$?Ò$?ñ %Ø)ñ%ˆDÖ!ð	ûô( ó 	à15·±×1LÒ1Lñ 2Ø6ñ2ˆDÖ.ð	ús$   Â6)D5 Ä)E& Ä5+E#Å"E#Å&+FÆFc           	     ór  • / nU GH-  n[        U[        5      (       a¬  [        R                  " UR                  [
        R                  " [        U R                  S9S9 Hf  u  pE/ nU H6  n[        US5      (       d  M  UR                  UR                  U 5      5        M8     UR                  [        R                  " XFS95        Mh     MÅ  [        U[        5      (       d  MÜ  [        R                   " SUR                  U 5      S9nUR"                  b  UR"                  US'   UR                  U5        GM0     U$ )N)rD   )ÚkeyÚotel_message_parts)ÚroleÚpartsÚ	assistantÚfinish_reason)r5   r"   Ú	itertoolsÚgroupbyrl   Ú	functoolsÚpartialÚ_otel_message_rolerD   ÚhasattrÚextendrj   Úappendr   ÚChatMessager$   ÚOutputMessagern   )	rb   ÚmessagesÚresultÚmessagerk   ÚgroupÚmessage_partsÚpartÚotel_messages	            r8   Úmessages_to_otel_messagesÚ1InstrumentationSettings.messages_to_otel_messagesÍ   s  € Ø35ˆÜˆGÜ˜'¤<×0Ñ0Ü#,×#4Ò#4Ø—M‘M¤y×'8Ò'8Ô9KÐUY×UaÑUaÑ'bô$‘K�Dð GI�MÛ %˜Ü" 4Ð)=×>Ó>Ø)×0Ñ0°×1HÑ1HÈÓ1NÖOñ !&ð —M‘M¤.×"<Ò"<À$Ñ"\Ö]ó$ô ˜G¤]×3Ó3Ü-×;Ò;ÀÐT[×TnÑTnÐosÓTtÑu�Ø×(Ñ(Ñ4Ø4;×4IÑ4I�L Ñ1Ø—‘˜l×+ñ  ð  ˆr9   c           	     óæ  • Uc  [        U R                  U5      5      $ / n0 nU H“  nUR                  [        U5      5      nUb  UR                  UR                  La  [        XUR                  [        X5      5      nXd[        U5      '   UR                  (       d  Mx  UR                  UR                  5        M•     UR                  5         UR                  U5        SSR                  U5      -   S-   $ )aR  Serialize the input message history to a JSON array.

With a `message_json_cache` (agent runs, where the growing history is re-serialized every
request), each message's fragment is cached and concatenated, keeping the per-request cost
proportional to new messages rather than the whole history. Entries for messages no longer
in the input history are evicted, so the cache (and the `parts` lists it keeps alive) stays
bounded by the current history even when a history processor prunes or rebuilds messages.
Without a cache (one-off requests), the whole history is serialized in a single call.
ó   [ó   ,ó   ])r   r€   ÚgetÚidrl   r   r   Úfragmentrv   ÚclearÚupdateÚjoin)rb   Úinput_messagesÚmessage_json_cacheÚ	fragmentsÚfresh_entriesr{   Úentrys          r8   Ú_input_messages_jsonÚ,InstrumentationSettings._input_messages_jsoná   sÏ   € ð Ñ%Ü × >Ñ >¸~Ó NÓOÐOà!#ˆ	Ø*,ˆÛ%ˆGØ&×*Ñ*¬2¨g«;Ó7ˆEØ‰} §¡°7·=±=Ò @Ü)¨'·=±=ÔBWÐX\ÓBfÓg�Ø).œ"˜W›+Ñ&Ø�~�~‰~Ø× Ñ  §¡Ö0ñ &ð 	× Ñ Ô"Ø×!Ñ! -Ô0Ø�d—i‘i 	Ó*Ñ*¨TÑ1Ð1r9   )r�   c          	     óÀ  • U R                  U/5      n[        U5      S:X  d   eUS   n[        X5      nU R                  U5      n	U R	                  X5      R                  5       [        U/5      R                  5       S.U	ES[        SSS0SS0S.U	(       a  SSS00O0 EU R                  (       a  S	SS00O0 ES
.5      R                  5       0En
UR                  U
5        g )Nr*   r   )zgen_ai.input.messageszgen_ai.output.messageszlogfire.json_schemaÚobjectÚtypeÚarrayúgen_ai.system_instructionsÚmodel_request_parameters)r•   Ú
properties)
r€   Úlenr   Úsystem_instructions_attributesr‘   Údecoder   r   rB   Úset_attributes)rb   rŒ   ÚresponseÚspanÚ
parametersr�   Úoutput_messagesÚoutput_messageÚinstructionsr›   Ú
attributess              r8   Úhandle_messagesÚ'InstrumentationSettings.handle_messagesý   s  € ð ×8Ñ8¸(¸ÓDˆÜ�?Ó# qÓ(Ð(Ð(Ø(¨Ñ+ˆä'¨ÓCˆØ)-×)LÑ)LÈ\Ó)ZÐ&ð &*×%>Ñ%>¸~Ó%b×%iÑ%iÓ%kÜ&2°NÐ3CÓ&D×&KÑ&KÓ&Mñ1
ð -ð1
ð "¤7à$à28¸'Ð1BØ39¸7Ð2Cñ	#ö QoÐ8¸6À7Ð:KÑLÐtvð	#ð  $×D×Dð 8¸&À(Ð9KÑLà!#ð	#ñó$÷ ‰f‹hñ%1
ˆ
ð( 	×Ñ˜JÕ'r9   c                ó”   • U(       a@  U R                   (       a/  S[        [        R                  " SUS9/5      R	                  5       0$ 0 $ )Nr—   Útext)r•   Úcontent)rA   r   r   ÚTextPartrœ   )rb   r£   s     r8   r›   Ú6InstrumentationSettings.system_instructions_attributes#  sB   € Þ˜D×0×0à,¬lÜ#×,Ò,°&À,ÑOÐPó/ç‘&“(ðð ð
 ˆ	r9   c           	     óÂ   • UR                  5       nU R                  (       d  U$ UR                  5        VVs0 s H  u  p4UR                  SSS5      U_M     snn$ s  snnf )a»  Cumulative-usage OpenTelemetry attributes for a run/session span.

Remaps `gen_ai.usage.*` to `gen_ai.aggregated_usage.*` when `use_aggregated_usage_attribute_names`
is set, so a backend that sums span attributes doesn't double-count the run's cumulative usage
against the per-request `chat` spans' `gen_ai.usage.*`. Shared by the classic agent-run span (the
`Instrumentation` capability) and the realtime session span so the two can't drift.
zgen_ai.usage.zgen_ai.aggregated_usage.r*   )Úopentelemetry_attributesrE   ÚitemsÚreplace)rb   Úusager¤   ri   Úvalues        r8   Úaggregated_usage_attributesÚ3InstrumentationSettings.aggregated_usage_attributes,  s[   € ð ×3Ñ3Ó5ˆ
Ø×8×8ØÐØeo×euÑeuÔewÔxÒewÑWaÐWZ�—‘˜OÐ-GÈÓKÈUÒRÑewÒxÐxùÓxs   · Ac                óN  • S HI  n[        UR                  U S3S5      =n(       d  M&  0 UESU0EnU R                  R                  Xg5        MK     U(       a0  [	        UR
                  5      nU R                  R                  Xƒ5        Ub  U R                  R                  XC5        g g )N)ÚinputÚoutputÚ_tokensr   zgen_ai.token.type)Úgetattrr°   r^   ÚrecordÚfloatÚtotal_pricer`   ra   )	rb   rž   Úprice_calculationr¤   Útime_to_first_chunkÚtypÚtokensÚtoken_attributesÚcosts	            r8   Úrecord_metricsÚ&InstrumentationSettings.record_metrics9  s    € ó 'ˆCÜ% h§n¡n¸¸¸W°oÀqÓIÐI�FÕIÙØG *ÐGÐ.AÀ3ÑGÐØ×!Ñ!×(Ñ(¨ÖBñ	 'ö
 ÜÐ*×6Ñ6Ó7ˆDØ×Ñ×&Ñ& tÔ8ØÑ*Ø×.Ñ.×5Ñ5Ð6IÕVð +r9   )
r`   r@   rA   rB   rX   ra   r^   r>   rE   rD   )rF   zTracerProvider | NonerG   zMeterProvider | Noner@   r?   rA   r?   rB   r?   rD   rC   rE   r?   )ry   úlist[ModelMessage]Úreturnz list[_otel_messages.ChatMessage])rŒ   rÄ   r�   úMessageJsonCache | NonerÅ   Úbytes©N)
rŒ   rÄ   rž   r$   rŸ   r   r    zModelRequestParameters | Noner�   rÆ   )r£   z
str | NonerÅ   zdict[str, str])r°   r)   rÅ   zdict[str, int])rž   r$   r¼   zPriceCalculation | Noner¤   zdict[str, AttributeValue]r½   zfloat | None)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r>   Ú__annotations__r@   rA   rB   r   rD   rE   rf   r€   r‘   r¥   r›   r²   rÂ   Ú__static_attributes__rT   r9   r8   r2   r2   >   sg  ‡ ñ	ñ  Ñ&€FˆFÓ&Ø#'Ð˜DÓ'Ø €O�TÓ Ø-1Ð$ dÓ1Ø&E€GÐ#ÓEØ15Ð(¨$Ó5ð
 26Ø/3Ø'+Ø $Ø15Ø*IØ59ñyð /ðyð -ð	yð
 !%ðyð ðyð +/ðyð (ðyð /3õyôvð(2Ø0ð2ØF]ð2à	ô2ðB 59ð$(ð 7;ñ$(à*ð$(ð  ð$(ð ð	$(ð
 2ð$(ð 4ö$(ôLôyð$ -1ðWàðWð 3ðWð .ð	Wð
 *÷Wð Wr9   r2   c                  ó”   ^ • \ rS rSr% SrS\S'     S	     S
U 4S jjjr        SS jr\ S	         SS jj5       r	Sr
U =r$ )r3   iL  zÃModel which wraps another model so that requests are instrumented with OpenTelemetry.

See the [Debugging and Monitoring guide](https://pydantic.dev/docs/ai/integrations/logfire/) for more info.
r2   Úinstrumentation_settingsc                óT   >• [         TU ]  U5        U=(       d
    [        5       U l        g rÈ   )Úsuperrf   r2   rÑ   )rb   ÚwrappedÚoptionsÚ	__class__s      €r8   rf   ÚInstrumentedModel.__init__V  s#   ø€ ô
 	‰Ñ˜Ô!Ø(/×(LÔ3JÓ3LˆÕ%r9   c              ƒ  óü   #   • [        U R                  UUUS9n[        U R                  U5       u  pVU R                  R	                  XU5      I S h  v•N nU" U5        UsS S S 5        $  N! , (       d  f       g = f7f)N©r6   ry   Úmodel_settingsr˜   )r-   rÔ   r   rÑ   Úrequest)rb   ry   rÚ   r˜   Úrequest_contextÚfinishÚ_rž   s           r8   rÛ   ÚInstrumentedModel.request^  ss   é € ô .Ø—,‘,ØØ)Ø%=ñ	
ˆô % T×%BÑ%BÀOÔTÑXcÐY_Ø!Ÿ\™\×1Ñ1°(ÐLdÓe×eˆHÙ�8ÔØ÷ UÑTÙe÷ UÕTüs.   ‚-A<¯"A+ÁA)ÁA+Á
A<Á)A+Á+
A9Á5A<c           	    ó8  #   • [        U R                  UUUS9n[        U R                  U5       u  pgS n[        R
                  " 5       n	 U R                  R                  UUUU5       IS h  v•N nU7v •  S S S 5      IS h  v•N   U(       a$  U" UR                  5       UR                  U	5      S9  S S S 5        g  NM N:! , IS h  v•N  (       d  f       NO= f! U(       a%  U" UR                  5       UR                  U	5      S9  f f = f! , (       d  f       g = f7f)NrÙ   )r½   )	r-   rÔ   r   rÑ   ÚtimeÚperf_counterÚrequest_streamr†   r½   )
rb   ry   rÚ   r˜   Úrun_contextrÜ   rÝ   rÞ   Úresponse_streamÚrequest_starts
             r8   rã   Ú InstrumentedModel.request_streamt  s  é € ô .Ø—,‘,ØØ)Ø%=ñ	
ˆô % T×%BÑ%BÀOÔTÑXcÐY_Ø7;ˆOô !×-Ò-Ó/ˆMðØŸ<™<×6Ñ6ØØ"Ø,Ø÷	ô ð
 %Ø)Ó)÷÷ ö #ÙØ'×+Ñ+Ó-Ø,;×,OÑ,OÐP]Ó,^ò÷! UÐT÷÷ ÷ ò ûö #ÙØ'×+Ñ+Ó-Ø,;×,OÑ,OÐP]Ó,^óð #ú÷ UÕTüs|   ‚-D¯D	Á
"CÁ,B:Á-CÁ0B>Á6CÂB<ÂCÂ+D	Â1	DÂ:CÂ<CÂ>C	ÃCÃC	ÃCÃ.DÄD	Ä	
DÄD)rÑ   rÈ   )rÔ   zModel | KnownModelNamerÕ   zInstrumentationSettings | NonerÅ   ÚNone)ry   rÄ   rÚ   úModelSettings | Noner˜   r.   rÅ   r$   )
ry   rÄ   rÚ   ré   r˜   r.   rä   zRunContext[Any] | NonerÅ   z AsyncGenerator[StreamedResponse])rÉ   rÊ   rË   rÌ   rÍ   rÎ   rf   rÛ   r   rã   rÏ   Ú__classcell__)rÖ   s   @r8   r3   r3   L  s·   ø‡ ñð
 6Ó5Ø2ð
 37ðMà'ðMð 0ðMð 
÷	Mð Mðà$ðð -ðð #9ð	ð
 
ôð, ð /3ð"à$ð"ð -ð"ð #9ð	"ð
 ,ð"ð 
*ô"ó ö"r9   r3   c                óº   • [        U [        [        -  5      (       a  gUS:¼  a8  [        U [        5      (       d"  [        U [        5      (       a  U R
                  b  gg)a¾  The GenAI role of the message a request part belongs in.

Consecutive parts sharing a role make up one message, so a request carrying a tool return and a
user prompt splits into a `tool` message followed by a `user` one.

From version 6 on, a part that renders as a `tool_call_response` takes the `tool` role the
semantic conventions pair it with, which is also the channel the adapters send it on: a tool
return and a retry naming a tool both reach OpenAI as `role='tool'`, a retry naming none as
`role='user'`. Earlier versions keep those parts on `user`, so a consumer written against them
keeps reading the role it was built for.

`ToolAvailabilityDeltaPart` gets `system` as the least-bad fit in a closed vocabulary, not as a
mirror of the wire. `Role` is `system | user | assistant | tool` and none of those means "the set
of tools changed", while the wire form varies by model: a real `SystemPromptPart` where there is
no native channel, a `role='system'` entry carrying `tool_addition` blocks on Anthropic, a
roleless `additional_tools` item on OpenAI Responses, a tool-search exchange where schemas are
withheld. `tool` is the one role that would actively mislead, being paired with
`tool_call_response`.
ÚsystemrM   ÚtoolÚuser)r5   r&   r'   r    r%   Ú	tool_name)r~   rD   s     r8   rs   rs   š  sN   € ô( �$Ô(Ô+DÑD×EÑEØØ	�A‹Ü�4Ô+×,Ñ,´¸DÄ/×1RÑ1RÐW[×WeÑWeÑWqààr9   )r6   r,   r7   zInstrumentationSettings | boolrÅ   r,   )r~   r#   rD   ÚintrÅ   z_otel_messages.Role)GÚ
__future__r   rq   ro   rá   rZ   Úcollections.abcr   Ú
contextlibr   Údataclassesr   r   Útypingr   r	   Úgenai_prices.typesr
   Úopentelemetry.metricsr   r   Úopentelemetry.tracer   r   r   r   Úopentelemetry.util.typesr   Úpydantic_corer   Úpydantic_ai._instrumentationr   r   r   r   r   r   r   r   r   Ú r   Ú_run_contextr   Ú	_warningsr   ry   r    r!   r"   r#   r$   r%   r&   r'   Úsettingsr(   r°   r)   r+   r,   r-   r.   r/   Úwrapperr0   Ú__all__r1   r2   r3   rs   rT   r9   r8   Ú<module>r     sÄ   ðÝ "ã Û Û Û Ý *Ý *ß (ß å /ß Cß QÓ QÝ 3Ý !÷
÷ 
õ 
õ Ý %Ý 4÷	÷ 	ó 	õ %Ý ß bÕ bÝ !à
L€ôñ �Ñ÷JWð JWó ðJWñZ �ÑôJ˜ó Jó ðJõZr9   