@llmops/core 0.5.1-beta.2 → 0.5.2-beta.1

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/index.cjs CHANGED
@@ -621,7 +621,7 @@ const providersConfigSchema = require_db.array(inlineProviderConfigSchema).optio
621
621
  */
622
622
  const llmopsConfigBaseSchema = require_db.object({
623
623
  database: require_db.any().optional(),
624
- basePath: require_db.string().min(1, "Base path is required and cannot be empty").refine((path) => path.startsWith("/"), "Base path must start with a forward slash"),
624
+ basePath: require_db.string().min(1, "Base path cannot be empty").refine((path) => path.startsWith("/"), "Base path must start with a forward slash").default("/llmops"),
625
625
  schema: require_db.string().optional().default("llmops"),
626
626
  providers: providersConfigSchema
627
627
  });
@@ -630,7 +630,7 @@ const llmopsConfigSchema = llmopsConfigBaseSchema.transform((config) => ({
630
630
  providers: mergeWithDefaultProviders(config.providers)
631
631
  })).refine((config) => config.database !== void 0 || config.providers && config.providers.length > 0, "Either database or providers must be configured. Set a database connection, configure providers explicitly, or set API key environment variables (e.g., OPENAI_API_KEY).");
632
632
  function validateLLMOpsConfig(config) {
633
- const result = llmopsConfigSchema.safeParse(config);
633
+ const result = llmopsConfigSchema.safeParse(config ?? {});
634
634
  if (!result.success) {
635
635
  const errorMessages = result.error.issues.map((err) => `${err.path.join(".")}: ${err.message}`).join("\n");
636
636
  throw new Error(`LLMOps configuration validation failed:\n${errorMessages}`);
package/dist/index.d.cts CHANGED
@@ -471,7 +471,7 @@ declare const DEFAULT_PROVIDER_ENV_VARS: string[];
471
471
  //#region src/schemas/config.d.ts
472
472
  declare const llmopsConfigSchema: z.ZodPipe<z.ZodObject<{
473
473
  database: z.ZodOptional<z.ZodAny>;
474
- basePath: z.ZodString;
474
+ basePath: z.ZodDefault<z.ZodString>;
475
475
  schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
476
476
  providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
477
477
  provider: z.ZodString;
@@ -519,11 +519,11 @@ type ValidatedLLMOpsConfig = {
519
519
  */
520
520
  type LLMOpsConfigInput = {
521
521
  database?: unknown;
522
- basePath: string;
522
+ basePath?: string;
523
523
  schema?: string;
524
524
  providers?: InlineProvidersConfig;
525
525
  };
526
- declare function validateLLMOpsConfig(config: unknown): ValidatedLLMOpsConfig;
526
+ declare function validateLLMOpsConfig(config?: unknown): ValidatedLLMOpsConfig;
527
527
  //#endregion
528
528
  //#region src/types/helper.d.ts
529
529
  /**
@@ -1245,13 +1245,13 @@ declare const createConfigDataLayer: (db: Kysely<Database>) => {
1245
1245
  modelName: string | null;
1246
1246
  jsonData: Record<string, unknown> | null;
1247
1247
  variantVersionId: string | null;
1248
- id: string;
1249
1248
  slug: string;
1250
1249
  name: string | undefined;
1250
+ id: string;
1251
1251
  createdAt: Date;
1252
1252
  updatedAt: Date;
1253
- variantName: string | null;
1254
1253
  variantId: string | null;
1254
+ variantName: string | null;
1255
1255
  }[]>;
1256
1256
  };
1257
1257
  //#endregion
@@ -1356,13 +1356,13 @@ declare const createConfigVariantDataLayer: (db: Kysely<Database>) => {
1356
1356
  modelName: string;
1357
1357
  jsonData: Record<string, unknown>;
1358
1358
  } | null;
1359
+ configId: string;
1359
1360
  id: string;
1360
1361
  createdAt: Date;
1361
1362
  updatedAt: Date;
1362
1363
  variantId: string;
1363
- configId: string;
1364
- configName: string | null | undefined;
1365
1364
  variantName: string | null;
1365
+ configName: string | null | undefined;
1366
1366
  } | undefined>;
1367
1367
  /**
1368
1368
  * Get config variants with details including latest version data
@@ -1381,11 +1381,11 @@ declare const createConfigVariantDataLayer: (db: Kysely<Database>) => {
1381
1381
  modelName: string;
1382
1382
  jsonData: Record<string, unknown>;
1383
1383
  } | null;
1384
+ configId: string;
1384
1385
  id: string;
1385
1386
  createdAt: Date;
1386
1387
  updatedAt: Date;
1387
1388
  variantId: string;
1388
- configId: string;
1389
1389
  name: string | null;
1390
1390
  }[]>;
1391
1391
  /**
package/dist/index.d.mts CHANGED
@@ -471,7 +471,7 @@ declare const DEFAULT_PROVIDER_ENV_VARS: string[];
471
471
  //#region src/schemas/config.d.ts
472
472
  declare const llmopsConfigSchema: z.ZodPipe<z.ZodObject<{
473
473
  database: z.ZodOptional<z.ZodAny>;
474
- basePath: z.ZodString;
474
+ basePath: z.ZodDefault<z.ZodString>;
475
475
  schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
476
476
  providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
477
477
  provider: z.ZodString;
@@ -519,11 +519,11 @@ type ValidatedLLMOpsConfig = {
519
519
  */
520
520
  type LLMOpsConfigInput = {
521
521
  database?: unknown;
522
- basePath: string;
522
+ basePath?: string;
523
523
  schema?: string;
524
524
  providers?: InlineProvidersConfig;
525
525
  };
526
- declare function validateLLMOpsConfig(config: unknown): ValidatedLLMOpsConfig;
526
+ declare function validateLLMOpsConfig(config?: unknown): ValidatedLLMOpsConfig;
527
527
  //#endregion
528
528
  //#region src/types/helper.d.ts
529
529
  /**
@@ -1245,13 +1245,13 @@ declare const createConfigDataLayer: (db: Kysely<Database>) => {
1245
1245
  modelName: string | null;
1246
1246
  jsonData: Record<string, unknown> | null;
1247
1247
  variantVersionId: string | null;
1248
- id: string;
1249
1248
  slug: string;
1250
1249
  name: string | undefined;
1250
+ id: string;
1251
1251
  createdAt: Date;
1252
1252
  updatedAt: Date;
1253
- variantName: string | null;
1254
1253
  variantId: string | null;
1254
+ variantName: string | null;
1255
1255
  }[]>;
1256
1256
  };
1257
1257
  //#endregion
@@ -1356,13 +1356,13 @@ declare const createConfigVariantDataLayer: (db: Kysely<Database>) => {
1356
1356
  modelName: string;
1357
1357
  jsonData: Record<string, unknown>;
1358
1358
  } | null;
1359
+ configId: string;
1359
1360
  id: string;
1360
1361
  createdAt: Date;
1361
1362
  updatedAt: Date;
1362
1363
  variantId: string;
1363
- configId: string;
1364
- configName: string | null | undefined;
1365
1364
  variantName: string | null;
1365
+ configName: string | null | undefined;
1366
1366
  } | undefined>;
1367
1367
  /**
1368
1368
  * Get config variants with details including latest version data
@@ -1381,11 +1381,11 @@ declare const createConfigVariantDataLayer: (db: Kysely<Database>) => {
1381
1381
  modelName: string;
1382
1382
  jsonData: Record<string, unknown>;
1383
1383
  } | null;
1384
+ configId: string;
1384
1385
  id: string;
1385
1386
  createdAt: Date;
1386
1387
  updatedAt: Date;
1387
1388
  variantId: string;
1388
- configId: string;
1389
1389
  name: string | null;
1390
1390
  }[]>;
1391
1391
  /**
package/dist/index.mjs CHANGED
@@ -617,7 +617,7 @@ const providersConfigSchema = array(inlineProviderConfigSchema).optional();
617
617
  */
618
618
  const llmopsConfigBaseSchema = object({
619
619
  database: any().optional(),
620
- basePath: string().min(1, "Base path is required and cannot be empty").refine((path$1) => path$1.startsWith("/"), "Base path must start with a forward slash"),
620
+ basePath: string().min(1, "Base path cannot be empty").refine((path$1) => path$1.startsWith("/"), "Base path must start with a forward slash").default("/llmops"),
621
621
  schema: string().optional().default("llmops"),
622
622
  providers: providersConfigSchema
623
623
  });
@@ -626,7 +626,7 @@ const llmopsConfigSchema = llmopsConfigBaseSchema.transform((config) => ({
626
626
  providers: mergeWithDefaultProviders(config.providers)
627
627
  })).refine((config) => config.database !== void 0 || config.providers && config.providers.length > 0, "Either database or providers must be configured. Set a database connection, configure providers explicitly, or set API key environment variables (e.g., OPENAI_API_KEY).");
628
628
  function validateLLMOpsConfig(config) {
629
- const result = llmopsConfigSchema.safeParse(config);
629
+ const result = llmopsConfigSchema.safeParse(config ?? {});
630
630
  if (!result.success) {
631
631
  const errorMessages = result.error.issues.map((err) => `${err.path.join(".")}: ${err.message}`).join("\n");
632
632
  throw new Error(`LLMOps configuration validation failed:\n${errorMessages}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmops/core",
3
- "version": "0.5.1-beta.2",
3
+ "version": "0.5.2-beta.1",
4
4
  "description": "Core LLMOps functionality and utilities",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -55,7 +55,7 @@
55
55
  "kysely": "^0.28.8",
56
56
  "kysely-neon": "^2.0.2",
57
57
  "pino": "^10.1.0",
58
- "@llmops/gateway": "^0.5.1-beta.2"
58
+ "@llmops/gateway": "^0.5.2-beta.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/json-logic-js": "^2.0.8",