ZIm/crates/language_models
Marshall Bowers 5c0b161563
Handle new refusal stop reason from Claude 4 models (#31217)
This PR adds support for handling the new [`refusal` stop
reason](https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals)
from Claude 4 models.

<img width="409" alt="Screenshot 2025-05-22 at 4 31 56 PM"
src="https://github.com/user-attachments/assets/707b04f5-5a52-4a19-95d9-cbd2be2dd86f"
/>

Release Notes:

- Added handling for `"stop_reason": "refusal"` from Claude 4 models.
2025-05-22 16:56:59 -04:00
..
src Handle new refusal stop reason from Claude 4 models (#31217) 2025-05-22 16:56:59 -04:00
Cargo.toml language_models: Dynamically detect Copilot Chat models (#29027) 2025-05-12 11:28:41 +00:00
LICENSE-GPL Add language_models crate to house language model providers (#20945) 2024-11-20 18:49:34 -05:00