Groq API Bug Report: Missing finish_reason in Streaming Responses

Hi! Thank you for reporting this. I’m trying to repro your curl

curl --request POST \
    --url https://api.groq.com/openai/v1/chat/completions \
    --header 'authorization: Bearer MYKEY' \
    --header 'content-type: application/json' \
    --data '{
    "messages": [
        {
            "role": "user",
            "content": "say hello"
        }
    ],
    "model": "moonshotai/kimi-k2-instruct-0905",
    "stream": true
}'

and I consistently get


data: {"id":"chatcmpl-50b2f9bb-1e48-4d78-8837-409f01270736","object":"chat.completion.chunk","created":1763578973,"model":"moonshotai/kimi-k2-instruct-0905","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-50b2f9bb-1e48-4d78-8837-409f01270736","object":"chat.completion.chunk","created":1763578973,"model":"moonshotai/kimi-k2-instruct-0905","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"x_groq":{"id":"req_01kaeqz36fekwa2fzrthrerz2x","usage":{"queue_time":0.02321992,"prompt_tokens":28,"prompt_time":0.009536857,"completion_tokens":3,"completion_time":0.006776633,"total_tokens":31,"total_time":0.01631349}},"usage":{"queue_time":0.02321992,"prompt_tokens":28,"prompt_time":0.009536857,"completion_tokens":3,"completion_time":0.006776633,"total_tokens":31,"total_time":0.01631349}}

where I DO seem to get "finish_reason":"stop"

could you please run your suite again and test? I’m not sure why you didn’t get finish_reason, but I’m having a hard time reproducing