The "created" timestamp value in response is not OpenAI compliant

Hi, I’m working on a .NET application that calls several OpenAI compliant API’s. I’m using the official .NET library for the OpenAI API. This is working with OpenAI and several other platforms that are OpenAI compatible. However, the SambaNova chat completions API is causing an error because the created value in the response is a floating point number. The OpenAI specification indicates that this should be a unix timestamp value in seconds. This results in a 64-bit integer, and not a float.

https://platform.openai.com/docs/api-reference/chat/object

Here is the code from the official OpenAI .NET SDK that expects the created value to be Int64. Again, this works with OpenAI itself and many other providers. The only provider currently causing errors is SambaNova.

if (prop.NameEquals("created"u8))
{
    createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64());
    continue;
}

Here is an example value that I get from the SambaNova API:

“created”: 1756229265.7718627,

Hi @rmontoya ,
Welcome to the community, and thank you for sharing this with us! We understand the issue you’ve highlighted regarding the created field being returned as a floating-point value instead of an Int64. Our team is actively working on this to ensure better compatibility, and we’ll provide an update as soon as it’s resolved.

Regards,
Shivani Moze

1 Like