Patch Changes
-
#12120
a4fb396Thanks @thushanth-bengre-langchain! - feat(core): add a standardrefusalcontent block andModelRefusalErrorModel refusals from OpenAI, Anthropic, and Gemini now appear as a
refusalcontent block inmessage.contentBlocks. JSON, tool-call, and structured output parsers throwModelRefusalError(from@langchain/core/errors) when the model refuses, instead of a generic parsing error.