TITLE: When is the model structure on functors correct, i.e. when does localization commute with taking functor categories?
QUESTION [7 upvotes]: Let $C$ be a small category and $M$ a model category. Then there are various "global" model structures (projective, injective, Reedy) on the category $Fun(C,M)$ of functors from $C$ to $M$, all with the same (levelwise) weak equivalences. The whole point of having such a model structure is that it should present the $\infty$-category $Fun(C,\tilde M)$, where $\tilde M$ is the $\infty$-category presented by $M$. But I'm not sure when this is actually the case.
Of course, by "the $\infty$-category presented by $M$", I mean $\tilde M = M[W^{-1}]$ is $M$ localized at the weak equivalences in the $\infty$-categorical sense, and similarly "the $\infty$-category presented by $Fun(C,M)$" is the $\infty$-categorical localization $Fun(C,M)[Fun(C,W)^{-1}]$.
Questions:

If $C$ is a small category and $M$ is a model category, then under what conditions do the standard model structures on $Fun(C,M)$ present the $\infty$-category $Fun(C,\tilde M)$, where $\tilde M = M[W^{-1}]$ is the $\infty$-category presented by $M$?
More generally, if $C$ and $M$ are relative categories, then under what conditions does the mapping relative category $\widetilde{Fun(C,M)} = Fun(\tilde C, \tilde M)$ where $\tilde{(-)}$ denotes taking the associated quasicategory?
In a more model-independent direction, when does localization of $\infty$-categories commute with taking functor categories? That is, when does $Fun(C,M[W^{-1}]) = Fun(C,M)[Fun(C,W)^{-1}]$ where $C,M$ are $\infty$-categories and $W \subseteq M$ is a subcategory?

REPLY [10 votes]: If your model structures are assumed to have small limits or colimits, the answer to the question of the title is: always. For any model category $M$ and any small category $C$, inverting levelwise weak equivalences in $Fun(C,M)$ is equivalent to considering the $\infty$-category of functors from $C$ to $M[W^{-1}]$. This is a special case of Theorem 7.9.8 (and Remark 7.9.7) in my book on higher categories. It is even possible to take for $M$ a model $\infty$-category in the sense of Mazel-Gee. In fact, Theorem 7.5.8 gives sufficient conditions on $M$ which are much more general: essentially, the mere existence of a class of well behaved fibrations is good enough (this includes Brown's categories of fibrant objects, but, more generally, a version where we do not assume all objects to be fibrant; in particular, all the variations on semi-model structures are OK) if we assume further properties: we mainly need this extra structure to exist on functor categories $Fun(C,M)$ as well (which is automatic in practice, as explained in Example 7.9.6 and Remark 7.9.7 of loc. cit.). If we restrict ourselves to those $C$ whose nerve is a finite simplicial set (e.g. finite partially ordered sets), this kind of properties is true in a much greater level of generality; see Theorem 7.6.17.
Observe that, if $M$ is good enough in the sense that $\widetilde{Fun(C,M)}\cong Fun(C,\tilde M)$ for any small category $C$, then, it is automatic that, for any subcategory $S\subset C$, the localization of the full subcategory of $Fun(C,M)$ whose objects are those functors sending the maps of $S$ to weak equivalences will autmatically be a model of the $\infty$-category of functors from $C[S^{-1}]$ to $\tilde M$.
All of this is obviously model independent.