In his History of the Peloponnesian War, Thucydides includes a number of made up speeches based upon "what was called for in each situation". While this is frowned upon in modern histories, it seems to have been perfectly acceptable practice then and their inclusion had no bearing on the historicity of the rest of the work. Every work by an ancient historian that I have read contains such speeches, although the quality and relevance to the situation varies.
What was the first documented case of a historian expressing opposition to the use of fabricated speeches? When did the practice begin to lose acceptance amongst historians in general? What were the reasons for this change of view?