peri-fuse 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1101 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "97de2cac-409b-4331-93cf-cd2cbb0a3e22",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "ApiKey": {
8
+ "name": "ApiKey",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "publicKey": {
18
+ "name": "publicKey",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "keyName": {
25
+ "name": "keyName",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "spend": {
32
+ "name": "spend",
33
+ "type": "real",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false,
37
+ "default": 0
38
+ },
39
+ "models": {
40
+ "name": "models",
41
+ "type": "text",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false,
45
+ "default": "'[]'"
46
+ },
47
+ "metadata": {
48
+ "name": "metadata",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "autoincrement": false,
53
+ "default": "'{}'"
54
+ },
55
+ "maxParallel": {
56
+ "name": "maxParallel",
57
+ "type": "integer",
58
+ "primaryKey": false,
59
+ "notNull": false,
60
+ "autoincrement": false
61
+ },
62
+ "tpmLimit": {
63
+ "name": "tpmLimit",
64
+ "type": "integer",
65
+ "primaryKey": false,
66
+ "notNull": false,
67
+ "autoincrement": false
68
+ },
69
+ "rpmLimit": {
70
+ "name": "rpmLimit",
71
+ "type": "integer",
72
+ "primaryKey": false,
73
+ "notNull": false,
74
+ "autoincrement": false
75
+ },
76
+ "maxBudget": {
77
+ "name": "maxBudget",
78
+ "type": "real",
79
+ "primaryKey": false,
80
+ "notNull": false,
81
+ "autoincrement": false
82
+ },
83
+ "budgetId": {
84
+ "name": "budgetId",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": false,
88
+ "autoincrement": false
89
+ },
90
+ "isEnabled": {
91
+ "name": "isEnabled",
92
+ "type": "integer",
93
+ "primaryKey": false,
94
+ "notNull": true,
95
+ "autoincrement": false,
96
+ "default": true
97
+ },
98
+ "lastActive": {
99
+ "name": "lastActive",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": false,
103
+ "autoincrement": false
104
+ },
105
+ "createdAt": {
106
+ "name": "createdAt",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "autoincrement": false
111
+ },
112
+ "updatedAt": {
113
+ "name": "updatedAt",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true,
117
+ "autoincrement": false
118
+ }
119
+ },
120
+ "indexes": {
121
+ "ApiKey_publicKey_unique": {
122
+ "name": "ApiKey_publicKey_unique",
123
+ "columns": [
124
+ "publicKey"
125
+ ],
126
+ "isUnique": true
127
+ },
128
+ "ApiKey_publicKey_idx": {
129
+ "name": "ApiKey_publicKey_idx",
130
+ "columns": [
131
+ "publicKey"
132
+ ],
133
+ "isUnique": false
134
+ }
135
+ },
136
+ "foreignKeys": {
137
+ "ApiKey_budgetId_Budget_id_fk": {
138
+ "name": "ApiKey_budgetId_Budget_id_fk",
139
+ "tableFrom": "ApiKey",
140
+ "tableTo": "Budget",
141
+ "columnsFrom": [
142
+ "budgetId"
143
+ ],
144
+ "columnsTo": [
145
+ "id"
146
+ ],
147
+ "onDelete": "no action",
148
+ "onUpdate": "no action"
149
+ }
150
+ },
151
+ "compositePrimaryKeys": {},
152
+ "uniqueConstraints": {},
153
+ "checkConstraints": {}
154
+ },
155
+ "AuditLog": {
156
+ "name": "AuditLog",
157
+ "columns": {
158
+ "id": {
159
+ "name": "id",
160
+ "type": "text",
161
+ "primaryKey": true,
162
+ "notNull": true,
163
+ "autoincrement": false
164
+ },
165
+ "action": {
166
+ "name": "action",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": true,
170
+ "autoincrement": false
171
+ },
172
+ "tableName": {
173
+ "name": "tableName",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": true,
177
+ "autoincrement": false
178
+ },
179
+ "objectId": {
180
+ "name": "objectId",
181
+ "type": "text",
182
+ "primaryKey": false,
183
+ "notNull": true,
184
+ "autoincrement": false
185
+ },
186
+ "beforeValue": {
187
+ "name": "beforeValue",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": false,
191
+ "autoincrement": false
192
+ },
193
+ "afterValue": {
194
+ "name": "afterValue",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": false,
198
+ "autoincrement": false
199
+ },
200
+ "changedBy": {
201
+ "name": "changedBy",
202
+ "type": "text",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "autoincrement": false,
206
+ "default": "''"
207
+ },
208
+ "createdAt": {
209
+ "name": "createdAt",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": true,
213
+ "autoincrement": false
214
+ }
215
+ },
216
+ "indexes": {
217
+ "AuditLog_tableName_objectId_idx": {
218
+ "name": "AuditLog_tableName_objectId_idx",
219
+ "columns": [
220
+ "tableName",
221
+ "objectId"
222
+ ],
223
+ "isUnique": false
224
+ },
225
+ "AuditLog_createdAt_idx": {
226
+ "name": "AuditLog_createdAt_idx",
227
+ "columns": [
228
+ "createdAt"
229
+ ],
230
+ "isUnique": false
231
+ }
232
+ },
233
+ "foreignKeys": {},
234
+ "compositePrimaryKeys": {},
235
+ "uniqueConstraints": {},
236
+ "checkConstraints": {}
237
+ },
238
+ "Budget": {
239
+ "name": "Budget",
240
+ "columns": {
241
+ "id": {
242
+ "name": "id",
243
+ "type": "text",
244
+ "primaryKey": true,
245
+ "notNull": true,
246
+ "autoincrement": false
247
+ },
248
+ "maxBudget": {
249
+ "name": "maxBudget",
250
+ "type": "real",
251
+ "primaryKey": false,
252
+ "notNull": false,
253
+ "autoincrement": false
254
+ },
255
+ "softBudget": {
256
+ "name": "softBudget",
257
+ "type": "real",
258
+ "primaryKey": false,
259
+ "notNull": false,
260
+ "autoincrement": false
261
+ },
262
+ "maxParallel": {
263
+ "name": "maxParallel",
264
+ "type": "integer",
265
+ "primaryKey": false,
266
+ "notNull": false,
267
+ "autoincrement": false
268
+ },
269
+ "tpmLimit": {
270
+ "name": "tpmLimit",
271
+ "type": "integer",
272
+ "primaryKey": false,
273
+ "notNull": false,
274
+ "autoincrement": false
275
+ },
276
+ "rpmLimit": {
277
+ "name": "rpmLimit",
278
+ "type": "integer",
279
+ "primaryKey": false,
280
+ "notNull": false,
281
+ "autoincrement": false
282
+ },
283
+ "duration": {
284
+ "name": "duration",
285
+ "type": "text",
286
+ "primaryKey": false,
287
+ "notNull": false,
288
+ "autoincrement": false
289
+ },
290
+ "resetAt": {
291
+ "name": "resetAt",
292
+ "type": "text",
293
+ "primaryKey": false,
294
+ "notNull": false,
295
+ "autoincrement": false
296
+ },
297
+ "modelMaxBudget": {
298
+ "name": "modelMaxBudget",
299
+ "type": "text",
300
+ "primaryKey": false,
301
+ "notNull": false,
302
+ "autoincrement": false
303
+ },
304
+ "createdAt": {
305
+ "name": "createdAt",
306
+ "type": "text",
307
+ "primaryKey": false,
308
+ "notNull": true,
309
+ "autoincrement": false
310
+ },
311
+ "updatedAt": {
312
+ "name": "updatedAt",
313
+ "type": "text",
314
+ "primaryKey": false,
315
+ "notNull": true,
316
+ "autoincrement": false
317
+ }
318
+ },
319
+ "indexes": {},
320
+ "foreignKeys": {},
321
+ "compositePrimaryKeys": {},
322
+ "uniqueConstraints": {},
323
+ "checkConstraints": {}
324
+ },
325
+ "Credential": {
326
+ "name": "Credential",
327
+ "columns": {
328
+ "id": {
329
+ "name": "id",
330
+ "type": "text",
331
+ "primaryKey": true,
332
+ "notNull": true,
333
+ "autoincrement": false
334
+ },
335
+ "name": {
336
+ "name": "name",
337
+ "type": "text",
338
+ "primaryKey": false,
339
+ "notNull": true,
340
+ "autoincrement": false
341
+ },
342
+ "values": {
343
+ "name": "values",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "autoincrement": false
348
+ },
349
+ "info": {
350
+ "name": "info",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": false,
354
+ "autoincrement": false
355
+ },
356
+ "createdAt": {
357
+ "name": "createdAt",
358
+ "type": "text",
359
+ "primaryKey": false,
360
+ "notNull": true,
361
+ "autoincrement": false
362
+ },
363
+ "updatedAt": {
364
+ "name": "updatedAt",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": true,
368
+ "autoincrement": false
369
+ }
370
+ },
371
+ "indexes": {
372
+ "Credential_name_unique": {
373
+ "name": "Credential_name_unique",
374
+ "columns": [
375
+ "name"
376
+ ],
377
+ "isUnique": true
378
+ }
379
+ },
380
+ "foreignKeys": {},
381
+ "compositePrimaryKeys": {},
382
+ "uniqueConstraints": {},
383
+ "checkConstraints": {}
384
+ },
385
+ "DailySpend": {
386
+ "name": "DailySpend",
387
+ "columns": {
388
+ "id": {
389
+ "name": "id",
390
+ "type": "text",
391
+ "primaryKey": true,
392
+ "notNull": true,
393
+ "autoincrement": false
394
+ },
395
+ "apiKey": {
396
+ "name": "apiKey",
397
+ "type": "text",
398
+ "primaryKey": false,
399
+ "notNull": true,
400
+ "autoincrement": false
401
+ },
402
+ "date": {
403
+ "name": "date",
404
+ "type": "text",
405
+ "primaryKey": false,
406
+ "notNull": true,
407
+ "autoincrement": false
408
+ },
409
+ "model": {
410
+ "name": "model",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": false,
414
+ "autoincrement": false
415
+ },
416
+ "modelGroup": {
417
+ "name": "modelGroup",
418
+ "type": "text",
419
+ "primaryKey": false,
420
+ "notNull": false,
421
+ "autoincrement": false
422
+ },
423
+ "provider": {
424
+ "name": "provider",
425
+ "type": "text",
426
+ "primaryKey": false,
427
+ "notNull": false,
428
+ "autoincrement": false
429
+ },
430
+ "promptTokens": {
431
+ "name": "promptTokens",
432
+ "type": "integer",
433
+ "primaryKey": false,
434
+ "notNull": true,
435
+ "autoincrement": false,
436
+ "default": 0
437
+ },
438
+ "completionTokens": {
439
+ "name": "completionTokens",
440
+ "type": "integer",
441
+ "primaryKey": false,
442
+ "notNull": true,
443
+ "autoincrement": false,
444
+ "default": 0
445
+ },
446
+ "spend": {
447
+ "name": "spend",
448
+ "type": "real",
449
+ "primaryKey": false,
450
+ "notNull": true,
451
+ "autoincrement": false,
452
+ "default": 0
453
+ },
454
+ "apiRequests": {
455
+ "name": "apiRequests",
456
+ "type": "integer",
457
+ "primaryKey": false,
458
+ "notNull": true,
459
+ "autoincrement": false,
460
+ "default": 0
461
+ },
462
+ "successfulRequests": {
463
+ "name": "successfulRequests",
464
+ "type": "integer",
465
+ "primaryKey": false,
466
+ "notNull": true,
467
+ "autoincrement": false,
468
+ "default": 0
469
+ },
470
+ "failedRequests": {
471
+ "name": "failedRequests",
472
+ "type": "integer",
473
+ "primaryKey": false,
474
+ "notNull": true,
475
+ "autoincrement": false,
476
+ "default": 0
477
+ },
478
+ "createdAt": {
479
+ "name": "createdAt",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": true,
483
+ "autoincrement": false
484
+ },
485
+ "updatedAt": {
486
+ "name": "updatedAt",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "autoincrement": false
491
+ }
492
+ },
493
+ "indexes": {
494
+ "DailySpend_apiKey_date_model_provider_key": {
495
+ "name": "DailySpend_apiKey_date_model_provider_key",
496
+ "columns": [
497
+ "apiKey",
498
+ "date",
499
+ "model",
500
+ "provider"
501
+ ],
502
+ "isUnique": true
503
+ },
504
+ "DailySpend_date_idx": {
505
+ "name": "DailySpend_date_idx",
506
+ "columns": [
507
+ "date"
508
+ ],
509
+ "isUnique": false
510
+ },
511
+ "DailySpend_apiKey_date_idx": {
512
+ "name": "DailySpend_apiKey_date_idx",
513
+ "columns": [
514
+ "apiKey",
515
+ "date"
516
+ ],
517
+ "isUnique": false
518
+ },
519
+ "DailySpend_model_idx": {
520
+ "name": "DailySpend_model_idx",
521
+ "columns": [
522
+ "model"
523
+ ],
524
+ "isUnique": false
525
+ }
526
+ },
527
+ "foreignKeys": {},
528
+ "compositePrimaryKeys": {},
529
+ "uniqueConstraints": {},
530
+ "checkConstraints": {}
531
+ },
532
+ "ErrorLog": {
533
+ "name": "ErrorLog",
534
+ "columns": {
535
+ "id": {
536
+ "name": "id",
537
+ "type": "text",
538
+ "primaryKey": true,
539
+ "notNull": true,
540
+ "autoincrement": false
541
+ },
542
+ "startTime": {
543
+ "name": "startTime",
544
+ "type": "text",
545
+ "primaryKey": false,
546
+ "notNull": true,
547
+ "autoincrement": false
548
+ },
549
+ "endTime": {
550
+ "name": "endTime",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": true,
554
+ "autoincrement": false
555
+ },
556
+ "apiBase": {
557
+ "name": "apiBase",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "autoincrement": false,
562
+ "default": "''"
563
+ },
564
+ "modelGroup": {
565
+ "name": "modelGroup",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "autoincrement": false,
570
+ "default": "''"
571
+ },
572
+ "providerModel": {
573
+ "name": "providerModel",
574
+ "type": "text",
575
+ "primaryKey": false,
576
+ "notNull": true,
577
+ "autoincrement": false,
578
+ "default": "''"
579
+ },
580
+ "modelId": {
581
+ "name": "modelId",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": true,
585
+ "autoincrement": false,
586
+ "default": "''"
587
+ },
588
+ "requestKwargs": {
589
+ "name": "requestKwargs",
590
+ "type": "text",
591
+ "primaryKey": false,
592
+ "notNull": true,
593
+ "autoincrement": false,
594
+ "default": "'{}'"
595
+ },
596
+ "exceptionType": {
597
+ "name": "exceptionType",
598
+ "type": "text",
599
+ "primaryKey": false,
600
+ "notNull": true,
601
+ "autoincrement": false,
602
+ "default": "''"
603
+ },
604
+ "exceptionString": {
605
+ "name": "exceptionString",
606
+ "type": "text",
607
+ "primaryKey": false,
608
+ "notNull": true,
609
+ "autoincrement": false,
610
+ "default": "''"
611
+ },
612
+ "statusCode": {
613
+ "name": "statusCode",
614
+ "type": "text",
615
+ "primaryKey": false,
616
+ "notNull": true,
617
+ "autoincrement": false,
618
+ "default": "''"
619
+ }
620
+ },
621
+ "indexes": {
622
+ "ErrorLog_startTime_idx": {
623
+ "name": "ErrorLog_startTime_idx",
624
+ "columns": [
625
+ "startTime"
626
+ ],
627
+ "isUnique": false
628
+ }
629
+ },
630
+ "foreignKeys": {},
631
+ "compositePrimaryKeys": {},
632
+ "uniqueConstraints": {},
633
+ "checkConstraints": {}
634
+ },
635
+ "ModelDeployment": {
636
+ "name": "ModelDeployment",
637
+ "columns": {
638
+ "id": {
639
+ "name": "id",
640
+ "type": "text",
641
+ "primaryKey": true,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "modelName": {
646
+ "name": "modelName",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "providerId": {
653
+ "name": "providerId",
654
+ "type": "text",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false
658
+ },
659
+ "providerModel": {
660
+ "name": "providerModel",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": true,
664
+ "autoincrement": false
665
+ },
666
+ "litellmParams": {
667
+ "name": "litellmParams",
668
+ "type": "text",
669
+ "primaryKey": false,
670
+ "notNull": true,
671
+ "autoincrement": false,
672
+ "default": "'{}'"
673
+ },
674
+ "modelInfo": {
675
+ "name": "modelInfo",
676
+ "type": "text",
677
+ "primaryKey": false,
678
+ "notNull": false,
679
+ "autoincrement": false
680
+ },
681
+ "isEnabled": {
682
+ "name": "isEnabled",
683
+ "type": "integer",
684
+ "primaryKey": false,
685
+ "notNull": true,
686
+ "autoincrement": false,
687
+ "default": true
688
+ },
689
+ "createdAt": {
690
+ "name": "createdAt",
691
+ "type": "text",
692
+ "primaryKey": false,
693
+ "notNull": true,
694
+ "autoincrement": false
695
+ },
696
+ "updatedAt": {
697
+ "name": "updatedAt",
698
+ "type": "text",
699
+ "primaryKey": false,
700
+ "notNull": true,
701
+ "autoincrement": false
702
+ }
703
+ },
704
+ "indexes": {
705
+ "ModelDeployment_modelName_isEnabled_idx": {
706
+ "name": "ModelDeployment_modelName_isEnabled_idx",
707
+ "columns": [
708
+ "modelName",
709
+ "isEnabled"
710
+ ],
711
+ "isUnique": false
712
+ }
713
+ },
714
+ "foreignKeys": {
715
+ "ModelDeployment_providerId_Provider_id_fk": {
716
+ "name": "ModelDeployment_providerId_Provider_id_fk",
717
+ "tableFrom": "ModelDeployment",
718
+ "tableTo": "Provider",
719
+ "columnsFrom": [
720
+ "providerId"
721
+ ],
722
+ "columnsTo": [
723
+ "id"
724
+ ],
725
+ "onDelete": "no action",
726
+ "onUpdate": "no action"
727
+ }
728
+ },
729
+ "compositePrimaryKeys": {},
730
+ "uniqueConstraints": {},
731
+ "checkConstraints": {}
732
+ },
733
+ "Provider": {
734
+ "name": "Provider",
735
+ "columns": {
736
+ "id": {
737
+ "name": "id",
738
+ "type": "text",
739
+ "primaryKey": true,
740
+ "notNull": true,
741
+ "autoincrement": false
742
+ },
743
+ "name": {
744
+ "name": "name",
745
+ "type": "text",
746
+ "primaryKey": false,
747
+ "notNull": true,
748
+ "autoincrement": false
749
+ },
750
+ "type": {
751
+ "name": "type",
752
+ "type": "text",
753
+ "primaryKey": false,
754
+ "notNull": true,
755
+ "autoincrement": false
756
+ },
757
+ "credentialId": {
758
+ "name": "credentialId",
759
+ "type": "text",
760
+ "primaryKey": false,
761
+ "notNull": false,
762
+ "autoincrement": false
763
+ },
764
+ "baseUrl": {
765
+ "name": "baseUrl",
766
+ "type": "text",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "autoincrement": false
770
+ },
771
+ "apiKeyEncrypted": {
772
+ "name": "apiKeyEncrypted",
773
+ "type": "text",
774
+ "primaryKey": false,
775
+ "notNull": false,
776
+ "autoincrement": false
777
+ },
778
+ "isEnabled": {
779
+ "name": "isEnabled",
780
+ "type": "integer",
781
+ "primaryKey": false,
782
+ "notNull": true,
783
+ "autoincrement": false,
784
+ "default": true
785
+ },
786
+ "budgetLimit": {
787
+ "name": "budgetLimit",
788
+ "type": "real",
789
+ "primaryKey": false,
790
+ "notNull": false,
791
+ "autoincrement": false
792
+ },
793
+ "budgetPeriod": {
794
+ "name": "budgetPeriod",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": false,
798
+ "autoincrement": false
799
+ },
800
+ "budgetSpend": {
801
+ "name": "budgetSpend",
802
+ "type": "real",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "autoincrement": false,
806
+ "default": 0
807
+ },
808
+ "budgetResetAt": {
809
+ "name": "budgetResetAt",
810
+ "type": "text",
811
+ "primaryKey": false,
812
+ "notNull": false,
813
+ "autoincrement": false
814
+ },
815
+ "status": {
816
+ "name": "status",
817
+ "type": "text",
818
+ "primaryKey": false,
819
+ "notNull": true,
820
+ "autoincrement": false,
821
+ "default": "'healthy'"
822
+ },
823
+ "cooldownUntil": {
824
+ "name": "cooldownUntil",
825
+ "type": "text",
826
+ "primaryKey": false,
827
+ "notNull": false,
828
+ "autoincrement": false
829
+ },
830
+ "createdAt": {
831
+ "name": "createdAt",
832
+ "type": "text",
833
+ "primaryKey": false,
834
+ "notNull": true,
835
+ "autoincrement": false
836
+ },
837
+ "updatedAt": {
838
+ "name": "updatedAt",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": true,
842
+ "autoincrement": false
843
+ }
844
+ },
845
+ "indexes": {
846
+ "Provider_name_unique": {
847
+ "name": "Provider_name_unique",
848
+ "columns": [
849
+ "name"
850
+ ],
851
+ "isUnique": true
852
+ }
853
+ },
854
+ "foreignKeys": {},
855
+ "compositePrimaryKeys": {},
856
+ "uniqueConstraints": {},
857
+ "checkConstraints": {}
858
+ },
859
+ "SpendLog": {
860
+ "name": "SpendLog",
861
+ "columns": {
862
+ "id": {
863
+ "name": "id",
864
+ "type": "text",
865
+ "primaryKey": true,
866
+ "notNull": true,
867
+ "autoincrement": false
868
+ },
869
+ "callType": {
870
+ "name": "callType",
871
+ "type": "text",
872
+ "primaryKey": false,
873
+ "notNull": true,
874
+ "autoincrement": false
875
+ },
876
+ "apiKey": {
877
+ "name": "apiKey",
878
+ "type": "text",
879
+ "primaryKey": false,
880
+ "notNull": true,
881
+ "autoincrement": false,
882
+ "default": "''"
883
+ },
884
+ "spend": {
885
+ "name": "spend",
886
+ "type": "real",
887
+ "primaryKey": false,
888
+ "notNull": true,
889
+ "autoincrement": false,
890
+ "default": 0
891
+ },
892
+ "totalTokens": {
893
+ "name": "totalTokens",
894
+ "type": "integer",
895
+ "primaryKey": false,
896
+ "notNull": true,
897
+ "autoincrement": false,
898
+ "default": 0
899
+ },
900
+ "promptTokens": {
901
+ "name": "promptTokens",
902
+ "type": "integer",
903
+ "primaryKey": false,
904
+ "notNull": true,
905
+ "autoincrement": false,
906
+ "default": 0
907
+ },
908
+ "completionTokens": {
909
+ "name": "completionTokens",
910
+ "type": "integer",
911
+ "primaryKey": false,
912
+ "notNull": true,
913
+ "autoincrement": false,
914
+ "default": 0
915
+ },
916
+ "startTime": {
917
+ "name": "startTime",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true,
921
+ "autoincrement": false
922
+ },
923
+ "endTime": {
924
+ "name": "endTime",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false
929
+ },
930
+ "completionStartTime": {
931
+ "name": "completionStartTime",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": false,
935
+ "autoincrement": false
936
+ },
937
+ "requestDurationMs": {
938
+ "name": "requestDurationMs",
939
+ "type": "integer",
940
+ "primaryKey": false,
941
+ "notNull": false,
942
+ "autoincrement": false
943
+ },
944
+ "model": {
945
+ "name": "model",
946
+ "type": "text",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "autoincrement": false,
950
+ "default": "''"
951
+ },
952
+ "modelId": {
953
+ "name": "modelId",
954
+ "type": "text",
955
+ "primaryKey": false,
956
+ "notNull": false,
957
+ "autoincrement": false
958
+ },
959
+ "modelGroup": {
960
+ "name": "modelGroup",
961
+ "type": "text",
962
+ "primaryKey": false,
963
+ "notNull": false,
964
+ "autoincrement": false
965
+ },
966
+ "provider": {
967
+ "name": "provider",
968
+ "type": "text",
969
+ "primaryKey": false,
970
+ "notNull": false,
971
+ "autoincrement": false
972
+ },
973
+ "apiBase": {
974
+ "name": "apiBase",
975
+ "type": "text",
976
+ "primaryKey": false,
977
+ "notNull": false,
978
+ "autoincrement": false
979
+ },
980
+ "protocol": {
981
+ "name": "protocol",
982
+ "type": "text",
983
+ "primaryKey": false,
984
+ "notNull": false,
985
+ "autoincrement": false
986
+ },
987
+ "user": {
988
+ "name": "user",
989
+ "type": "text",
990
+ "primaryKey": false,
991
+ "notNull": false,
992
+ "autoincrement": false
993
+ },
994
+ "metadata": {
995
+ "name": "metadata",
996
+ "type": "text",
997
+ "primaryKey": false,
998
+ "notNull": true,
999
+ "autoincrement": false,
1000
+ "default": "'{}'"
1001
+ },
1002
+ "requestTags": {
1003
+ "name": "requestTags",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true,
1007
+ "autoincrement": false,
1008
+ "default": "'[]'"
1009
+ },
1010
+ "sessionId": {
1011
+ "name": "sessionId",
1012
+ "type": "text",
1013
+ "primaryKey": false,
1014
+ "notNull": false,
1015
+ "autoincrement": false
1016
+ },
1017
+ "status": {
1018
+ "name": "status",
1019
+ "type": "text",
1020
+ "primaryKey": false,
1021
+ "notNull": false,
1022
+ "autoincrement": false
1023
+ },
1024
+ "messages": {
1025
+ "name": "messages",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": false,
1029
+ "autoincrement": false
1030
+ },
1031
+ "response": {
1032
+ "name": "response",
1033
+ "type": "text",
1034
+ "primaryKey": false,
1035
+ "notNull": false,
1036
+ "autoincrement": false
1037
+ },
1038
+ "errorMessage": {
1039
+ "name": "errorMessage",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": false,
1043
+ "autoincrement": false
1044
+ },
1045
+ "traceId": {
1046
+ "name": "traceId",
1047
+ "type": "text",
1048
+ "primaryKey": false,
1049
+ "notNull": false,
1050
+ "autoincrement": false
1051
+ }
1052
+ },
1053
+ "indexes": {
1054
+ "SpendLog_startTime_idx": {
1055
+ "name": "SpendLog_startTime_idx",
1056
+ "columns": [
1057
+ "startTime"
1058
+ ],
1059
+ "isUnique": false
1060
+ },
1061
+ "SpendLog_apiKey_startTime_idx": {
1062
+ "name": "SpendLog_apiKey_startTime_idx",
1063
+ "columns": [
1064
+ "apiKey",
1065
+ "startTime"
1066
+ ],
1067
+ "isUnique": false
1068
+ },
1069
+ "SpendLog_model_startTime_idx": {
1070
+ "name": "SpendLog_model_startTime_idx",
1071
+ "columns": [
1072
+ "model",
1073
+ "startTime"
1074
+ ],
1075
+ "isUnique": false
1076
+ },
1077
+ "SpendLog_sessionId_idx": {
1078
+ "name": "SpendLog_sessionId_idx",
1079
+ "columns": [
1080
+ "sessionId"
1081
+ ],
1082
+ "isUnique": false
1083
+ }
1084
+ },
1085
+ "foreignKeys": {},
1086
+ "compositePrimaryKeys": {},
1087
+ "uniqueConstraints": {},
1088
+ "checkConstraints": {}
1089
+ }
1090
+ },
1091
+ "views": {},
1092
+ "enums": {},
1093
+ "_meta": {
1094
+ "schemas": {},
1095
+ "tables": {},
1096
+ "columns": {}
1097
+ },
1098
+ "internal": {
1099
+ "indexes": {}
1100
+ }
1101
+ }