To my understanding, our company is using the OpenAI interface to utilize the OpenAI SDK.
However, in a streaming scenario, we are receiving values that do not conform to the specification.
When a tool_call ends, the delta value should be empty—like this:
[
{
"index": 0,
"delta": {},
"logprobs": null,
"finish_reason": "tool_calls"
}
]
However, in our current streaming response, the delta value contains an empty string, like this:
[
{
"index": 0,
"delta": {
"role": "assistant",
"content": ""
},
"finish_reason": "tool_calls",
"native_finish_reason": "tool_calls",
"logprobs": null
}
]
This is the difference between OpenAI and OpenRouter.