Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Automatically handles tool execution loop changedcli-sdks-libraries/sdks/ruby

Nearest release: v2.1.307, published 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 32 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits10to this page, all time

The whole hunk

from line 32, old and new numbered
/
lines
from line 32
3232message = anthropic.messages.create(
3333 max_tokens: 1024,
3434 messages: [{role: "user", content: "Hello, Claude"}],
35 model: :"claude-opus-5-5"
35 model: Anthropic::Model::CLAUDE_OPUS_5_5
3636)
3737 
3838message.content.each do |block|
from line 51
5151stream = anthropic.messages.stream(
5252 max_tokens: 1024,
5353 messages: [{role: "user", content: "Hello, Claude"}],
54 model: :"claude-opus-5-5"
54 model: Anthropic::Model::CLAUDE_OPUS_5_5
5555)
5656 
5757stream.each do |message|
from line 68
6868stream = anthropic.messages.stream(
6969 max_tokens: 1024,
7070 messages: [{role: :user, content: "Say hello there!"}],
71 model: :"claude-opus-5-5"
71 model: Anthropic::Model::CLAUDE_OPUS_5_5
7272)
7373 
7474stream.text.each do |text|
from line 100
100100 
101101# Automatically handles tool execution loop
102102anthropic.beta.messages.tool_runner(
103 model: "claude-opus-5-5",
103 model: Anthropic::Model::CLAUDE_OPUS_5_5,
104104 max_tokens: 1024,
105105 messages: [{role: "user", content: "What's 15 * 7?"}],
106106 tools: [Calculator.new]
from line 121
121121 message = anthropic.messages.create(
122122 max_tokens: 1024,
123123 messages: [{role: "user", content: "Hello, Claude"}],
124 model: :"claude-opus-5-5"
124 model: Anthropic::Model::CLAUDE_OPUS_5_5
125125 )
126126rescue Anthropic::Errors::APIConnectionError => e
127127 puts("The server could not be reached")
from line 262
262262anthropic.messages.create(
263263 max_tokens: 1024,
264264 messages: [Anthropic::MessageParam.new(role: "user", content: "Hello, Claude")],
265 model: :"claude-opus-5-5"
265 model: Anthropic::Model::CLAUDE_OPUS_5_5
266266)
267267```
268268 
from line 274
274274anthropic.messages.create(
275275 max_tokens: 1024,
276276 messages: [{role: "user", content: "Hello, Claude"}],
277 model: :"claude-opus-5-5"
277 model: Anthropic::Model::CLAUDE_OPUS_5_5
278278)
279279 
280280# You can also splat a full Params class:
from line 281
281281params = Anthropic::MessageCreateParams.new(
282282 max_tokens: 1024,
283283 messages: [Anthropic::MessageParam.new(role: "user", content: "Hello, Claude")],
284 model: :"claude-opus-5-5"
284 model: Anthropic::Model::CLAUDE_OPUS_5_5
285285)
286286anthropic.messages.create(**params)
287287```
Feedback