@@ -1070,7 +1070,7 @@ def _process_response( # noqa: C901
10701070 elif isinstance (item , responses .response_output_item .LocalShellCall ): # pragma: no cover
10711071 # Pydantic AI doesn't yet support the `codex-mini-latest` LocalShell built-in tool
10721072 pass
1073- elif isinstance (item , responses .ResponseFileSearchToolCall ): # pragma: no cover
1073+ elif isinstance (item , responses .ResponseFileSearchToolCall ):
10741074 call_part , return_part = _map_file_search_tool_call (item , self .system )
10751075 items .append (call_part )
10761076 items .append (return_part )
@@ -1268,7 +1268,7 @@ def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) -
12681268 type = 'approximate' , ** tool .user_location
12691269 )
12701270 tools .append (web_search_tool )
1271- elif isinstance (tool , FileSearchTool ): # pragma: no cover
1271+ elif isinstance (tool , FileSearchTool ):
12721272 file_search_tool = responses .FileSearchToolParam (
12731273 type = 'file_search' , vector_store_ids = tool .vector_store_ids
12741274 )
@@ -1480,7 +1480,7 @@ async def _map_messages( # noqa: C901
14801480 type = 'web_search_call' ,
14811481 )
14821482 openai_messages .append (web_search_item )
1483- elif ( # pragma: no cover
1483+ elif (
14841484 item .tool_name == FileSearchTool .kind
14851485 and item .tool_call_id
14861486 and (args := item .args_as_dict ())
@@ -1554,7 +1554,7 @@ async def _map_messages( # noqa: C901
15541554 and (status := content .get ('status' ))
15551555 ):
15561556 web_search_item ['status' ] = status
1557- elif ( # pragma: no cover
1557+ elif (
15581558 item .tool_name == FileSearchTool .kind
15591559 and file_search_item is not None
15601560 and isinstance (item .content , dict ) # pyright: ignore[reportUnknownMemberType]
@@ -1875,7 +1875,7 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
18751875 yield self ._parts_manager .handle_part (
18761876 vendor_part_id = f'{ chunk .item .id } -call' , part = replace (call_part , args = None )
18771877 )
1878- elif isinstance (chunk .item , responses .ResponseFileSearchToolCall ): # pragma: no cover
1878+ elif isinstance (chunk .item , responses .ResponseFileSearchToolCall ):
18791879 call_part , _ = _map_file_search_tool_call (chunk .item , self .provider_name )
18801880 yield self ._parts_manager .handle_part (
18811881 vendor_part_id = f'{ chunk .item .id } -call' , part = replace (call_part , args = None )
@@ -1956,7 +1956,7 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
19561956 yield maybe_event
19571957
19581958 yield self ._parts_manager .handle_part (vendor_part_id = f'{ chunk .item .id } -return' , part = return_part )
1959- elif isinstance (chunk .item , responses .ResponseFileSearchToolCall ): # pragma: no cover
1959+ elif isinstance (chunk .item , responses .ResponseFileSearchToolCall ):
19601960 call_part , return_part = _map_file_search_tool_call (chunk .item , self .provider_name )
19611961
19621962 maybe_event = self ._parts_manager .handle_tool_call_delta (
@@ -2262,7 +2262,7 @@ def _map_web_search_tool_call(
22622262 )
22632263
22642264
2265- def _map_file_search_tool_call ( # pragma: no cover
2265+ def _map_file_search_tool_call (
22662266 item : responses .ResponseFileSearchToolCall ,
22672267 provider_name : str ,
22682268) -> tuple [BuiltinToolCallPart , BuiltinToolReturnPart ]:
0 commit comments