Patch Changes
-
#12122
e92e44dThanks @thushanth-bengre-langchain! - fix(google): surface model refusals asModelRefusalErrorBlocked prompts throw
PromptRefusedError, which matchesModelRefusalError.isInstance, including when streaming. A streamed safety stop keeps the text already streamed and ends with a refusal block, and refusal blocks are dropped when history is sent back.