mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-07-16 09:24:26 -04:00
3079a9e746
Claude can stop with stop_reason "refusal" (a creative model such as Fable 5 hitting a content boundary). Return a typed ErrModelRefusal carrying any refusal text instead of a generic "no response": an empty-content refusal previously looked identical to an empty/failed response, so callers could not tell "the model declined" from "the request failed". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>