File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ import { type BillingEvent } from "@braintrust/proxy";
33const DEFAULT_BILLING_TELEMETRY_URL =
44 "https://api.braintrust.dev/billing/telemetry/ingest" ;
55
6+ function isBrainModel ( model : string ) : boolean {
7+ return model . startsWith ( "brain-" ) ;
8+ }
9+
610function buildPayloadEvent ( event : BillingEvent ) {
711 if ( ! event . org_id ) {
812 console . warn ( "billing event skipped: missing org_id" ) ;
@@ -12,6 +16,10 @@ function buildPayloadEvent(event: BillingEvent) {
1216 console . warn ( "billing event skipped: missing model" ) ;
1317 return null ;
1418 }
19+ // Skip non-brain models since braintrust only hosts brain models.
20+ if ( ! isBrainModel ( event . model ) ) {
21+ return null ;
22+ }
1523 if ( ! event . resolved_model ) {
1624 console . warn ( "billing event skipped: missing resolved_model" ) ;
1725 return null ;
You can’t perform that action at this time.
0 commit comments