feat(ST-mgsu85hr): Prisma schema — token-velden op ClaudeJob + ModelPrice model
- Voeg model_id, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens (nullable) toe aan ClaudeJob - Voeg nieuw ModelPrice model toe met per-1M prijsvelden en currency default USD - Migratie 20260506010013_add_token_usage_fields aangemaakt en toegepast - Seed uitgebreid met standaardprijzen voor claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5-20251001 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f360c8fe81
commit
0fd86c713a
3 changed files with 76 additions and 0 deletions
|
|
@ -193,6 +193,39 @@ async function main() {
|
|||
}
|
||||
}
|
||||
|
||||
const modelPrices = [
|
||||
{
|
||||
model_id: 'claude-opus-4-7',
|
||||
input_price_per_1m: 15.0,
|
||||
output_price_per_1m: 75.0,
|
||||
cache_read_price_per_1m: 1.5,
|
||||
cache_write_price_per_1m: 18.75,
|
||||
},
|
||||
{
|
||||
model_id: 'claude-sonnet-4-6',
|
||||
input_price_per_1m: 3.0,
|
||||
output_price_per_1m: 15.0,
|
||||
cache_read_price_per_1m: 0.3,
|
||||
cache_write_price_per_1m: 3.75,
|
||||
},
|
||||
{
|
||||
model_id: 'claude-haiku-4-5-20251001',
|
||||
input_price_per_1m: 0.8,
|
||||
output_price_per_1m: 4.0,
|
||||
cache_read_price_per_1m: 0.08,
|
||||
cache_write_price_per_1m: 1.0,
|
||||
},
|
||||
]
|
||||
|
||||
for (const mp of modelPrices) {
|
||||
await prisma.modelPrice.upsert({
|
||||
where: { model_id: mp.model_id },
|
||||
update: mp,
|
||||
create: mp,
|
||||
})
|
||||
console.log(` ModelPrice upserted: ${mp.model_id}`)
|
||||
}
|
||||
|
||||
console.log('\nSeeding complete!')
|
||||
console.log('Demo user: username=demo password=demo1234')
|
||||
console.log('Main user: username=lars password=scrum4me123')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue