The distribution of galaxies in optical diagnostic diagrams can provide information about their physical parameters when compared with ionization models under proper assumptions. By using a sample of central emitting regions from the Mapping Nearby Galaxies at Apache Point Observatory survey (MaNGA), we find evidence of the existence of upper boundaries for narrow-line regions (NLRs) of active galactic nuclei (AGNs) in optical Baldwin, Phillips & Terlevich (BPT) diagrams, especially in diagrams involving [S II]λλ6716, 6731/Hα. Photoionization models can reproduce the boundaries well, as a consequence of the decrease of [S II]λλ6716, 6731/Hα and [O III]λ5007/Hβ ratios at very high metallicity. Whilst the exact location of the upper boundary in the [S II] BPT diagram depends only weakly on the electron density of the ionized cloud and the secondary nitrogen prescription, its dependence on the shapes of the input spectral energy distributions (SEDs) is much stronger. This allows us to constrain the power-law index of the AGN SED between 1 Ryd and ∼100 Ryd to be less than or equal to −1.40 ± 0.05. The coverage of photoionization models in the [N II] BPT diagram has a stronger dependence on the electron density and the secondary nitrogen prescription. With the density constrained by the [S II] doublet ratio and the input SED constrained by the [S II] BPT diagram, we find that the extent of the data in the [N II] BPT diagram favours those prescriptions with high N/O ratios. Although shock-ionized clouds can produce line ratios similar to those from photoionization, the resulting shapes of the upper boundaries, if they exist, would likely be different from those of photoionizing origin.