Skip to content

Commit 155ebc8

Browse files
committed
feat(llm-model-catalog): set pricing_unit to "tokens" when seeding default models
The curated default catalog is entirely per-token, so seed + syncLlmCatalog now stamp pricing_unit="tokens" on those rows.
1 parent 95f604b commit 155ebc8

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

internal-packages/database/prisma/schema.prisma

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2909,11 +2909,7 @@ model LlmModel {
29092909
capabilities String[] @default([]) @map("capabilities")
29102910
isHidden Boolean @default(false) @map("is_hidden")
29112911
baseModelName String? @map("base_model_name")
2912-
/// Billing unit the model is priced in, classified by the research-model
2913-
/// job: "tokens" | "characters" | "images" | "minutes" | "requests" |
2914-
/// "free" | "not_findable". null until researched. Lets pricing-coverage
2915-
/// metrics exclude models that aren't priced per-token, and is the
2916-
/// foundation for non-token pricing support.
2912+
// "tokens", "images", "characters", "minutes", "requests", "free", "not_findable"; null until researched
29172913
pricingUnit String? @map("pricing_unit")
29182914
29192915
pricingTiers LlmPricingTier[]

internal-packages/llm-model-catalog/src/seed.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export async function seedLlmPricing(prisma: PrismaClient): Promise<{
4646
capabilities: catalog?.capabilities ?? [],
4747
isHidden: catalog?.isHidden ?? false,
4848
baseModelName: catalog?.baseModelName ?? null,
49+
pricingUnit: "tokens",
4950
},
5051
});
5152

internal-packages/llm-model-catalog/src/sync.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export async function syncLlmCatalog(prisma: PrismaClient): Promise<{
7474
catalog?.baseModelName === undefined
7575
? existing.baseModelName
7676
: catalog.baseModelName,
77+
pricingUnit: "tokens",
7778
},
7879
});
7980

0 commit comments

Comments
 (0)