Gpt-oss browser response, empty assistant content

Hello all. How do I retrieve the actual response when using browser_search with gpt-oss? The json I get back is huge. The first assistant response is empty. But it has searched for something I can see in the json. This is the start of the response:

data: {
“id”: “chatcmpl-…”,
“object”: “chat.completion.chunk”,
“created”: 1756900489,
“model”: “openai/gpt-oss-20b”,
“system_fingerprint”: “fp_e17663e321”,
“choices”: [
{
“index”: 0,
“delta”: {
“role”: “assistant”,
“content”: “”
},
“logprobs”: null,
“finish_reason”: null
}
],
“x_groq”: {
“id”: “req_01k47pvyaw….”
}

I use this to retrieve curl answers in PHP:
$decodedResponse = json_decode($response, true);
$content = $decodedResponse[‘choices’][0][‘message’][‘content’] ?? ‘’;

Hi!

Ok so if I do the following API call

{
    "messages": [
        {
            "role": "user",
            "content": "whats the weather in sf?"
        }
    ],
     "model": "openai/gpt-oss-20b",
     "temperature": 1,
     "max_completion_tokens": 8192,
     "top_p": 1,
     "stream": false,
     "reasoning_effort": "medium",
     "stop": null,
     "tools": [
       {
         "type": "browser_search"
       }
     ]
}

in the response, what you’ll be interested in are:

response.choices[0].message.content
response.choices[0].message.reasoning
response.choices[0].message.executed_tools

where response.choices[0].message.content contains the result from the llm itself, e.g:

**San Francisco (as of 8:43 am PDT, 03 Sep 2025)**  \n\n- **Temperature:** 61 °F (≈ 16 °C)  \n- **Conditions:** Mostly cloudy – partly cloudy now, with a slight chance of light rain (5 %)  \n- **Feels like:** 61 °F  \n- **Wind:** 5 mph from the west  \n- **Humidity:** 91 %  \n- **Visibility:** 10 mi  \n- **UV Index:** 1 (low)  \n- **High/Low for today:** 71 °F / 58 °F  \n\nSo you can expect cool, partly cloudy weather with high humidity and light west‑bound breezes.
1 Like

Thank you for your fast answer!

Chatted with ChatGPT about this with your answer, and it’s probably because I have streaming set to true. Which you do not have. Things gets much more complicated with streaming and browser search set to true.

Anyway, I use groq/compound-mini now instead with browsing (no streaming) and it works great!

Oh yes, we’re not supporting streaming (yet) the tools. Good catch