We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87798b1 commit 68b5d61Copy full SHA for 68b5d61
packages/cost/models/providers/helicone.ts
@@ -40,8 +40,15 @@ export class HeliconeProvider extends BaseProvider {
40
if (isAnthropicModel) {
41
// Use Anthropic message format (converted from OpenAI format if needed)
42
if (context.bodyMapping === "NO_MAPPING") {
43
+ const body = { ...context.parsedBody };
44
+
45
+ // Ensure system message is in object format if it's a string
46
+ if (typeof body.system === "string") {
47
+ body.system = [{ type: "text", text: body.system }];
48
+ }
49
50
return JSON.stringify({
- ...context.parsedBody,
51
+ ...body,
52
model: endpoint.providerModelId,
53
});
54
}
0 commit comments