  We discuss alternative definitions of the semiclassical partition function in
two-dimensional CFTs with higher spin symmetry, in the presence of sources for
the higher spin currents. Theories of this type can often be described via
Hamiltonian reduction of current algebras, and a holographic description in
terms of three-dimensional Chern-Simons theory with generalized AdS boundary
conditions becomes available. By studying the CFT Ward identities in the
presence of non-trivial sources, we determine the appropriate choice of
boundary terms and boundary conditions in Chern-Simons theory for the various
types of partition functions considered. In particular, we compare the
Chern-Simons description of deformations of the field theory Hamiltonian versus
those encoding deformations of the CFT action. Our analysis clarifies various
issues and confusions that have permeated the literature on this subject.
