Skip to content

Commit 6531e69

Browse files
committed
add assert to check the prompt and complition are deleted
1 parent 8f8785f commit 6531e69

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/traceloop-sdk/test/ai-sdk-transformations.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,10 @@ describe("AI SDK Transformations", () => {
798798

799799
assert.strictEqual(attributes[SpanAttributes.LLM_USAGE_INPUT_TOKENS], 50);
800800
assert.strictEqual(attributes["ai.usage.promptTokens"], undefined);
801+
assert.strictEqual(
802+
attributes[SpanAttributes.LLM_USAGE_PROMPT_TOKENS],
803+
undefined,
804+
);
801805
assert.strictEqual(attributes.someOtherAttr, "value");
802806
});
803807

@@ -840,6 +844,10 @@ describe("AI SDK Transformations", () => {
840844
25,
841845
);
842846
assert.strictEqual(attributes["ai.usage.completionTokens"], undefined);
847+
assert.strictEqual(
848+
attributes[SpanAttributes.LLM_USAGE_COMPLETION_TOKENS],
849+
undefined,
850+
);
843851
assert.strictEqual(attributes.someOtherAttr, "value");
844852
});
845853

0 commit comments

Comments
 (0)