Skip to content

Commit c4715e9

Browse files
authored
Fix leaked test token (#159)
1 parent 61cce92 commit c4715e9

14 files changed

+864
-906
lines changed

tests/chat/cassettes/test_completions/test_bad_values_tool_choice[foo].yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

tests/chat/cassettes/test_completions/test_chat.yaml

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ interactions:
88
- '*/*'
99
accept-encoding:
1010
- gzip, deflate, zstd
11-
authorization:
12-
- Bearer t1.9euelZqWlp2bxpiUmZuLl57Lz8yMjO3rnpWalM3InMbJl5qUmJnHmcfPzsnl8_cXWF85-e9wPgBV_t3z91cGXTn573A-AFX-zef1656VmpHMi8vNmY2YjI_OjpWYncaM7_zF656VmpHMi8vNmY2YjI_OjpWYncaMveuelZrHy5fHis2MjY-dzIyJnJXIkrXrhpzRlp6S0ZCPmpGWm9KMmo2Jmo0.G0eyVx1OQ_yLFHLGkNV9gUPu64rm0aIT2-Hdbo-LGa5pwM7KetKWhD9ZTXg-Sg6L6CH_kW8Ay1LzAaQON5OfAw
1311
connection:
1412
- keep-alive
1513
content-length:
@@ -21,116 +19,113 @@ interactions:
2119
user-agent:
2220
- yandex-cloud-ml-sdk/0.15.0 python/3.12
2321
x-client-request-id:
24-
- 5a3fcf89-bb93-4e61-9379-61227d23bd28
22+
- ca26e2bd-4512-4f84-9ff3-dddeccdc19cc
2523
method: POST
2624
uri: https://llm.api.cloud.yandex.net/v1/chat/completions
2725
response:
2826
body:
29-
string: "{\"id\":\"chatcmpl-2ee9e39e-6ceb-4c70-93e1-a29034b09534\",\"object\":\"chat.completion\",\"created\":1757951686,\"model\":\"gpt://qwen3-235b-a22b-fp8/latest\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Hello!
30-
My name is Arkadiy. How can I assist you today? \U0001F60A\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":26,\"total_tokens\":45,\"completion_tokens\":19}}\n"
27+
string: '{"id":"chatcmpl-85657f30-f241-4ca7-8c7d-997847da8d14","object":"chat.completion","created":1758047032,"model":"gpt://qwen3-235b-a22b-fp8/latest","choices":[{"index":0,"message":{"role":"assistant","content":"Hello!
28+
My name is Arkadiy. How can I assist you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":26,"total_tokens":43,"completion_tokens":17}}
29+
30+
'
3131
headers:
3232
content-length:
33-
- '366'
33+
- '361'
3434
content-type:
3535
- application/json
3636
date:
37-
- Mon, 15 Sep 2025 15:54:46 GMT
37+
- Tue, 16 Sep 2025 18:23:52 GMT
3838
server:
3939
- ycalb
4040
x-server-trace-id:
41-
- a2fbc7955280d426:7d558323c079506f:a2fbc7955280d426:1
41+
- f8fee64327159451:5b33a7935c9b62d3:f8fee64327159451:1
4242
status:
4343
code: 200
4444
message: OK
4545
- request:
46-
body: "{\"model\":\"gpt://b1ghsjum2v37c2un8h64/qwen3-235b-a22b-fp8/latest\",\"messages\":[{\"content\":\"Your
47-
name is Arkadiy\",\"role\":\"system\"},{\"role\":\"user\",\"content\":\"Hello!
48-
how is your name?\"},{\"content\":\"Hello! My name is Arkadiy. How can I assist
49-
you today? \U0001F60A\",\"role\":\"assistant\"},{\"role\":\"user\",\"content\":\"My
50-
name is Andrew\"}],\"stream\":false}"
46+
body: '{"model":"gpt://b1ghsjum2v37c2un8h64/qwen3-235b-a22b-fp8/latest","messages":[{"content":"Your
47+
name is Arkadiy","role":"system"},{"role":"user","content":"Hello! how is your
48+
name?"},{"content":"Hello! My name is Arkadiy. How can I assist you today?","role":"assistant"},{"role":"user","content":"My
49+
name is Andrew"}],"stream":false}'
5150
headers:
5251
accept:
5352
- '*/*'
5453
accept-encoding:
5554
- gzip, deflate, zstd
56-
authorization:
57-
- Bearer t1.9euelZqWlp2bxpiUmZuLl57Lz8yMjO3rnpWalM3InMbJl5qUmJnHmcfPzsnl8_cXWF85-e9wPgBV_t3z91cGXTn573A-AFX-zef1656VmpHMi8vNmY2YjI_OjpWYncaM7_zF656VmpHMi8vNmY2YjI_OjpWYncaMveuelZrHy5fHis2MjY-dzIyJnJXIkrXrhpzRlp6S0ZCPmpGWm9KMmo2Jmo0.G0eyVx1OQ_yLFHLGkNV9gUPu64rm0aIT2-Hdbo-LGa5pwM7KetKWhD9ZTXg-Sg6L6CH_kW8Ay1LzAaQON5OfAw
5855
connection:
5956
- keep-alive
6057
content-length:
61-
- '336'
58+
- '331'
6259
content-type:
6360
- application/json
6461
host:
6562
- llm.api.cloud.yandex.net
6663
user-agent:
6764
- yandex-cloud-ml-sdk/0.15.0 python/3.12
6865
x-client-request-id:
69-
- 24ae7c12-ca25-4764-9b37-d3848f67cd81
66+
- 9c6306a9-0642-44ce-966e-73d2780cc99d
7067
method: POST
7168
uri: https://llm.api.cloud.yandex.net/v1/chat/completions
7269
response:
7370
body:
74-
string: "{\"id\":\"chatcmpl-26c17979-ed03-414d-b613-6a2a5bc7ba03\",\"object\":\"chat.completion\",\"created\":1757951686,\"model\":\"gpt://qwen3-235b-a22b-fp8/latest\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Nice
75-
to meet you, Andrew! \U0001F60A How can I help you today?\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":58,\"total_tokens\":75,\"completion_tokens\":17}}\n"
71+
string: "{\"id\":\"chatcmpl-42a8ab7f-5815-4057-b7a3-7ee83ab24cfc\",\"object\":\"chat.completion\",\"created\":1758047032,\"model\":\"gpt://qwen3-235b-a22b-fp8/latest\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Nice
72+
to meet you, Andrew! How can I help you today? \U0001F60A\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":56,\"total_tokens\":73,\"completion_tokens\":17}}\n"
7673
headers:
7774
content-length:
7875
- '363'
7976
content-type:
8077
- application/json
8178
date:
82-
- Mon, 15 Sep 2025 15:54:46 GMT
79+
- Tue, 16 Sep 2025 18:23:52 GMT
8380
server:
8481
- ycalb
8582
x-server-trace-id:
86-
- 73cf81250d9fc777:1cd7ffa5c15e8f0:73cf81250d9fc777:1
83+
- ad23b0344dc1e85a:33ae397b3a763541:ad23b0344dc1e85a:1
8784
status:
8885
code: 200
8986
message: OK
9087
- request:
9188
body: "{\"model\":\"gpt://b1ghsjum2v37c2un8h64/qwen3-235b-a22b-fp8/latest\",\"messages\":[{\"content\":\"Your
9289
name is Arkadiy\",\"role\":\"system\"},{\"role\":\"user\",\"content\":\"Hello!
9390
how is your name?\"},{\"content\":\"Hello! My name is Arkadiy. How can I assist
94-
you today? \U0001F60A\",\"role\":\"assistant\"},{\"role\":\"user\",\"content\":\"My
95-
name is Andrew\"},{\"content\":\"Nice to meet you, Andrew! \U0001F60A How can
96-
I help you today?\",\"role\":\"assistant\"},{\"role\":\"user\",\"content\":\"What
97-
is my name?\"}],\"stream\":false}"
91+
you today?\",\"role\":\"assistant\"},{\"role\":\"user\",\"content\":\"My name
92+
is Andrew\"},{\"content\":\"Nice to meet you, Andrew! How can I help you today?
93+
\U0001F60A\",\"role\":\"assistant\"},{\"role\":\"user\",\"content\":\"What is
94+
my name?\"}],\"stream\":false}"
9895
headers:
9996
accept:
10097
- '*/*'
10198
accept-encoding:
10299
- gzip, deflate, zstd
103-
authorization:
104-
- Bearer t1.9euelZqWlp2bxpiUmZuLl57Lz8yMjO3rnpWalM3InMbJl5qUmJnHmcfPzsnl8_cXWF85-e9wPgBV_t3z91cGXTn573A-AFX-zef1656VmpHMi8vNmY2YjI_OjpWYncaM7_zF656VmpHMi8vNmY2YjI_OjpWYncaMveuelZrHy5fHis2MjY-dzIyJnJXIkrXrhpzRlp6S0ZCPmpGWm9KMmo2Jmo0.G0eyVx1OQ_yLFHLGkNV9gUPu64rm0aIT2-Hdbo-LGa5pwM7KetKWhD9ZTXg-Sg6L6CH_kW8Ay1LzAaQON5OfAw
105100
connection:
106101
- keep-alive
107102
content-length:
108-
- '471'
103+
- '466'
109104
content-type:
110105
- application/json
111106
host:
112107
- llm.api.cloud.yandex.net
113108
user-agent:
114109
- yandex-cloud-ml-sdk/0.15.0 python/3.12
115110
x-client-request-id:
116-
- d26dea55-8f0c-4f20-a771-ac77db321a2b
111+
- 617fa32a-c623-4044-a464-513f7e646c52
117112
method: POST
118113
uri: https://llm.api.cloud.yandex.net/v1/chat/completions
119114
response:
120115
body:
121-
string: "{\"id\":\"chatcmpl-985ce6ba-8160-4c52-b6c7-466c9e470bf5\",\"object\":\"chat.completion\",\"created\":1757951687,\"model\":\"gpt://qwen3-235b-a22b-fp8/latest\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Your
122-
name is Andrew! \U0001F60A\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":89,\"total_tokens\":97,\"completion_tokens\":8}}\n"
116+
string: "{\"id\":\"chatcmpl-a4b0ce9a-03e8-46e9-a073-8470c8e6be08\",\"object\":\"chat.completion\",\"created\":1758047033,\"model\":\"gpt://qwen3-235b-a22b-fp8/latest\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Your
117+
name is Andrew! \U0001F60A\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":87,\"total_tokens\":95,\"completion_tokens\":8}}\n"
123118
headers:
124119
content-length:
125120
- '331'
126121
content-type:
127122
- application/json
128123
date:
129-
- Mon, 15 Sep 2025 15:54:47 GMT
124+
- Tue, 16 Sep 2025 18:23:53 GMT
130125
server:
131126
- ycalb
132127
x-server-trace-id:
133-
- 3f621a2346607f53:8798599acd908a22:3f621a2346607f53:1
128+
- 167e3770605d425e:7472ec987c168542:167e3770605d425e:1
134129
status:
135130
code: 200
136131
message: OK

tests/chat/cassettes/test_completions/test_function_call.yaml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ interactions:
99
- '*/*'
1010
accept-encoding:
1111
- gzip, deflate, zstd
12-
authorization:
13-
- Bearer t1.9euelZqWlp2bxpiUmZuLl57Lz8yMjO3rnpWalM3InMbJl5qUmJnHmcfPzsnl8_cXWF85-e9wPgBV_t3z91cGXTn573A-AFX-zef1656VmpHMi8vNmY2YjI_OjpWYncaM7_zF656VmpHMi8vNmY2YjI_OjpWYncaMveuelZrHy5fHis2MjY-dzIyJnJXIkrXrhpzRlp6S0ZCPmpGWm9KMmo2Jmo0.G0eyVx1OQ_yLFHLGkNV9gUPu64rm0aIT2-Hdbo-LGa5pwM7KetKWhD9ZTXg-Sg6L6CH_kW8Ay1LzAaQON5OfAw
1412
connection:
1513
- keep-alive
1614
content-length:
@@ -22,12 +20,12 @@ interactions:
2220
user-agent:
2321
- yandex-cloud-ml-sdk/0.15.0 python/3.12
2422
x-client-request-id:
25-
- 0567acea-6d36-43fd-a9fe-8413785acbb9
23+
- 104f04a8-1970-4f03-988d-ba17a0f9680c
2624
method: POST
2725
uri: https://llm.api.cloud.yandex.net/v1/chat/completions
2826
response:
2927
body:
30-
string: '{"id":"d5ef1f8c-652e-4c53-ada8-6d748b5808b6","object":"chat.completion","created":1757951688,"model":"gpt://b1ghsjum2v37c2un8h64/yandexgpt/latest","choices":[{"index":0,"message":{"role":"assistant","content":"","tool_calls":[{"index":0,"id":"something","type":"function","function":{"name":"something","arguments":"{\"numbers\":[5,4,1]}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":100,"total_tokens":114,"completion_tokens":14}}
28+
string: '{"id":"1a3cd092-9640-4d03-9116-deec2c69bd72","object":"chat.completion","created":1758047034,"model":"gpt://b1ghsjum2v37c2un8h64/yandexgpt/latest","choices":[{"index":0,"message":{"role":"assistant","content":"","tool_calls":[{"index":0,"id":"something","type":"function","function":{"name":"something","arguments":"{\"numbers\":[5,4,1]}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":100,"total_tokens":114,"completion_tokens":14}}
3129
3230
'
3331
headers:
@@ -36,15 +34,15 @@ interactions:
3634
content-type:
3735
- application/json
3836
date:
39-
- Mon, 15 Sep 2025 15:54:48 GMT
37+
- Tue, 16 Sep 2025 18:23:54 GMT
4038
server:
4139
- ycalb
4240
x-client-request-id:
43-
- 0567acea-6d36-43fd-a9fe-8413785acbb9
41+
- 104f04a8-1970-4f03-988d-ba17a0f9680c
4442
x-request-id:
45-
- 5255a16b-e5e7-4acd-943a-30c79cb11050
43+
- e971b99d-f904-4fd2-a911-9139d824d259
4644
x-server-trace-id:
47-
- 124a38f19dd92e4f:503d1158efd4e39:124a38f19dd92e4f:1
45+
- 81ea8b747bd0d880:286ceffecda263d8:81ea8b747bd0d880:1
4846
status:
4947
code: 200
5048
message: OK
@@ -58,8 +56,6 @@ interactions:
5856
- '*/*'
5957
accept-encoding:
6058
- gzip, deflate, zstd
61-
authorization:
62-
- Bearer t1.9euelZqWlp2bxpiUmZuLl57Lz8yMjO3rnpWalM3InMbJl5qUmJnHmcfPzsnl8_cXWF85-e9wPgBV_t3z91cGXTn573A-AFX-zef1656VmpHMi8vNmY2YjI_OjpWYncaM7_zF656VmpHMi8vNmY2YjI_OjpWYncaMveuelZrHy5fHis2MjY-dzIyJnJXIkrXrhpzRlp6S0ZCPmpGWm9KMmo2Jmo0.G0eyVx1OQ_yLFHLGkNV9gUPu64rm0aIT2-Hdbo-LGa5pwM7KetKWhD9ZTXg-Sg6L6CH_kW8Ay1LzAaQON5OfAw
6359
connection:
6460
- keep-alive
6561
content-length:
@@ -71,12 +67,12 @@ interactions:
7167
user-agent:
7268
- yandex-cloud-ml-sdk/0.15.0 python/3.12
7369
x-client-request-id:
74-
- 1a13e16d-a129-4579-a92d-91dad64a9c7b
70+
- 46c3501b-b356-4230-94e7-0ad51b842398
7571
method: POST
7672
uri: https://llm.api.cloud.yandex.net/v1/chat/completions
7773
response:
7874
body:
79-
string: '{"id":"a24b0c4c-26b5-49ac-8763-6d32ce420680","object":"chat.completion","created":1757951688,"model":"gpt://b1ghsjum2v37c2un8h64/yandexgpt/latest","choices":[{"index":0,"message":{"role":"assistant","content":"The
75+
string: '{"id":"3b89a22a-60e0-4707-8059-3c9bf1919a1b","object":"chat.completion","created":1758047035,"model":"gpt://b1ghsjum2v37c2un8h64/yandexgpt/latest","choices":[{"index":0,"message":{"role":"assistant","content":"The
8076
result of the operation performed by the tool on the numbers [5, 4, 1] is
8177
+20.0."},"finish_reason":"stop"}],"usage":{"prompt_tokens":130,"total_tokens":158,"completion_tokens":28}}
8278
@@ -87,15 +83,15 @@ interactions:
8783
content-type:
8884
- application/json
8985
date:
90-
- Mon, 15 Sep 2025 15:54:48 GMT
86+
- Tue, 16 Sep 2025 18:23:55 GMT
9187
server:
9288
- ycalb
9389
x-client-request-id:
94-
- 1a13e16d-a129-4579-a92d-91dad64a9c7b
90+
- 46c3501b-b356-4230-94e7-0ad51b842398
9591
x-request-id:
96-
- 8710b8a5-f823-4f4b-91e4-f43cb8497891
92+
- 9d00b6ba-ea3a-44d1-83ad-dfc256d9a188
9793
x-server-trace-id:
98-
- b729c273dfa0d799:b06551a059e0ae74:b729c273dfa0d799:1
94+
- 2901457e11ed83b0:a552443c375b09d3:2901457e11ed83b0:1
9995
status:
10096
code: 200
10197
message: OK

tests/chat/cassettes/test_completions/test_multimodal.yaml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ interactions:
77
- '*/*'
88
accept-encoding:
99
- gzip, deflate, zstd
10-
authorization:
11-
- Bearer t1.9euelZrKjJORx5OLm5yeiseNmsuKke3rnpWalM3InMbJl5qUmJnHmcfPzsnl8_dFHFo5-e92cFNT_d3z9wVLVzn573ZwU1P9zef1656Vmp7Ik4yMx4nMjsiPlJvKyIma7_zF656Vmp7Ik4yMx4nMjsiPlJvKyImaveuelZqJjo_MkZ2WyI6bzJCYk4yXz7XrhpzRlp6S0ZCPmpGWm9KMmo2Jmo0._uBa0UALhuAPdknWaHJdWrE1R8e9c9TA-bAZzBwjL-Kao5U3-2wM_UThPVLrWmlY5Ei1LLYJRZAvjARfvLd1BQ
1210
connection:
1311
- keep-alive
1412
content-length:
@@ -20,36 +18,32 @@ interactions:
2018
user-agent:
2119
- yandex-cloud-ml-sdk/0.15.0 python/3.12
2220
x-client-request-id:
23-
- f274eb16-096c-4c33-b813-b976ef1fc98d
21+
- b26d50fe-d2a9-4acc-9539-65718de6d214
2422
method: POST
2523
uri: https://llm.api.cloud.yandex.net/v1/chat/completions
2624
response:
2725
body:
28-
string: "{\"id\":\"chatcmpl-b5792776-fe99-4889-8e03-d5619e6213ef\",\"object\":\"chat.completion\",\"created\":1758044878,\"model\":\"gpt://gemma-3-27b-it/latest\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"The
29-
image depicts a highly detailed LEGO replica of a computer case, specifically
30-
a high-end gaming PC. \\n\\nHere are the key features visible:\\n\\n* **Open
31-
Case:** The LEGO computer case is designed to be open, showcasing the internal
32-
components.\\n* **Detailed Internals:** The interior is filled with LEGO
33-
bricks configured to resemble components like a motherboard, CPU, cooler,
34-
graphics card, RAM, and power supply. \\n* **Circular Component:** There\u2019s
35-
a circular element in the center, likely representing a fan or cooler.\\n*
36-
\ **Realistic Build:** The creator has clearly put a lot of work into making
37-
it look like a real computer, with accurate placement and color-coding of
38-
the LEGO bricks. \\n* **Background:** There is a plant and wooden paneling
39-
in the background.\\n\\nIt is an impressive model built entirely from LEGO
40-
bricks, demonstrating the builder's attention to detail and understanding
41-
of computer hardware.\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":276,\"total_tokens\":472,\"completion_tokens\":196}}\n"
26+
string: '{"id":"chatcmpl-dcfb0b8e-e3d4-45cf-8713-d4cf45e22458","object":"chat.completion","created":1758047037,"model":"gpt://gemma-3-27b-it/latest","choices":[{"index":0,"message":{"role":"assistant","content":"The
27+
image depicts a highly detailed **LEGO Technic model of a computer**. \n\nIt''s
28+
a complex build replicating the internal components of a desktop computer,
29+
including what appears to be a motherboard, CPU with cooler, graphics card,
30+
and power supply. The frame surrounding the components looks like a computer
31+
case. It''s a remarkably realistic and intricate LEGO creation! \n\nThere
32+
are also plants visible on the left side, and a blurred background of wood
33+
paneling."},"finish_reason":"stop"}],"usage":{"prompt_tokens":276,"total_tokens":372,"completion_tokens":96}}
34+
35+
'
4236
headers:
4337
content-length:
44-
- '1236'
38+
- '773'
4539
content-type:
4640
- application/json
4741
date:
48-
- Tue, 16 Sep 2025 17:48:06 GMT
42+
- Tue, 16 Sep 2025 18:24:01 GMT
4943
server:
5044
- ycalb
5145
x-server-trace-id:
52-
- 4113486ca509f33a:c182fc5027dd4d2f:4113486ca509f33a:1
46+
- 258e73912996318a:6ecdeda12706f85:258e73912996318a:1
5347
status:
5448
code: 200
5549
message: OK

0 commit comments

Comments
 (0)