@llmops/core 0.6.9 → 0.6.10-beta.2
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.
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/{index-2POEhF2_.d.mts → index-CyVFWq76.d.cts} +49 -49
- package/dist/{index-BVI_reop.d.cts → index-D3onb7gK.d.mts} +49 -49
- package/dist/index.cjs +18 -2
- package/dist/index.d.cts +294 -286
- package/dist/index.d.mts +294 -286
- package/dist/index.mjs +18 -2
- package/package.json +2 -2
package/dist/db/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-
|
|
1
|
+
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-CyVFWq76.cjs";
|
|
2
2
|
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Dataset, DatasetRecord, DatasetRecordsTable, DatasetVersion, DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, DatasetsTable, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, GuardrailConfig, GuardrailConfigsTable, GuardrailResult, GuardrailResults, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, Playground, PlaygroundColumn, PlaygroundResult, PlaygroundResultsTable, PlaygroundRun, PlaygroundRunsTable, PlaygroundsTable, ProviderConfig, ProviderConfigsTable, ProviderGuardrailOverride, ProviderGuardrailOverridesTable, SCHEMA_METADATA, Selectable, Span, SpanEvent, SpanEventsTable, SpansTable, TableName, TargetingRule, TargetingRulesTable, Trace, TracesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-
|
|
1
|
+
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-D3onb7gK.mjs";
|
|
2
2
|
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Dataset, DatasetRecord, DatasetRecordsTable, DatasetVersion, DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, DatasetsTable, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, GuardrailConfig, GuardrailConfigsTable, GuardrailResult, GuardrailResults, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, Playground, PlaygroundColumn, PlaygroundResult, PlaygroundResultsTable, PlaygroundRun, PlaygroundRunsTable, PlaygroundsTable, ProviderConfig, ProviderConfigsTable, ProviderGuardrailOverride, ProviderGuardrailOverridesTable, SCHEMA_METADATA, Selectable, Span, SpanEvent, SpanEventsTable, SpansTable, TableName, TargetingRule, TargetingRulesTable, Trace, TracesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType, Dialect, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
2
|
-
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
3
2
|
import * as zod0 from "zod";
|
|
4
3
|
import { z } from "zod";
|
|
4
|
+
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
5
5
|
|
|
6
6
|
//#region src/db/schema.d.ts
|
|
7
7
|
declare const configsSchema: z.ZodObject<{
|
|
@@ -2588,22 +2588,6 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2588
2588
|
id: string;
|
|
2589
2589
|
createdAt: Date;
|
|
2590
2590
|
updatedAt: Date;
|
|
2591
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2592
|
-
providerConfigId: string;
|
|
2593
|
-
guardrailConfigId: string;
|
|
2594
|
-
enabled: boolean;
|
|
2595
|
-
id: string;
|
|
2596
|
-
createdAt: Date;
|
|
2597
|
-
updatedAt: Date;
|
|
2598
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2599
|
-
}> | zod0.ZodSafeParseError<{
|
|
2600
|
-
providerConfigId: string;
|
|
2601
|
-
guardrailConfigId: string;
|
|
2602
|
-
enabled: boolean;
|
|
2603
|
-
id: string;
|
|
2604
|
-
createdAt: Date;
|
|
2605
|
-
updatedAt: Date;
|
|
2606
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2607
2591
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2608
2592
|
datasetId: string;
|
|
2609
2593
|
versionNumber: number;
|
|
@@ -2654,6 +2638,22 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2654
2638
|
id: string;
|
|
2655
2639
|
createdAt: Date;
|
|
2656
2640
|
updatedAt: Date;
|
|
2641
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2642
|
+
providerConfigId: string;
|
|
2643
|
+
guardrailConfigId: string;
|
|
2644
|
+
enabled: boolean;
|
|
2645
|
+
id: string;
|
|
2646
|
+
createdAt: Date;
|
|
2647
|
+
updatedAt: Date;
|
|
2648
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2649
|
+
}> | zod0.ZodSafeParseError<{
|
|
2650
|
+
providerConfigId: string;
|
|
2651
|
+
guardrailConfigId: string;
|
|
2652
|
+
enabled: boolean;
|
|
2653
|
+
id: string;
|
|
2654
|
+
createdAt: Date;
|
|
2655
|
+
updatedAt: Date;
|
|
2656
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2657
2657
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2658
2658
|
requestId: string;
|
|
2659
2659
|
provider: string;
|
|
@@ -2960,22 +2960,6 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2960
2960
|
id?: string | undefined;
|
|
2961
2961
|
createdAt?: Date | undefined;
|
|
2962
2962
|
updatedAt?: Date | undefined;
|
|
2963
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2964
|
-
providerConfigId?: string | undefined;
|
|
2965
|
-
guardrailConfigId?: string | undefined;
|
|
2966
|
-
enabled?: boolean | undefined;
|
|
2967
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2968
|
-
id?: string | undefined;
|
|
2969
|
-
createdAt?: Date | undefined;
|
|
2970
|
-
updatedAt?: Date | undefined;
|
|
2971
|
-
}> | zod0.ZodSafeParseError<{
|
|
2972
|
-
providerConfigId?: string | undefined;
|
|
2973
|
-
guardrailConfigId?: string | undefined;
|
|
2974
|
-
enabled?: boolean | undefined;
|
|
2975
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2976
|
-
id?: string | undefined;
|
|
2977
|
-
createdAt?: Date | undefined;
|
|
2978
|
-
updatedAt?: Date | undefined;
|
|
2979
2963
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2980
2964
|
datasetId?: string | undefined;
|
|
2981
2965
|
versionNumber?: number | undefined;
|
|
@@ -3026,6 +3010,22 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
3026
3010
|
id?: string | undefined;
|
|
3027
3011
|
createdAt?: Date | undefined;
|
|
3028
3012
|
updatedAt?: Date | undefined;
|
|
3013
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
3014
|
+
providerConfigId?: string | undefined;
|
|
3015
|
+
guardrailConfigId?: string | undefined;
|
|
3016
|
+
enabled?: boolean | undefined;
|
|
3017
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3018
|
+
id?: string | undefined;
|
|
3019
|
+
createdAt?: Date | undefined;
|
|
3020
|
+
updatedAt?: Date | undefined;
|
|
3021
|
+
}> | zod0.ZodSafeParseError<{
|
|
3022
|
+
providerConfigId?: string | undefined;
|
|
3023
|
+
guardrailConfigId?: string | undefined;
|
|
3024
|
+
enabled?: boolean | undefined;
|
|
3025
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3026
|
+
id?: string | undefined;
|
|
3027
|
+
createdAt?: Date | undefined;
|
|
3028
|
+
updatedAt?: Date | undefined;
|
|
3029
3029
|
}> | zod0.ZodSafeParseSuccess<{
|
|
3030
3030
|
requestId?: string | undefined;
|
|
3031
3031
|
configId?: string | null | undefined;
|
|
@@ -3255,14 +3255,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3255
3255
|
id: string;
|
|
3256
3256
|
createdAt: Date;
|
|
3257
3257
|
updatedAt: Date;
|
|
3258
|
-
} | {
|
|
3259
|
-
providerConfigId: string;
|
|
3260
|
-
guardrailConfigId: string;
|
|
3261
|
-
enabled: boolean;
|
|
3262
|
-
id: string;
|
|
3263
|
-
createdAt: Date;
|
|
3264
|
-
updatedAt: Date;
|
|
3265
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3266
3258
|
} | {
|
|
3267
3259
|
datasetId: string;
|
|
3268
3260
|
versionNumber: number;
|
|
@@ -3288,6 +3280,14 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3288
3280
|
id: string;
|
|
3289
3281
|
createdAt: Date;
|
|
3290
3282
|
updatedAt: Date;
|
|
3283
|
+
} | {
|
|
3284
|
+
providerConfigId: string;
|
|
3285
|
+
guardrailConfigId: string;
|
|
3286
|
+
enabled: boolean;
|
|
3287
|
+
id: string;
|
|
3288
|
+
createdAt: Date;
|
|
3289
|
+
updatedAt: Date;
|
|
3290
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3291
3291
|
} | {
|
|
3292
3292
|
requestId: string;
|
|
3293
3293
|
provider: string;
|
|
@@ -3443,14 +3443,6 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3443
3443
|
id?: string | undefined;
|
|
3444
3444
|
createdAt?: Date | undefined;
|
|
3445
3445
|
updatedAt?: Date | undefined;
|
|
3446
|
-
} | {
|
|
3447
|
-
providerConfigId?: string | undefined;
|
|
3448
|
-
guardrailConfigId?: string | undefined;
|
|
3449
|
-
enabled?: boolean | undefined;
|
|
3450
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3451
|
-
id?: string | undefined;
|
|
3452
|
-
createdAt?: Date | undefined;
|
|
3453
|
-
updatedAt?: Date | undefined;
|
|
3454
3446
|
} | {
|
|
3455
3447
|
datasetId?: string | undefined;
|
|
3456
3448
|
versionNumber?: number | undefined;
|
|
@@ -3476,6 +3468,14 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3476
3468
|
id?: string | undefined;
|
|
3477
3469
|
createdAt?: Date | undefined;
|
|
3478
3470
|
updatedAt?: Date | undefined;
|
|
3471
|
+
} | {
|
|
3472
|
+
providerConfigId?: string | undefined;
|
|
3473
|
+
guardrailConfigId?: string | undefined;
|
|
3474
|
+
enabled?: boolean | undefined;
|
|
3475
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3476
|
+
id?: string | undefined;
|
|
3477
|
+
createdAt?: Date | undefined;
|
|
3478
|
+
updatedAt?: Date | undefined;
|
|
3479
3479
|
} | {
|
|
3480
3480
|
requestId?: string | undefined;
|
|
3481
3481
|
configId?: string | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType, Dialect, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
2
|
+
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
2
3
|
import * as zod0 from "zod";
|
|
3
4
|
import { z } from "zod";
|
|
4
|
-
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
5
5
|
|
|
6
6
|
//#region src/db/schema.d.ts
|
|
7
7
|
declare const configsSchema: z.ZodObject<{
|
|
@@ -2588,22 +2588,6 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2588
2588
|
id: string;
|
|
2589
2589
|
createdAt: Date;
|
|
2590
2590
|
updatedAt: Date;
|
|
2591
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2592
|
-
providerConfigId: string;
|
|
2593
|
-
guardrailConfigId: string;
|
|
2594
|
-
enabled: boolean;
|
|
2595
|
-
id: string;
|
|
2596
|
-
createdAt: Date;
|
|
2597
|
-
updatedAt: Date;
|
|
2598
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2599
|
-
}> | zod0.ZodSafeParseError<{
|
|
2600
|
-
providerConfigId: string;
|
|
2601
|
-
guardrailConfigId: string;
|
|
2602
|
-
enabled: boolean;
|
|
2603
|
-
id: string;
|
|
2604
|
-
createdAt: Date;
|
|
2605
|
-
updatedAt: Date;
|
|
2606
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2607
2591
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2608
2592
|
datasetId: string;
|
|
2609
2593
|
versionNumber: number;
|
|
@@ -2654,6 +2638,22 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2654
2638
|
id: string;
|
|
2655
2639
|
createdAt: Date;
|
|
2656
2640
|
updatedAt: Date;
|
|
2641
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2642
|
+
providerConfigId: string;
|
|
2643
|
+
guardrailConfigId: string;
|
|
2644
|
+
enabled: boolean;
|
|
2645
|
+
id: string;
|
|
2646
|
+
createdAt: Date;
|
|
2647
|
+
updatedAt: Date;
|
|
2648
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2649
|
+
}> | zod0.ZodSafeParseError<{
|
|
2650
|
+
providerConfigId: string;
|
|
2651
|
+
guardrailConfigId: string;
|
|
2652
|
+
enabled: boolean;
|
|
2653
|
+
id: string;
|
|
2654
|
+
createdAt: Date;
|
|
2655
|
+
updatedAt: Date;
|
|
2656
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2657
2657
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2658
2658
|
requestId: string;
|
|
2659
2659
|
provider: string;
|
|
@@ -2960,22 +2960,6 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2960
2960
|
id?: string | undefined;
|
|
2961
2961
|
createdAt?: Date | undefined;
|
|
2962
2962
|
updatedAt?: Date | undefined;
|
|
2963
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2964
|
-
providerConfigId?: string | undefined;
|
|
2965
|
-
guardrailConfigId?: string | undefined;
|
|
2966
|
-
enabled?: boolean | undefined;
|
|
2967
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2968
|
-
id?: string | undefined;
|
|
2969
|
-
createdAt?: Date | undefined;
|
|
2970
|
-
updatedAt?: Date | undefined;
|
|
2971
|
-
}> | zod0.ZodSafeParseError<{
|
|
2972
|
-
providerConfigId?: string | undefined;
|
|
2973
|
-
guardrailConfigId?: string | undefined;
|
|
2974
|
-
enabled?: boolean | undefined;
|
|
2975
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2976
|
-
id?: string | undefined;
|
|
2977
|
-
createdAt?: Date | undefined;
|
|
2978
|
-
updatedAt?: Date | undefined;
|
|
2979
2963
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2980
2964
|
datasetId?: string | undefined;
|
|
2981
2965
|
versionNumber?: number | undefined;
|
|
@@ -3026,6 +3010,22 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
3026
3010
|
id?: string | undefined;
|
|
3027
3011
|
createdAt?: Date | undefined;
|
|
3028
3012
|
updatedAt?: Date | undefined;
|
|
3013
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
3014
|
+
providerConfigId?: string | undefined;
|
|
3015
|
+
guardrailConfigId?: string | undefined;
|
|
3016
|
+
enabled?: boolean | undefined;
|
|
3017
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3018
|
+
id?: string | undefined;
|
|
3019
|
+
createdAt?: Date | undefined;
|
|
3020
|
+
updatedAt?: Date | undefined;
|
|
3021
|
+
}> | zod0.ZodSafeParseError<{
|
|
3022
|
+
providerConfigId?: string | undefined;
|
|
3023
|
+
guardrailConfigId?: string | undefined;
|
|
3024
|
+
enabled?: boolean | undefined;
|
|
3025
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3026
|
+
id?: string | undefined;
|
|
3027
|
+
createdAt?: Date | undefined;
|
|
3028
|
+
updatedAt?: Date | undefined;
|
|
3029
3029
|
}> | zod0.ZodSafeParseSuccess<{
|
|
3030
3030
|
requestId?: string | undefined;
|
|
3031
3031
|
configId?: string | null | undefined;
|
|
@@ -3255,14 +3255,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3255
3255
|
id: string;
|
|
3256
3256
|
createdAt: Date;
|
|
3257
3257
|
updatedAt: Date;
|
|
3258
|
-
} | {
|
|
3259
|
-
providerConfigId: string;
|
|
3260
|
-
guardrailConfigId: string;
|
|
3261
|
-
enabled: boolean;
|
|
3262
|
-
id: string;
|
|
3263
|
-
createdAt: Date;
|
|
3264
|
-
updatedAt: Date;
|
|
3265
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3266
3258
|
} | {
|
|
3267
3259
|
datasetId: string;
|
|
3268
3260
|
versionNumber: number;
|
|
@@ -3288,6 +3280,14 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3288
3280
|
id: string;
|
|
3289
3281
|
createdAt: Date;
|
|
3290
3282
|
updatedAt: Date;
|
|
3283
|
+
} | {
|
|
3284
|
+
providerConfigId: string;
|
|
3285
|
+
guardrailConfigId: string;
|
|
3286
|
+
enabled: boolean;
|
|
3287
|
+
id: string;
|
|
3288
|
+
createdAt: Date;
|
|
3289
|
+
updatedAt: Date;
|
|
3290
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3291
3291
|
} | {
|
|
3292
3292
|
requestId: string;
|
|
3293
3293
|
provider: string;
|
|
@@ -3443,14 +3443,6 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3443
3443
|
id?: string | undefined;
|
|
3444
3444
|
createdAt?: Date | undefined;
|
|
3445
3445
|
updatedAt?: Date | undefined;
|
|
3446
|
-
} | {
|
|
3447
|
-
providerConfigId?: string | undefined;
|
|
3448
|
-
guardrailConfigId?: string | undefined;
|
|
3449
|
-
enabled?: boolean | undefined;
|
|
3450
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3451
|
-
id?: string | undefined;
|
|
3452
|
-
createdAt?: Date | undefined;
|
|
3453
|
-
updatedAt?: Date | undefined;
|
|
3454
3446
|
} | {
|
|
3455
3447
|
datasetId?: string | undefined;
|
|
3456
3448
|
versionNumber?: number | undefined;
|
|
@@ -3476,6 +3468,14 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3476
3468
|
id?: string | undefined;
|
|
3477
3469
|
createdAt?: Date | undefined;
|
|
3478
3470
|
updatedAt?: Date | undefined;
|
|
3471
|
+
} | {
|
|
3472
|
+
providerConfigId?: string | undefined;
|
|
3473
|
+
guardrailConfigId?: string | undefined;
|
|
3474
|
+
enabled?: boolean | undefined;
|
|
3475
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3476
|
+
id?: string | undefined;
|
|
3477
|
+
createdAt?: Date | undefined;
|
|
3478
|
+
updatedAt?: Date | undefined;
|
|
3479
3479
|
} | {
|
|
3480
3480
|
requestId?: string | undefined;
|
|
3481
3481
|
configId?: string | null | undefined;
|
package/dist/index.cjs
CHANGED
|
@@ -3923,9 +3923,9 @@ var LLMOpsPricingProvider = class {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
}
|
|
3925
3925
|
/**
|
|
3926
|
-
*
|
|
3926
|
+
* Internal: fetch with cache and deduplication for a specific provider+model
|
|
3927
3927
|
*/
|
|
3928
|
-
async
|
|
3928
|
+
async getCachedPricing(provider, model) {
|
|
3929
3929
|
const cacheKey = this.getCacheKey(provider, model);
|
|
3930
3930
|
const cached = this.cache.get(cacheKey);
|
|
3931
3931
|
if (cached && Date.now() - cached.fetchedAt < this.cacheTTL) return cached.pricing;
|
|
@@ -3945,6 +3945,22 @@ var LLMOpsPricingProvider = class {
|
|
|
3945
3945
|
return pending;
|
|
3946
3946
|
}
|
|
3947
3947
|
/**
|
|
3948
|
+
* Get pricing for a specific model.
|
|
3949
|
+
*
|
|
3950
|
+
* When the model name contains a slash (e.g. "google/gemini-2.5-flash"),
|
|
3951
|
+
* it's likely an OpenRouter model ID. If the initial provider lookup fails,
|
|
3952
|
+
* we automatically retry with "openrouter" as the provider.
|
|
3953
|
+
*/
|
|
3954
|
+
async getModelPricing(provider, model) {
|
|
3955
|
+
const pricing = await this.getCachedPricing(provider, model);
|
|
3956
|
+
if (pricing) return pricing;
|
|
3957
|
+
if (!pricing && model.includes("/") && provider.toLowerCase() !== "openrouter") {
|
|
3958
|
+
require_db.logger.debug(`[Pricing] Retrying ${provider}/${model} as openrouter/${model}`);
|
|
3959
|
+
return this.getCachedPricing("openrouter", model);
|
|
3960
|
+
}
|
|
3961
|
+
return pricing;
|
|
3962
|
+
}
|
|
3963
|
+
/**
|
|
3948
3964
|
* Force refresh the pricing cache (clears all cached entries)
|
|
3949
3965
|
*/
|
|
3950
3966
|
async refreshCache() {
|