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

token-counting changedbuild-with-claude/token-counting

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+6added
Lines−5removed
From line 175 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits18to this page, all time

The whole hunk

from line 175, old and new numbered
/
lines
from line 175
175175 client = Anthropic::Client.new
176176 
177177 response = client.messages.count_tokens(
178 model: "claude-opus-5-5",
178 model: Anthropic::Model::CLAUDE_OPUS_5_5,
179179 system: "You are a scientist",
180180 messages: [
181181 { role: "user", content: "Hello, Claude" }
from line 443
443443 client = Anthropic::Client.new
444444 
445445 response = client.messages.count_tokens(
446 model: "claude-opus-5-5",
446 model: Anthropic::Model::CLAUDE_OPUS_5_5,
447447 tools: [
448448 {
449449 name: "get_weather",
from line 503
503503 ```
504504 
505505 ```bash CLI
506 curl -s "https://platform.claude.com/docs/images/vision-example.jpg" -o ./vision-example.jpg
506 curl -s "https://platform.claude.com/docs/images/vision-example.jpg" \
507 -o ./vision-example.jpg
507508 
508509 ant messages count-tokens <<'YAML'
509510 model: claude-opus-5-5
from line 752
751752 client = Anthropic::Client.new
752753 
753754 response = client.messages.count_tokens(
754 model: "claude-opus-5-5",
755 model: Anthropic::Model::CLAUDE_OPUS_5_5,
755756 messages: [
756757 {
757758 role: "user",
from line 1355
13541355 pdf_base64 = Base64.strict_encode64(File.binread("/path/to/document.pdf"))
13551356 
13561357 response = client.messages.count_tokens(
1357 model: "claude-opus-5-5",
1358 model: Anthropic::Model::CLAUDE_OPUS_5_5,
13581359 messages: [
13591360 {
13601361 role: "user",
Feedback