File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -2235,11 +2235,13 @@ def test_message_to_generate_content_response_tool_call_with_thought_signature()
22352235 tool_calls = [
22362236 ChatCompletionMessageToolCall (
22372237 type = "function" ,
2238- id = f"test_tool_call_id__thought__ { encoded_signature } " ,
2238+ id = "test_tool_call_id " ,
22392239 function = Function (
22402240 name = "test_function" ,
22412241 arguments = '{"test_arg": "test_value"}' ,
22422242 ),
2243+ provider_specific_fields = {"thought_signature" : encoded_signature },
2244+ extra_content = {"google" : {"thought_signature" : encoded_signature }},
22432245 )
22442246 ],
22452247 )
@@ -2269,13 +2271,17 @@ async def test_content_to_message_param_embeds_thought_signature_in_tool_call():
22692271 tool_calls = message ["tool_calls" ]
22702272 assert tool_calls is not None
22712273 assert len (tool_calls ) == 1
2272- assert tool_calls [0 ][
2273- "id"
2274- ] == "test_tool_call_id__thought__" + base64 .b64encode (
2275- b"gemini_signature"
2276- ).decode (
2277- "utf-8"
2278- )
2274+ assert tool_calls [0 ]["id" ] == "test_tool_call_id"
2275+ assert tool_calls [0 ]["provider_specific_fields" ] == {
2276+ "thought_signature" : base64 .b64encode (b"gemini_signature" ).decode ("utf-8" )
2277+ }
2278+ assert tool_calls [0 ]["extra_content" ] == {
2279+ "google" : {
2280+ "thought_signature" : base64 .b64encode (b"gemini_signature" ).decode (
2281+ "utf-8"
2282+ )
2283+ }
2284+ }
22792285
22802286
22812287def test_message_to_generate_content_response_inline_tool_call_text ():
You can’t perform that action at this time.
0 commit comments