Hey that worked. But I missed the cost calculation
const apiResponse = await fetch(apiUrl, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-portkey-api-key": process.env.PORTKEY_API_KEY,
"x-portkey-provider": "cerebras",
"x-portkey-trace-id": metadata.traceID,
"x-portkey-metadata": JSON.stringify(metadata),
},
body: JSON.stringify(logData),
});
This the code snippet I'm using. I'm passing the provider slug in the header, but it is not registering in the log and not calculating the cost even though the tokens and model info is available.