high95%
PromptTemplate._validate_input rejects non-dict Mapping inputs (ChainMap, UserDict, MappingProxyType) and silently misrenders single-variable templates
BasePromptTemplate._validate_input uses isinstance(inner_input, dict) instead of collections.abc.Mapping, causing standard library mappings that are not dict subclasses to be mishandled. Single-variable templates silently render the mapping's repr into the prompt, while multi-variable templates raise a misleading TypeError. All template formats and both sync/async paths are affected. Fix is to check Mapping and convert to dict.
