Skip to content

Commit cbb946a

Browse files
committed
some fixes
1 parent 4c0b521 commit cbb946a

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

apps/webapp/test/otlpExporter.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe("OTLPExporter", () => {
8686

8787
const event = $events[0];
8888
expect(event.message).toBe("Responses API with 'gpt-4o'");
89-
expect(event.style).toEqual({
89+
expect(event.style).toMatchObject({
9090
icon: "tabler-brand-openai",
9191
});
9292
});
@@ -164,9 +164,18 @@ describe("OTLPExporter", () => {
164164

165165
const event = $events[0];
166166
expect(event.message).toBe("Responses API with gpt-4o");
167-
expect(event.style).toEqual({
167+
expect(event.style).toMatchObject({
168168
icon: "tabler-brand-openai",
169169
});
170+
// Enrichment also adds model/token pills as accessories
171+
const style = event.style as Record<string, unknown>;
172+
expect(style.accessory).toMatchObject({
173+
style: "pills",
174+
items: expect.arrayContaining([
175+
expect.objectContaining({ text: "gpt-4o-2024-08-06" }),
176+
expect.objectContaining({ text: "724" }),
177+
]),
178+
});
170179
});
171180

172181
it("should handle missing properties gracefully", () => {

internal-packages/llm-pricing/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
},
1212
"scripts": {
1313
"typecheck": "tsc --noEmit",
14-
"generate": "./scripts/sync-model-prices.sh",
15-
"sync-prices": "./scripts/sync-model-prices.sh",
16-
"sync-prices:check": "./scripts/sync-model-prices.sh --check"
14+
"generate": "echo 'defaultPrices.ts is pre-committed — run sync-prices to update'",
15+
"sync-prices": "bash scripts/sync-model-prices.sh",
16+
"sync-prices:check": "bash scripts/sync-model-prices.sh --check"
1717
}
1818
}

0 commit comments

Comments
 (0)