@ai-sdk/anthropic 3.0.22 → 3.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +9 -5
- package/src/__fixtures__/anthropic-code-execution-20250825.1.chunks.txt +0 -248
- package/src/__fixtures__/anthropic-code-execution-20250825.1.json +0 -70
- package/src/__fixtures__/anthropic-code-execution-20250825.2.chunks.txt +0 -984
- package/src/__fixtures__/anthropic-code-execution-20250825.2.json +0 -111
- package/src/__fixtures__/anthropic-code-execution-20250825.pptx-skill.chunks.txt +0 -691
- package/src/__fixtures__/anthropic-code-execution-20250825.pptx-skill.json +0 -1801
- package/src/__fixtures__/anthropic-json-other-tool.1.chunks.txt +0 -13
- package/src/__fixtures__/anthropic-json-other-tool.1.json +0 -26
- package/src/__fixtures__/anthropic-json-output-format.1.chunks.txt +0 -120
- package/src/__fixtures__/anthropic-json-output-format.1.json +0 -25
- package/src/__fixtures__/anthropic-json-tool.1.chunks.txt +0 -9
- package/src/__fixtures__/anthropic-json-tool.1.json +0 -37
- package/src/__fixtures__/anthropic-json-tool.2.chunks.txt +0 -14
- package/src/__fixtures__/anthropic-mcp.1.chunks.txt +0 -17
- package/src/__fixtures__/anthropic-mcp.1.json +0 -39
- package/src/__fixtures__/anthropic-memory-20250818.1.json +0 -28
- package/src/__fixtures__/anthropic-message-delta-input-tokens.chunks.txt +0 -8
- package/src/__fixtures__/anthropic-programmatic-tool-calling.1.chunks.txt +0 -278
- package/src/__fixtures__/anthropic-programmatic-tool-calling.1.json +0 -106
- package/src/__fixtures__/anthropic-tool-no-args.chunks.txt +0 -13
- package/src/__fixtures__/anthropic-tool-no-args.json +0 -31
- package/src/__fixtures__/anthropic-tool-search-bm25.1.chunks.txt +0 -47
- package/src/__fixtures__/anthropic-tool-search-bm25.1.json +0 -67
- package/src/__fixtures__/anthropic-tool-search-deferred-bm25.2.json +0 -65
- package/src/__fixtures__/anthropic-tool-search-deferred-bm25.chunks.txt +0 -115
- package/src/__fixtures__/anthropic-tool-search-deferred-regex.2.json +0 -69
- package/src/__fixtures__/anthropic-tool-search-deferred-regex.chunks.txt +0 -119
- package/src/__fixtures__/anthropic-tool-search-regex.1.chunks.txt +0 -51
- package/src/__fixtures__/anthropic-tool-search-regex.1.json +0 -65
- package/src/__fixtures__/anthropic-web-fetch-tool.1.chunks.txt +0 -64
- package/src/__fixtures__/anthropic-web-fetch-tool.1.json +0 -54
- package/src/__fixtures__/anthropic-web-fetch-tool.2.json +0 -56
- package/src/__fixtures__/anthropic-web-fetch-tool.error.json +0 -46
- package/src/__fixtures__/anthropic-web-search-tool.1.chunks.txt +0 -120
- package/src/__fixtures__/anthropic-web-search-tool.1.json +0 -181
- package/src/__snapshots__/anthropic-messages-language-model.test.ts.snap +0 -16719
- package/src/anthropic-error.test.ts +0 -42
- package/src/anthropic-messages-language-model.test.ts +0 -7368
- package/src/anthropic-prepare-tools.test.ts +0 -1219
- package/src/anthropic-provider.test.ts +0 -198
- package/src/convert-to-anthropic-messages-prompt.test.ts +0 -2902
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01ERcBqAvLTHWQDk9c9qJLWC","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":3369,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard"}}}
|
|
2
|
-
{"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
|
|
3
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"I'll help you simulate"}}
|
|
4
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" this"}}
|
|
5
|
-
{"type":"ping"}
|
|
6
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" game between"}}
|
|
7
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" two players where"}}
|
|
8
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" one"}}
|
|
9
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" is"}}
|
|
10
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" using"}}
|
|
11
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" a loaded die."}}
|
|
12
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Let me play"}}
|
|
13
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" out"}}
|
|
14
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" the game roun"}}
|
|
15
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d by round until"}}
|
|
16
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" one player wins"}}
|
|
17
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" 3 rounds."}}
|
|
18
|
-
{"type":"content_block_stop","index":0}
|
|
19
|
-
{"type":"content_block_start","index":1,"content_block":{"type":"server_tool_use","id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK","name":"code_execution","input":{},"caller":{"type":"direct"}}}
|
|
20
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""}}
|
|
21
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"code\": \"\\nimport async"}}
|
|
22
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"io"}}
|
|
23
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n\\nasync def main"}}
|
|
24
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"():\\n player"}}
|
|
25
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"1_wins"}}
|
|
26
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" = 0\\n player2_"}}
|
|
27
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"wins = 0\\n roun"}}
|
|
28
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"d_num = 0"}}
|
|
29
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n \\n print"}}
|
|
30
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(\\\"="}}
|
|
31
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"== DICE"}}
|
|
32
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" GAME:"}}
|
|
33
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" First"}}
|
|
34
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" to"}}
|
|
35
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" 3 "}}
|
|
36
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"Wins"}}
|
|
37
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" ===\\\\"}}
|
|
38
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"n\\\")\\n \\n #"}}
|
|
39
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" Play"}}
|
|
40
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" until"}}
|
|
41
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" one player wins"}}
|
|
42
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" 3 rounds\\n while player"}}
|
|
43
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"1_wins < 3 an"}}
|
|
44
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"d player2_wins < 3:"}}
|
|
45
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n round_num += 1"}}
|
|
46
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n print"}}
|
|
47
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(f\\\"---"}}
|
|
48
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" Round {round_num} ---\\\")"}}
|
|
49
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n \\n # Both"}}
|
|
50
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" players roll their"}}
|
|
51
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" dice\\n player1_roll ="}}
|
|
52
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" await rollDie("}}
|
|
53
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\\\"player\\\": \\\"player1\\\"})"}}
|
|
54
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n player2_roll = await"}}
|
|
55
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" rollDie({\\\"player\\\": \\\""}}
|
|
56
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"player2\\\"})\\n \\n "}}
|
|
57
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"#"}}
|
|
58
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" Extract"}}
|
|
59
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" the numeric"}}
|
|
60
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" values from the results"}}
|
|
61
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n p"}}
|
|
62
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"1_value"}}
|
|
63
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" = int(player1_roll."}}
|
|
64
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"strip"}}
|
|
65
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"())\\n p2_value ="}}
|
|
66
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" int(player2_roll.strip"}}
|
|
67
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"())\\n \\n print"}}
|
|
68
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(f\\\"Player 1 rolls"}}
|
|
69
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":": {p1_value}\\\")"}}
|
|
70
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n print(f\\\"Player "}}
|
|
71
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"2 rolls: {p2_"}}
|
|
72
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"value}\\\")\\n \\n #"}}
|
|
73
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" Determine roun"}}
|
|
74
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"d winner\\n if p1_value"}}
|
|
75
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" > p2_value:\\n "}}
|
|
76
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"player1_wins += 1"}}
|
|
77
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n print(f\\\"Player 1"}}
|
|
78
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" wins this"}}
|
|
79
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" round!\\\")\\n elif p2_"}}
|
|
80
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"value > p1_value:"}}
|
|
81
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n player2_wins += 1"}}
|
|
82
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n print(f\\\"Player "}}
|
|
83
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"2 wins this round!\\\")\\n "}}
|
|
84
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"else:\\n print("}}
|
|
85
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"f\\\"Draw"}}
|
|
86
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"! No"}}
|
|
87
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" one gets"}}
|
|
88
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" a"}}
|
|
89
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" point"}}
|
|
90
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":".\\\")"}}
|
|
91
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n \\n print"}}
|
|
92
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(f\\\"Score"}}
|
|
93
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":": Player 1 ="}}
|
|
94
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" {player1_wins}, Player "}}
|
|
95
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"2 = {player2_wins"}}
|
|
96
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"}\\\\"}}
|
|
97
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"n\\\")\\n "}}
|
|
98
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n #"}}
|
|
99
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" Announce"}}
|
|
100
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" the game"}}
|
|
101
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" winner"}}
|
|
102
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n print"}}
|
|
103
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(\\\""}}
|
|
104
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"=\\\""}}
|
|
105
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" * 40"}}
|
|
106
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":")\\n if"}}
|
|
107
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" player1_wins == 3:"}}
|
|
108
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n print("}}
|
|
109
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"f\\\""}}
|
|
110
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"🏆 GAME OVER:"}}
|
|
111
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" Player 1 wins the game!"}}
|
|
112
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" ("}}
|
|
113
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"3-"}}
|
|
114
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{"}}
|
|
115
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"player2"}}
|
|
116
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"_wins}"}}
|
|
117
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":")\\\")\\n else:\\n print"}}
|
|
118
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(f\\\"🏆 "}}
|
|
119
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"GAME OVER: Player 2 "}}
|
|
120
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"wins the game! (3-{"}}
|
|
121
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"player1_wins})\\\")\\n "}}
|
|
122
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"print(\\\"=\\\" * 40)"}}
|
|
123
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n \\n # Determine who"}}
|
|
124
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" was"}}
|
|
125
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" cheating base"}}
|
|
126
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"d on the results"}}
|
|
127
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n print"}}
|
|
128
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(\\\"\\\\n"}}
|
|
129
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"📊 Analysis"}}
|
|
130
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":":\\\")\\n print("}}
|
|
131
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"f\\\"Total"}}
|
|
132
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" rounds playe"}}
|
|
133
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"d: {round_num}\\\")\\n "}}
|
|
134
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"if"}}
|
|
135
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" player1_wins >"}}
|
|
136
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" player2_wins:\\n print"}}
|
|
137
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(\\\"Player 1 ha"}}
|
|
138
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"d better"}}
|
|
139
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" results"}}
|
|
140
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" -"}}
|
|
141
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" likely"}}
|
|
142
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" using"}}
|
|
143
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" the"}}
|
|
144
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" loaded die!"}}
|
|
145
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" 🎲\\\")\\n elif"}}
|
|
146
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" player2_wins > player1_"}}
|
|
147
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"wins:\\n print(\\\"Player "}}
|
|
148
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"2 had better results - likely using"}}
|
|
149
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" the loaded die! 🎲"}}
|
|
150
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\\")\\n else:\\n print"}}
|
|
151
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"(\\\"Results"}}
|
|
152
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" were"}}
|
|
153
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" even"}}
|
|
154
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" - har"}}
|
|
155
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"d to determine who"}}
|
|
156
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" was cheating from"}}
|
|
157
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" this"}}
|
|
158
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" game alone"}}
|
|
159
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":".\\\")\\n\\nasync"}}
|
|
160
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"io.run(main())"}}
|
|
161
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\\n"}}
|
|
162
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\"}"}}
|
|
163
|
-
{"type":"content_block_stop","index":1}
|
|
164
|
-
{"type":"content_block_start","index":2,"content_block":{"type":"tool_use","id":"toolu_019jKkXz4jAdwHweHBw92CVY","name":"rollDie","input":{"player":"player1"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}}
|
|
165
|
-
{"type":"content_block_stop","index":2}
|
|
166
|
-
{"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null,"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:35.789626Z"}},"usage":{"input_tokens":3369,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":725,"server_tool_use":{"web_search_requests":0}}}
|
|
167
|
-
{"type":"message_stop"}
|
|
168
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01KSVw3xmXbMNJPNMt46BC5W","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_015dGLMbwBKv1ZRQr6KdJzeH","name":"rollDie","input":{"player":"player2"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:37.969567Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
169
|
-
{"type":"message_stop"}
|
|
170
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_016fLapHzDx8DG2SUcsGKyPA","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01YYqBNq5mk1wMtv3PAqY44m","name":"rollDie","input":{"player":"player1"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:39.648288Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
171
|
-
{"type":"message_stop"}
|
|
172
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01MQHz6AzmwmZoTry5nk5EQC","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_018WxjDkQG8h7i63poySGT2x","name":"rollDie","input":{"player":"player2"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:41.431511Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
173
|
-
{"type":"message_stop"}
|
|
174
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01WCXNc8kDU1jBuaza6uUZ8k","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_014ch4D3vbx928ddwxMvMvF1","name":"rollDie","input":{"player":"player1"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:43.145757Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
175
|
-
{"type":"message_stop"}
|
|
176
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01Hoo8fVNFQyUpbagnajQ4BF","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01QtZ46GWS93Z5ZaSifgGNnq","name":"rollDie","input":{"player":"player2"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:44.839216Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
177
|
-
{"type":"message_stop"}
|
|
178
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_014eWUw8H2P9bDMyXcSpe1ss","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_012Zvp8FdgvjVGkmbHSU4EZk","name":"rollDie","input":{"player":"player1"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:46.531362Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
179
|
-
{"type":"message_stop"}
|
|
180
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_015ecR3hog8LhtqDLdysH8p1","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01CMz8Jhv6EfnzHQzEMdpHut","name":"rollDie","input":{"player":"player2"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:48.294455Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
181
|
-
{"type":"message_stop"}
|
|
182
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01CHzXfYTqEJ9HV3Kic1Uz5q","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01PfH6ADzq8Yct5jeRY9QkS2","name":"rollDie","input":{"player":"player1"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:49.977349Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
183
|
-
{"type":"message_stop"}
|
|
184
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_014nyoTPq6LG3UwHW1zvMTH3","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_013DE3qaKvBMheZXUhwkvpdF","name":"rollDie","input":{"player":"player2"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:51.565949Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
185
|
-
{"type":"message_stop"}
|
|
186
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01HLQ2uhM6N45SyR39CddV55","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01MTRMy9BEvFHWR7hpCWc4nJ","name":"rollDie","input":{"player":"player1"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:53.308898Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
187
|
-
{"type":"message_stop"}
|
|
188
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01TdKL1d8pQ9hLtyzbPUNGNf","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01CXqv27ozPihE5nj6eA3Joc","name":"rollDie","input":{"player":"player2"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:55.035858Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
189
|
-
{"type":"message_stop"}
|
|
190
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01Q5bmB7EBDZYRnY5A78n34S","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01K6ST6orjmPHHwM8rwLj1n9","name":"rollDie","input":{"player":"player1"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:56.857745Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
191
|
-
{"type":"message_stop"}
|
|
192
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01E9RpqZHoGBsPDB9P3r1aBA","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01QcWWQcQ1pd7nx9xohX4zAr","name":"rollDie","input":{"player":"player2"},"caller":{"type":"code_execution_20250825","tool_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK"}}],"container":{"id":"container_011CWHPPTDTn1XufeRB9uHeH","expires_at":"2025-12-20T05:33:58.450677Z"},"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0}}}}
|
|
193
|
-
{"type":"message_stop"}
|
|
194
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01CfmDducyrt61n4Q7QS8VFK","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":4551,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}}
|
|
195
|
-
{"type":"content_block_start","index":0,"content_block":{"type":"code_execution_tool_result","tool_use_id":"srvtoolu_01MzSrFWsmzBdcoQkGWLyRjK","content":{"type":"code_execution_result","stdout":"=== DICE GAME: First to 3 Wins ===\n\n--- Round 1 ---\nPlayer 1 rolls: 5\nPlayer 2 rolls: 6\nPlayer 2 wins this round!\nScore: Player 1 = 0, Player 2 = 1\n\n--- Round 2 ---\nPlayer 1 rolls: 4\nPlayer 2 rolls: 6\nPlayer 2 wins this round!\nScore: Player 1 = 0, Player 2 = 2\n\n--- Round 3 ---\nPlayer 1 rolls: 5\nPlayer 2 rolls: 2\nPlayer 1 wins this round!\nScore: Player 1 = 1, Player 2 = 2\n\n--- Round 4 ---\nPlayer 1 rolls: 6\nPlayer 2 rolls: 6\nDraw! No one gets a point.\nScore: Player 1 = 1, Player 2 = 2\n\n--- Round 5 ---\nPlayer 1 rolls: 3\nPlayer 2 rolls: 2\nPlayer 1 wins this round!\nScore: Player 1 = 2, Player 2 = 2\n\n--- Round 6 ---\nPlayer 1 rolls: 6\nPlayer 2 rolls: 6\nDraw! No one gets a point.\nScore: Player 1 = 2, Player 2 = 2\n\n--- Round 7 ---\nPlayer 1 rolls: 2\nPlayer 2 rolls: 3\nPlayer 2 wins this round!\nScore: Player 1 = 2, Player 2 = 3\n\n========================================\n🏆 GAME OVER: Player 2 wins the game! (3-2)\n========================================\n\n📊 Analysis:\nTotal rounds played: 7\nPlayer 2 had better results - likely using the loaded die! 🎲\n","stderr":"","return_code":0,"content":[]}}}
|
|
196
|
-
{"type":"content_block_stop","index":0}
|
|
197
|
-
{"type":"content_block_start","index":1,"content_block":{"type":"text","text":""}}
|
|
198
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"##"}}
|
|
199
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" Game"}}
|
|
200
|
-
{"type":"ping"}
|
|
201
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" Results"}}
|
|
202
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"\n\n**Player 2"}}
|
|
203
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" wins the game "}}
|
|
204
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"3-2!**"}}
|
|
205
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" 🏆\n\nThe"}}
|
|
206
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" game laste"}}
|
|
207
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d 7 rounds with"}}
|
|
208
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the"}}
|
|
209
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" following breakdown"}}
|
|
210
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":":\n- **"}}
|
|
211
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"Player"}}
|
|
212
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" 1**:"}}
|
|
213
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" 2"}}
|
|
214
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" roun"}}
|
|
215
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d wins"}}
|
|
216
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"\n- **Player 2**: 3"}}
|
|
217
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" round wins "}}
|
|
218
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"\n- **"}}
|
|
219
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"Draws"}}
|
|
220
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"**: 2 rounds"}}
|
|
221
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" (both"}}
|
|
222
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" rolling"}}
|
|
223
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" 6"}}
|
|
224
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":")\n\nBase"}}
|
|
225
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d on the results"}}
|
|
226
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":","}}
|
|
227
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" **"}}
|
|
228
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"Player 2 "}}
|
|
229
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"appears"}}
|
|
230
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" to be the one"}}
|
|
231
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" using the loaded die**,"}}
|
|
232
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" as they"}}
|
|
233
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" manage"}}
|
|
234
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d to win the"}}
|
|
235
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" game"}}
|
|
236
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" an"}}
|
|
237
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d had slightly"}}
|
|
238
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" better overall"}}
|
|
239
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" results."}}
|
|
240
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" Player"}}
|
|
241
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" 2"}}
|
|
242
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" rolle"}}
|
|
243
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d high"}}
|
|
244
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" numbers"}}
|
|
245
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" consistently"}}
|
|
246
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":","}}
|
|
247
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" including"}}
|
|
248
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" multiple"}}
|
|
249
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" 6s"}}
|
|
250
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":","}}
|
|
251
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" which helped them secure"}}
|
|
252
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the victory.\n\nThe"}}
|
|
253
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" game was"}}
|
|
254
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" actually"}}
|
|
255
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" quite competitive"}}
|
|
256
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" despite"}}
|
|
257
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the cheating,"}}
|
|
258
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" with Player 1"}}
|
|
259
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" managing"}}
|
|
260
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" to win 2 rounds an"}}
|
|
261
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d the"}}
|
|
262
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" score"}}
|
|
263
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" being tied "}}
|
|
264
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"2-2 before"}}
|
|
265
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" Player 2 won"}}
|
|
266
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the decisive"}}
|
|
267
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" "}}
|
|
268
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"7"}}
|
|
269
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"th round with"}}
|
|
270
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" a roll"}}
|
|
271
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" of 3"}}
|
|
272
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" "}}
|
|
273
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"against"}}
|
|
274
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" Player 1's 2"}}
|
|
275
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"."}}
|
|
276
|
-
{"type":"content_block_stop","index":1}
|
|
277
|
-
{"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":4551,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":197,"server_tool_use":{"web_search_requests":0}}}
|
|
278
|
-
{"type":"message_stop"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"model": "claude-sonnet-4-5-20250929",
|
|
3
|
-
"id": "msg_01LPPbjvqcSgBPfApMEiJ4qv",
|
|
4
|
-
"type": "message",
|
|
5
|
-
"role": "assistant",
|
|
6
|
-
"content": [
|
|
7
|
-
{
|
|
8
|
-
"type": "text",
|
|
9
|
-
"text": "I'll help you simulate this dice game between two players! Let me run the game where both players roll dice each round until one player wins 3 rounds."
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"type": "server_tool_use",
|
|
13
|
-
"id": "srvtoolu_01CberhXc9TgYXrCZU8bQoks",
|
|
14
|
-
"name": "code_execution",
|
|
15
|
-
"input": {
|
|
16
|
-
"code": "\nimport asyncio\n\nasync def main():\n player1_wins = 0\n player2_wins = 0\n round_num = 0\n \n print(\"=\" * 60)\n print(\"DICE GAME: First to 3 Round Wins\")\n print(\"=\" * 60)\n print()\n \n while player1_wins < 3 and player2_wins < 3:\n round_num += 1\n print(f\"Round {round_num}:\")\n \n # Both players roll simultaneously\n results = await asyncio.gather(\n rollDie({\"player\": \"player1\"}),\n rollDie({\"player\": \"player2\"})\n )\n \n roll1 = int(results[0])\n roll2 = int(results[1])\n \n print(f\" Player 1 rolls: {roll1}\")\n print(f\" Player 2 rolls: {roll2}\")\n \n # Determine winner\n if roll1 > roll2:\n player1_wins += 1\n print(f\" → Player 1 wins this round!\")\n elif roll2 > roll1:\n player2_wins += 1\n print(f\" → Player 2 wins this round!\")\n else:\n print(f\" → Draw! No points awarded.\")\n \n print(f\" Score: Player 1: {player1_wins} | Player 2: {player2_wins}\")\n print()\n \n print(\"=\" * 60)\n if player1_wins == 3:\n print(\"🏆 PLAYER 1 WINS THE GAME!\")\n else:\n print(\"🏆 PLAYER 2 WINS THE GAME!\")\n print(f\"Final Score: Player 1: {player1_wins} | Player 2: {player2_wins}\")\n print(f\"Total Rounds: {round_num}\")\n print(\"=\" * 60)\n\nasyncio.run(main())\n"
|
|
17
|
-
},
|
|
18
|
-
"caller": {
|
|
19
|
-
"type": "direct"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"type": "tool_use",
|
|
24
|
-
"id": "toolu_01PMcE1JBKCeLjn83cgUCvR5",
|
|
25
|
-
"name": "rollDie",
|
|
26
|
-
"input": {
|
|
27
|
-
"player": "player2"
|
|
28
|
-
},
|
|
29
|
-
"caller": {
|
|
30
|
-
"type": "code_execution_20250825",
|
|
31
|
-
"tool_id": "srvtoolu_01CberhXc9TgYXrCZU8bQoks"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"type": "tool_use",
|
|
36
|
-
"id": "toolu_01MZf5QJ1EQyd2yGyeLzBxAS",
|
|
37
|
-
"name": "rollDie",
|
|
38
|
-
"input": {
|
|
39
|
-
"player": "player1"
|
|
40
|
-
},
|
|
41
|
-
"caller": {
|
|
42
|
-
"type": "code_execution_20250825",
|
|
43
|
-
"tool_id": "srvtoolu_01CberhXc9TgYXrCZU8bQoks"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"type": "tool_use",
|
|
48
|
-
"id": "toolu_01T7Upuuv8C71nq7DZ9ZPNQW",
|
|
49
|
-
"name": "rollDie",
|
|
50
|
-
"input": {
|
|
51
|
-
"player": "player1"
|
|
52
|
-
},
|
|
53
|
-
"caller": {
|
|
54
|
-
"type": "code_execution_20250825",
|
|
55
|
-
"tool_id": "srvtoolu_01CberhXc9TgYXrCZU8bQoks"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"type": "tool_use",
|
|
60
|
-
"id": "toolu_016Da1tDet9Bf7dAdYTkF5Ar",
|
|
61
|
-
"name": "rollDie",
|
|
62
|
-
"input": {
|
|
63
|
-
"player": "player2"
|
|
64
|
-
},
|
|
65
|
-
"caller": {
|
|
66
|
-
"type": "code_execution_20250825",
|
|
67
|
-
"tool_id": "srvtoolu_01CberhXc9TgYXrCZU8bQoks"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"type": "code_execution_tool_result",
|
|
72
|
-
"tool_use_id": "srvtoolu_01CberhXc9TgYXrCZU8bQoks",
|
|
73
|
-
"content": {
|
|
74
|
-
"type": "code_execution_result",
|
|
75
|
-
"stdout": "============================================================\nDICE GAME: First to 3 Round Wins\n============================================================\n\nRound 1:\n Player 1 rolls: 6\n Player 2 rolls: 6\n → Draw! No points awarded.\n Score: Player 1: 0 | Player 2: 0\n\nRound 2:\n Player 1 rolls: 5\n Player 2 rolls: 4\n → Player 1 wins this round!\n Score: Player 1: 1 | Player 2: 0\n\nRound 3:\n Player 1 rolls: 6\n Player 2 rolls: 4\n → Player 1 wins this round!\n Score: Player 1: 2 | Player 2: 0\n\nRound 4:\n Player 1 rolls: 6\n Player 2 rolls: 3\n → Player 1 wins this round!\n Score: Player 1: 3 | Player 2: 0\n\n============================================================\n🏆 PLAYER 1 WINS THE GAME!\nFinal Score: Player 1: 3 | Player 2: 0\nTotal Rounds: 4\n============================================================\n",
|
|
76
|
-
"stderr": "",
|
|
77
|
-
"return_code": 0,
|
|
78
|
-
"content": []
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "text",
|
|
83
|
-
"text": "**Game Over!** \n\nPlayer 1 dominated this game with a decisive 3-0 victory! Looking at the rolls:\n- **Round 1**: Both rolled 6 (Draw)\n- **Round 2**: Player 1 (5) beat Player 2 (4)\n- **Round 3**: Player 1 (6) beat Player 2 (4)\n- **Round 4**: Player 1 (6) beat Player 2 (3)\n\nBased on these results, it appears **Player 1 is likely the one with the loaded die** - they rolled 6 three times out of four rolls (including the draw), and consistently rolled high numbers (5, 6, 6, 6). Player 2's rolls were more varied and lower (6, 4, 4, 3), which looks more like a fair die distribution.\n\nThe loaded die gave Player 1 a significant advantage, allowing them to win the game without Player 2 scoring a single round!"
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
"container": {
|
|
87
|
-
"id": "container_011CWHQB57xVregfCMPrKgew",
|
|
88
|
-
"expires_at": "2025-12-20T05:43:56.821156Z"
|
|
89
|
-
},
|
|
90
|
-
"stop_reason": "end_turn",
|
|
91
|
-
"stop_sequence": null,
|
|
92
|
-
"usage": {
|
|
93
|
-
"input_tokens": 4243,
|
|
94
|
-
"cache_creation_input_tokens": 0,
|
|
95
|
-
"cache_read_input_tokens": 0,
|
|
96
|
-
"cache_creation": {
|
|
97
|
-
"ephemeral_5m_input_tokens": 0,
|
|
98
|
-
"ephemeral_1h_input_tokens": 0
|
|
99
|
-
},
|
|
100
|
-
"output_tokens": 229,
|
|
101
|
-
"service_tier": "standard",
|
|
102
|
-
"server_tool_use": {
|
|
103
|
-
"web_search_requests": 0
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01GE2RKp1VYsPzdFs3sS9z5S","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":565,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":7,"service_tier":"standard"}}}
|
|
2
|
-
{"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
|
|
3
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"I'll update the issue list for"}}
|
|
4
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" you."}}
|
|
5
|
-
{"type":"ping"}
|
|
6
|
-
{"type":"content_block_stop","index":0}
|
|
7
|
-
{"type":"ping"}
|
|
8
|
-
{"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_01QE1WLsSVp5hy5Q3GmGTmjP","name":"updateIssueList","input":{}}}
|
|
9
|
-
{"type":"ping"}
|
|
10
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""}}
|
|
11
|
-
{"type":"content_block_stop","index":1}
|
|
12
|
-
{"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":565,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":48}}
|
|
13
|
-
{"type":"message_stop"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"model": "claude-3-opus-20240229",
|
|
3
|
-
"id": "msg_01GCBaV8gyWAYgMVggRqZbuQ",
|
|
4
|
-
"type": "message",
|
|
5
|
-
"role": "assistant",
|
|
6
|
-
"content": [
|
|
7
|
-
{
|
|
8
|
-
"type": "text",
|
|
9
|
-
"text": "<thinking>\nThe updateIssueList tool was provided in the list of available functions. The tool has no required parameters, so it can be called without any additional information needed from the user.\n</thinking>\n\nOkay, I will update the current issue list:"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"type": "tool_use",
|
|
13
|
-
"id": "toolu_01LRmxn9vGM1d2DZSDBowdZ1",
|
|
14
|
-
"name": "updateIssueList",
|
|
15
|
-
"input": {}
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"stop_reason": "tool_use",
|
|
19
|
-
"stop_sequence": null,
|
|
20
|
-
"usage": {
|
|
21
|
-
"input_tokens": 602,
|
|
22
|
-
"cache_creation_input_tokens": 0,
|
|
23
|
-
"cache_read_input_tokens": 0,
|
|
24
|
-
"cache_creation": {
|
|
25
|
-
"ephemeral_5m_input_tokens": 0,
|
|
26
|
-
"ephemeral_1h_input_tokens": 0
|
|
27
|
-
},
|
|
28
|
-
"output_tokens": 93,
|
|
29
|
-
"service_tier": "standard"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_011bqgzot9grwdetCByUmXRP","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":699,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard"}}}
|
|
2
|
-
{"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
|
|
3
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"I'll search for a"}}
|
|
4
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" weather"}}
|
|
5
|
-
{"type":"ping"}
|
|
6
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"-"}}
|
|
7
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"related tool"}}
|
|
8
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" to help"}}
|
|
9
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" you get the weather"}}
|
|
10
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" information for San Francisco."}}
|
|
11
|
-
{"type":"content_block_stop","index":0}
|
|
12
|
-
{"type":"content_block_start","index":1,"content_block":{"type":"server_tool_use","id":"srvtoolu_01Gj33J3YUAAxF9TWRAThxtu","name":"tool_search_tool_bm25","input":{},"caller":{"type":"direct"}}}
|
|
13
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""}}
|
|
14
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"query\": \"weather forecast current"}}
|
|
15
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" conditions"}}
|
|
16
|
-
{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\"}"}}
|
|
17
|
-
{"type":"content_block_stop","index":1}
|
|
18
|
-
{"type":"content_block_start","index":2,"content_block":{"type":"tool_search_tool_result","tool_use_id":"srvtoolu_01Gj33J3YUAAxF9TWRAThxtu","content":{"type":"tool_search_tool_search_result","tool_references":[{"type":"tool_reference","tool_name":"get_weather"}]}}}
|
|
19
|
-
{"type":"content_block_stop","index":2}
|
|
20
|
-
{"type":"content_block_start","index":3,"content_block":{"type":"text","text":""}}
|
|
21
|
-
{"type":"content_block_delta","index":3,"delta":{"type":"text_delta","text":"Great"}}
|
|
22
|
-
{"type":"content_block_delta","index":3,"delta":{"type":"text_delta","text":"! I found a weather tool."}}
|
|
23
|
-
{"type":"content_block_delta","index":3,"delta":{"type":"text_delta","text":" Let me get the current weather for"}}
|
|
24
|
-
{"type":"content_block_delta","index":3,"delta":{"type":"text_delta","text":" San Francisco."}}
|
|
25
|
-
{"type":"content_block_stop","index":3}
|
|
26
|
-
{"type":"content_block_start","index":4,"content_block":{"type":"tool_use","id":"toolu_019nRrfqqXcU5NPTUSYfEMAY","name":"get_weather","input":{},"caller":{"type":"direct"}}}
|
|
27
|
-
{"type":"content_block_delta","index":4,"delta":{"type":"input_json_delta","partial_json":""}}
|
|
28
|
-
{"type":"content_block_delta","index":4,"delta":{"type":"input_json_delta","partial_json":"{\"location\": \"San"}}
|
|
29
|
-
{"type":"content_block_delta","index":4,"delta":{"type":"input_json_delta","partial_json":" Francisco, CA"}}
|
|
30
|
-
{"type":"content_block_delta","index":4,"delta":{"type":"input_json_delta","partial_json":"\"}"}}
|
|
31
|
-
{"type":"content_block_stop","index":4}
|
|
32
|
-
{"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":1630,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":158,"server_tool_use":{"web_search_requests":0}}}
|
|
33
|
-
{"type":"message_stop"}
|
|
34
|
-
{"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_0132hQ7tpsGJhdPtEBhmKA2R","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1040,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}}
|
|
35
|
-
{"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
|
|
36
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"The"}}
|
|
37
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" current"}}
|
|
38
|
-
{"type":"ping"}
|
|
39
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" weather in San Francisco,"}}
|
|
40
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" CA is:\n- **Temperature:**"}}
|
|
41
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" 64°F"}}
|
|
42
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n- **Condition:** Partly clou"}}
|
|
43
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"dy\n- **Humidity:** "}}
|
|
44
|
-
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"65%"}}
|
|
45
|
-
{"type":"content_block_stop","index":0}
|
|
46
|
-
{"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":1040,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":41}}
|
|
47
|
-
{"type":"message_stop"}
|