File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
internal-packages/llm-pricing Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff 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" , ( ) => {
Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments