{ "test_id": "tests/integration/responses/test_tool_responses.py::test_response_non_streaming_web_search[client_with_models-txt=openai/gpt-4o-web_search_2025_08_26_type]", "request": { "method": "POST", "url": "https://api.openai.com/v1/v1/chat/completions", "headers": {}, "body": { "model": "gpt-4o", "messages": [ { "role": "user", "content": "What is the latest version of Python?" }, { "role": "assistant", "content": "", "tool_calls": [ { "index": 0, "id": "call_Bh9SBhduG20Qd1ALpZpqqiy6", "type": "function", "function": { "name": "web_search", "arguments": "{\"query\":\"latest version of Python\"}" } } ] }, { "role": "tool", "tool_call_id": "call_Bh9SBhduG20Qd1ALpZpqqiy6", "content": "Pass Search provider's API Key in the header X-LlamaStack-Provider-Data as { \"tavily_search_api_key\": }" }, { "role": "assistant", "content": "", "tool_calls": [ { "index": 0, "id": "call_R6WbO9sUToqGFgcvdqEaEPq0", "type": "function", "function": { "name": "web_search", "arguments": "{\"query\":\"latest version of Python\"}" } } ] }, { "role": "tool", "tool_call_id": "call_R6WbO9sUToqGFgcvdqEaEPq0", "content": "Pass Search provider's API Key in the header X-LlamaStack-Provider-Data as { \"tavily_search_api_key\": }" } ], "stream": true, "stream_options": { "include_usage": true }, "tools": [ { "type": "function", "function": { "name": "web_search", "description": "Search the web for information", "parameters": { "type": "object", "properties": { "query": { "type": "string", "description": "The query to search for" } }, "required": [ "query" ] } } } ] }, "endpoint": "/v1/chat/completions", "model": "gpt-4o" }, "response": { "body": [ { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "YrOlydIDNs0zgY" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": "Unfortunately", "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_cbf1785567", "usage": null, "obfuscation": "Bco" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "5MBM5cPN0C0Daoz" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " I'm", "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_cbf1785567", "usage": null, "obfuscation": "FmHeRlpS3KLJ" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " currently", "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_cbf1785567", "usage": null, "obfuscation": "7Hg2d4" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " unable", "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_cbf1785567", "usage": null, "obfuscation": "e5SZv9MfR" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " to", "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_cbf1785567", "usage": null, "obfuscation": "FZrgIHkPurg1j" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " access", "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_cbf1785567", "usage": null, "obfuscation": "prIdDdBIH" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "mwFFkwLC6fhd" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " internet", "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_cbf1785567", "usage": null, "obfuscation": "kk3d1XR" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " to", "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_cbf1785567", "usage": null, "obfuscation": "PCy8KVrubdek3" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " provide", "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_cbf1785567", "usage": null, "obfuscation": "i1W3ToXd" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "o3jJztEa5xts" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " latest", "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_cbf1785567", "usage": null, "obfuscation": "7OM0jRU9Q" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " version", "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_cbf1785567", "usage": null, "obfuscation": "RB6qajrD" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "TgQMFajUWkPKr" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " Python", "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_cbf1785567", "usage": null, "obfuscation": "b01r4Necx" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "IOPuaMaDPBxLVJ0" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " You", "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_cbf1785567", "usage": null, "obfuscation": "Kdp5jaw038bd" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " can", "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_cbf1785567", "usage": null, "obfuscation": "ajddmEDXYMQI" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " check", "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_cbf1785567", "usage": null, "obfuscation": "JQZUlCGSuH" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "MDhyRSmSr5So" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " official", "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_cbf1785567", "usage": null, "obfuscation": "89xfuOX" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "kDiR37X5CD7QNC" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": "Python", "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_cbf1785567", "usage": null, "obfuscation": "n1FVzs7v96" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " website", "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_cbf1785567", "usage": null, "obfuscation": "I83PuENr" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "PP0YB17pOmfMGC" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": "https", "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_cbf1785567", "usage": null, "obfuscation": "azTGVDMXCgE" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "zIqWI3LSYbhPe" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": "www", "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_cbf1785567", "usage": null, "obfuscation": "Sz6OhvTlvizfB" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": ".python", "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_cbf1785567", "usage": null, "obfuscation": "d5C3SbjBn" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": ".org", "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_cbf1785567", "usage": null, "obfuscation": "QI2N7Ao0exAf" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "AKmTQo8VRIqU8S" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " for", "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_cbf1785567", "usage": null, "obfuscation": "vv0Wqrsym7KL" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "x5f4E929HetH" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " most", "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_cbf1785567", "usage": null, "obfuscation": "fMXDwNhsLh3" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " recent", "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_cbf1785567", "usage": null, "obfuscation": "LvV3gHEhZ" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [ { "delta": { "content": " version", "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_cbf1785567", "usage": null, "obfuscation": "0hR7uSxj" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "phx2V2JUHMgVGbO" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "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_cbf1785567", "usage": null, "obfuscation": "xthFqHQDYs" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-ab75be48e0b7", "choices": [], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_cbf1785567", "usage": { "completion_tokens": 39, "prompt_tokens": 172, "total_tokens": 211, "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": "BAhMEd76ZCdnX" } } ], "is_streaming": true }, "id_normalization_mapping": {} }