@@ -154,7 +154,7 @@ def _process_output_with_schema(output: Any, openapi_schema: dict) -> Any:
154154 # Handle direct string with format=uri
155155 if output_schema .get ("type" ) == "string" and output_schema .get ("format" ) == "uri" :
156156 if isinstance (output , str ) and output .startswith (("http://" , "https://" )):
157- return _download_file (output )
157+ return PathProxy (output )
158158 return output
159159
160160 # Handle array of strings with format=uri
@@ -163,7 +163,7 @@ def _process_output_with_schema(output: Any, openapi_schema: dict) -> Any:
163163 if items .get ("type" ) == "string" and items .get ("format" ) == "uri" :
164164 if isinstance (output , list ):
165165 return [
166- _download_file (url )
166+ PathProxy (url )
167167 if isinstance (url , str ) and url .startswith (("http://" , "https://" ))
168168 else url
169169 for url in output
@@ -187,15 +187,15 @@ def _process_output_with_schema(output: Any, openapi_schema: dict) -> Any:
187187 if isinstance (value , str ) and value .startswith (
188188 ("http://" , "https://" )
189189 ):
190- result [prop_name ] = _download_file (value )
190+ result [prop_name ] = PathProxy (value )
191191
192192 # Array of files property
193193 elif prop_schema .get ("type" ) == "array" :
194194 items = prop_schema .get ("items" , {})
195195 if items .get ("type" ) == "string" and items .get ("format" ) == "uri" :
196196 if isinstance (value , list ):
197197 result [prop_name ] = [
198- _download_file (url )
198+ PathProxy (url )
199199 if isinstance (url , str )
200200 and url .startswith (("http://" , "https://" ))
201201 else url
0 commit comments