token-counting changedbuild-with-claude/token-counting
Nearest release: v2.1.307, published 4 hours after 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+20added
Lines−28removed
From line
109
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 109, old and new numbered
/
from line 109
109109 {
110110 Model = Model.ClaudeOpus5_5,
111111 System = "You are a scientist",
112 Messages = [new() { Role = Role.User, Content = "Hello, Claude" }]
112 Messages = [new UserMessageParam { Content = "Hello, Claude" }]
113113 };
114114
115115 var response = await client.Messages.CountTokens(parameters);
from line 332
332332 },
333333 }),
334334 ],
335 Messages = [new() { Role = Role.User, Content = "What's the weather like in San Francisco?" }]
335 Messages = [new UserMessageParam { Content = "What's the weather like in San Francisco?" }]
336336 };
337337
338338 var count = await client.Messages.CountTokens(parameters);
from line 606
606606 Model = Model.ClaudeOpus5_5,
607607 Messages =
608608 [
609 new()
609 new UserMessageParam
610610 {
611 Role = Role.User,
612 Content = new MessageParamContent(new List<ContentBlockParam>
611 Content = new List<ContentBlockParam>
613612 {
614613 new ContentBlockParam(new ImageBlockParam(
615614 new ImageBlockParamSource(new Base64ImageSource()
from line 618
619618 })
620619 )),
621620 new ContentBlockParam(new TextBlockParam("Describe this image")),
622 }),
621 },
623622 }
624623 ]
625624 };
from line 702
703702
704703 MessageCountTokensParams params = MessageCountTokensParams.builder()
705704 .model(Model.CLAUDE_OPUS_5_5)
706 .addUserMessageOfBlockParams(List.of(imageBlock, textBlock))
705 .addUserMessageOfContentBlockParams(List.of(imageBlock, textBlock))
707706 .build();
708707
709708 MessageTokensCount count = client.messages().countTokens(params);
from line 932
933932 Thinking = new ThinkingConfigAdaptive(),
934933 Messages =
935934 [
936 new()
935 new UserMessageParam
937936 {
938 Role = Role.User,
939937 Content = "Are there an infinite number of prime numbers such that n mod 4 == 3?"
940938 },
941 new()
939 new AssistantMessageParam
942940 {
943 Role = Role.Assistant,
944 Content = new MessageParamContent(new List<ContentBlockParam>
941 Content = new List<ContentBlockParam>
945942 {
946943 new ContentBlockParam(new ThinkingBlockParam()
947944 {
from line 946
949946 Signature = "EuYBCkQYAiJAgCs1le6/Pol5Z4/JMomVOouGrWdhYNsH3ukzUECbB6iWrSQtsQuRHJID6lWV...",
950947 }),
951948 new ContentBlockParam(new TextBlockParam("Yes, there are infinitely many prime numbers p such that p mod 4 = 3...")),
952 }),
949 },
953950 },
954 new()
955 {
956 Role = Role.User,
957 Content = "Can you write a formal proof?"
958 }
951 new UserMessageParam { Content = "Can you write a formal proof?" }
959952 ]
960953 };
961954
from line 1017
10241017 .model(Model.CLAUDE_OPUS_5_5)
10251018 .thinking(ThinkingConfigAdaptive.builder().build())
10261019 .addUserMessage("Are there an infinite number of prime numbers such that n mod 4 == 3?")
1027 .addAssistantMessageOfBlockParams(assistantBlocks)
1020 .addAssistantMessageOfContentBlockParams(assistantBlocks)
10281021 .addUserMessage("Can you write a formal proof?")
10291022 .build();
10301023
from line 1237
12441237 Model = Model.ClaudeOpus5_5,
12451238 Messages =
12461239 [
1247 new()
1240 new UserMessageParam
12481241 {
1249 Role = Role.User,
1250 Content = new MessageParamContent(new List<ContentBlockParam>
1242 Content = new List<ContentBlockParam>
12511243 {
12521244 new ContentBlockParam(new DocumentBlockParam(
12531245 new DocumentBlockParamSource(new Base64PdfSource()
from line 1248
12561248 })
12571249 )),
12581250 new ContentBlockParam(new TextBlockParam("Please summarize this document.")),
1259 }),
1251 },
12601252 }
12611253 ]
12621254 };
from line 1308
13161308
13171309 MessageCountTokensParams params = MessageCountTokensParams.builder()
13181310 .model(Model.CLAUDE_OPUS_5_5)
1319 .addUserMessageOfBlockParams(List.of(documentBlock, textBlock))
1311 .addUserMessageOfContentBlockParams(List.of(documentBlock, textBlock))
13201312 .build();
13211313
13221314 MessageTokensCount count = client.messages().countTokens(params);
No line in this hunk matches that.