handle-streaming-refusals changedtest-and-evaluate/strengthen-guardrails/handle-streaming-refusals
Nearest release: v2.1.280, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+8added
Lines−8removed
From line
66
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits19to this page, all time
The whole hunk
from line 66, old and new numbered
/
from line 66
6666 -H "content-type: application/json" \
6767 -H "x-api-key: $ANTHROPIC_API_KEY" \
6868 -d '{
69 "model": "claude-opus-5",
69 "model": "claude-opus-5-5",
7070 "messages": [{"role": "user", "content": "Hello"}],
7171 "max_tokens": 1024,
7272 "stream": true
from line 95
9595 with client.messages.stream(
9696 max_tokens=1024,
9797 messages=messages + [{"role": "user", "content": "Hello"}],
98 model="claude-opus-5",
98 model="claude-opus-5-5",
9999 ) as stream:
100100 for event in stream:
101101 # Check for refusal in message delta
from line 120
120120 try {
121121 const stream = await client.messages.stream({
122122 messages: [...messages, { role: "user", content: "Hello" }],
123 model: "claude-opus-5",
123 model: "claude-opus-5-5",
124124 max_tokens: 1024
125125 });
126126
from line 142
142142
143143 var parameters = new MessageCreateParams
144144 {
145 Model = Model.ClaudeOpus5,
145 Model = Model.ClaudeOpus5_5,
146146 MaxTokens = 1024,
147147 Messages = [new() { Role = Role.User, Content = "Hello" }]
148148 };
from line 184
184184 client := anthropic.NewClient()
185185
186186 stream := client.Messages.NewStreaming(context.TODO(), anthropic.MessageNewParams{
187 Model: anthropic.ModelClaudeOpus5,
187 Model: anthropic.ModelClaudeOpus5_5,
188188 MaxTokens: 1024,
189189 Messages: []anthropic.MessageParam{
190190 anthropic.NewUserMessage(anthropic.NewTextBlock("Hello")),
from line 220
220220 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
221221
222222 MessageCreateParams params = MessageCreateParams.builder()
223 .model(Model.CLAUDE_OPUS_5)
223 .model(Model.CLAUDE_OPUS_5_5)
224224 .maxTokens(1024L)
225225 .addUserMessage("Hello")
226226 .build();
from line 261
261261 messages: [
262262 ['role' => 'user', 'content' => 'Hello']
263263 ],
264 model: 'claude-opus-5',
264 model: 'claude-opus-5-5',
265265 );
266266
267267 foreach ($stream as $event) {
from line 286
286286
287287 begin
288288 stream = client.messages.stream(
289 model: :"claude-opus-5",
289 model: :"claude-opus-5-5",
290290 max_tokens: 1024,
291291 messages: [{ role: "user", content: "Hello" }]
292292 )
No line in this hunk matches that.