{ "test_id": "tests/integration/responses/test_tool_responses.py::test_response_mcp_tool_approval[client_with_models-txt=openai/gpt-4o-True-boiling_point_tool]", "request": { "method": "POST", "url": "https://api.openai.com/v1/v1/chat/completions", "headers": {}, "body": { "model": "gpt-4o", "messages": [ { "role": "user", "content": "What is the boiling point of myawesomeliquid in Celsius?" }, { "role": "assistant", "content": "", "tool_calls": [ { "index": 0, "id": "call_QT9el9cWM3ocv3YN4NCFJZuy", "type": "function", "function": { "name": "get_boiling_point", "arguments": "{\"liquid_name\":\"myawesomeliquid\",\"celsius\":true}" } } ] }, { "role": "tool", "tool_call_id": "call_QT9el9cWM3ocv3YN4NCFJZuy", "content": [ { "type": "text", "text": "-100" } ] } ], "stream": true, "stream_options": { "include_usage": true }, "tools": [ { "type": "function", "function": { "name": "greet_everyone", "parameters": { "properties": { "url": { "title": "Url", "type": "string" } }, "required": [ "url" ], "title": "greet_everyoneArguments", "type": "object" } } }, { "type": "function", "function": { "name": "get_boiling_point", "description": "\n Returns the boiling point of a liquid in Celsius or Fahrenheit.\n\n :param liquid_name: The name of the liquid\n :param celsius: Whether to return the boiling point in Celsius\n :return: The boiling point of the liquid in Celcius or Fahrenheit\n ", "parameters": { "properties": { "liquid_name": { "title": "Liquid Name", "type": "string" }, "celsius": { "default": true, "title": "Celsius", "type": "boolean" } }, "required": [ "liquid_name" ], "title": "get_boiling_pointArguments", "type": "object" } } } ] }, "endpoint": "/v1/chat/completions", "model": "gpt-4o" }, "response": { "body": [ { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "", "function_call": null, "refusal": null, "role": "assistant", "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "8wCAvn9jIVPDVq" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "The", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "B3zGv1Zt1I54X" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " boiling", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "Lu5Ru0Gx" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " point", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "jLWvCKUeH7" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " of", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "tcoJWvuxatr86" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " \"", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "D9BPuCjs8Ib2U" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "my", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "3p6936F4ZYNfbh" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "aw", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "7lZe7wSvUN4JmX" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "esom", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "qFQhXY8DcvNe" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "eli", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "LCz1ijbTtNtWh" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "quid", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "8Hy7hSwBWGmQ" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "\"", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "G06Q684BrYRaKp" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " in", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "9MkzPQ8Y2V6xd" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " Celsius", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "1Wt4LR0v" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " is", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "cYjtw9EWAGT6D" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": " -", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "wZyxIiRsvr77IL" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "100", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "Dw0RMjhu8Lmz7" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": "\u00b0C", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "fKxrtg0qmbmw9Y" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": ".", "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "beMJCfU0IhuAlVk" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": "stop", "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": null, "obfuscation": "XEirik2aa8" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-8e9268828874", "choices": [], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_f33640a400", "usage": { "completion_tokens": 19, "prompt_tokens": 195, "total_tokens": 214, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 0 } }, "obfuscation": "iyA1dgnuQ9V8P" } } ], "is_streaming": true }, "id_normalization_mapping": {} }