@llmops/core 0.6.1 → 0.6.3-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.d.mts CHANGED
@@ -1,4 +1,4 @@
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-BosemZ_J.mjs";
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
  import gateway from "@llmops/gateway";
3
3
  import * as kysely0 from "kysely";
4
4
  import { Kysely } from "kysely";
@@ -1956,7 +1956,9 @@ declare const insertLLMRequestSchema: z$1.ZodObject<{
1956
1956
  completionTokens: z$1.ZodDefault<z$1.ZodNumber>;
1957
1957
  totalTokens: z$1.ZodDefault<z$1.ZodNumber>;
1958
1958
  cachedTokens: z$1.ZodDefault<z$1.ZodNumber>;
1959
+ cacheCreationTokens: z$1.ZodDefault<z$1.ZodNumber>;
1959
1960
  cost: z$1.ZodDefault<z$1.ZodNumber>;
1961
+ cacheSavings: z$1.ZodDefault<z$1.ZodNumber>;
1960
1962
  inputCost: z$1.ZodDefault<z$1.ZodNumber>;
1961
1963
  outputCost: z$1.ZodDefault<z$1.ZodNumber>;
1962
1964
  endpoint: z$1.ZodString;
@@ -2069,6 +2071,8 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
2069
2071
  requestId: string;
2070
2072
  model: string;
2071
2073
  cachedTokens: number;
2074
+ cacheCreationTokens: number;
2075
+ cacheSavings: number;
2072
2076
  inputCost: number;
2073
2077
  outputCost: number;
2074
2078
  endpoint: string;
@@ -2114,6 +2118,8 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
2114
2118
  requestId: string;
2115
2119
  model: string;
2116
2120
  cachedTokens: number;
2121
+ cacheCreationTokens: number;
2122
+ cacheSavings: number;
2117
2123
  inputCost: number;
2118
2124
  outputCost: number;
2119
2125
  endpoint: string;
@@ -2161,6 +2167,8 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
2161
2167
  requestId: string;
2162
2168
  model: string;
2163
2169
  cachedTokens: number;
2170
+ cacheCreationTokens: number;
2171
+ cacheSavings: number;
2164
2172
  inputCost: number;
2165
2173
  outputCost: number;
2166
2174
  endpoint: string;
@@ -2194,6 +2202,8 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
2194
2202
  totalPromptTokens: number;
2195
2203
  totalCompletionTokens: number;
2196
2204
  totalTokens: number;
2205
+ totalCachedTokens: number;
2206
+ totalCacheSavings: number;
2197
2207
  requestCount: number;
2198
2208
  } | undefined>;
2199
2209
  /**
@@ -3787,8 +3797,10 @@ interface UsageData {
3787
3797
  completionTokens: number;
3788
3798
  /** Total tokens (prompt + completion) */
3789
3799
  totalTokens?: number;
3790
- /** Number of cached tokens (optional) */
3800
+ /** Number of cache read tokens (OpenAI cached_tokens / Anthropic cache_read_input_tokens) */
3791
3801
  cachedTokens?: number;
3802
+ /** Number of cache creation tokens (Anthropic cache_creation_input_tokens) */
3803
+ cacheCreationTokens?: number;
3792
3804
  /** Number of reasoning tokens (optional, for models like o1) */
3793
3805
  reasoningTokens?: number;
3794
3806
  }
@@ -3804,6 +3816,8 @@ interface CostResult {
3804
3816
  inputCost: number;
3805
3817
  /** Output/completion cost in micro-dollars */
3806
3818
  outputCost: number;
3819
+ /** Cost saved by cache hits in micro-dollars (negative means cache write premium exceeded savings) */
3820
+ cacheSavings: number;
3807
3821
  }
3808
3822
  /**
3809
3823
  * Provider for fetching model pricing data
@@ -3850,6 +3864,19 @@ interface PricingProvider {
3850
3864
  * ```
3851
3865
  */
3852
3866
  declare function calculateCost(usage: UsageData, pricing: ModelPricing): CostResult;
3867
+ /**
3868
+ * Calculate cache-aware cost of an LLM request in micro-dollars.
3869
+ *
3870
+ * Splits input tokens into uncached, cache-read, and cache-creation buckets,
3871
+ * each priced at different rates. Falls back to provider-specific multipliers
3872
+ * when models.dev doesn't provide cache pricing.
3873
+ *
3874
+ * @param usage - Token usage data (with cachedTokens and cacheCreationTokens)
3875
+ * @param pricing - Model pricing (may include cacheReadCostPer1M / cacheWriteCostPer1M)
3876
+ * @param provider - Provider name for fallback rate selection
3877
+ * @returns Cost breakdown in micro-dollars
3878
+ */
3879
+ declare function calculateCacheAwareCost(usage: UsageData, pricing: ModelPricing, provider?: string): CostResult;
3853
3880
  /**
3854
3881
  * Convert micro-dollars to dollars
3855
3882
  *
@@ -3893,47 +3920,38 @@ declare function formatCost(microDollars: number, decimals?: number): string;
3893
3920
  //#endregion
3894
3921
  //#region src/pricing/provider.d.ts
3895
3922
  /**
3896
- * Pricing provider that fetches data from models.dev API
3923
+ * Pricing provider that fetches per-model data from the LLMOps Models API.
3897
3924
  *
3898
3925
  * Features:
3899
- * - Caches pricing data with configurable TTL (default 5 minutes)
3900
- * - Supports fallback to local cache on fetch failure
3901
- * - Thread-safe cache refresh
3926
+ * - Per-model in-memory cache with configurable TTL (default 5 minutes)
3927
+ * - Deduplicates concurrent fetches for the same model
3928
+ * - Caches null results (404s) to avoid repeated lookups
3929
+ * - Falls back to stale cache on fetch errors
3902
3930
  */
3903
- declare class ModelsDevPricingProvider implements PricingProvider {
3931
+ declare class LLMOpsPricingProvider implements PricingProvider {
3904
3932
  private cache;
3905
- private lastFetch;
3933
+ private pendingFetches;
3906
3934
  private cacheTTL;
3907
- private fetchPromise;
3908
- private ready;
3909
- /**
3910
- * Create a new ModelsDevPricingProvider
3911
- *
3912
- * @param cacheTTL - Cache TTL in milliseconds (default: 5 minutes)
3913
- */
3914
- constructor(cacheTTL?: number);
3915
- /**
3916
- * Generate a cache key for a provider/model combination
3917
- */
3935
+ private baseUrl;
3936
+ constructor(options?: {
3937
+ cacheTTL?: number;
3938
+ baseUrl?: string;
3939
+ });
3918
3940
  private getCacheKey;
3919
3941
  /**
3920
- * Fetch pricing data from models.dev API
3942
+ * Fetch pricing for a single model from the API
3921
3943
  */
3922
- private fetchPricingData;
3923
- /**
3924
- * Ensure cache is fresh, fetching if necessary
3925
- */
3926
- private ensureFreshCache;
3944
+ private fetchModelPricing;
3927
3945
  /**
3928
3946
  * Get pricing for a specific model
3929
3947
  */
3930
3948
  getModelPricing(provider: string, model: string): Promise<ModelPricing | null>;
3931
3949
  /**
3932
- * Force refresh the pricing cache
3950
+ * Force refresh the pricing cache (clears all cached entries)
3933
3951
  */
3934
3952
  refreshCache(): Promise<void>;
3935
3953
  /**
3936
- * Check if the provider is ready
3954
+ * Always ready no bulk pre-fetch needed
3937
3955
  */
3938
3956
  isReady(): boolean;
3939
3957
  /**
@@ -3944,7 +3962,7 @@ declare class ModelsDevPricingProvider implements PricingProvider {
3944
3962
  /**
3945
3963
  * Get the default pricing provider instance
3946
3964
  */
3947
- declare function getDefaultPricingProvider(): ModelsDevPricingProvider;
3965
+ declare function getDefaultPricingProvider(): LLMOpsPricingProvider;
3948
3966
  //#endregion
3949
3967
  //#region src/auth/get-auth-client-options.d.ts
3950
3968
  interface AuthClientDatabaseConfig {
@@ -4174,4 +4192,4 @@ declare class ManifestRouter {
4174
4192
  routeWithWeights(configIdOrSlug: string, environmentId: string, context?: RoutingContext): RoutingResult | null;
4175
4193
  }
4176
4194
  //#endregion
4177
- export { type AnthropicProviderConfig, type AnyProviderConfig, AuthClientDatabaseConfig, AuthClientOptions, type AzureAIProviderConfig, type AzureOpenAIProviderConfig, BaseCacheConfig, type BaseProviderConfig, type BedrockProviderConfig, COST_SUMMARY_GROUP_BY, CacheBackend, CacheBackendType, CacheConfig, CacheEntry, CacheOptions, CacheService, CacheStats, ChatCompletionCreateParamsBase, type Config, type ConfigVariant, type ConfigVariantsDataLayer, type ConfigVariantsTable, type ConfigsDataLayer, type ConfigsTable, type CortexProviderConfig, CostResult, type CostSummaryGroupBy, DEFAULT_PROVIDER_ENV_VARS, type DataLayer, type Database, DatabaseConnection, DatabaseOptions, DatabaseType, type Dataset, type DatasetRecord, DatasetRecordsTable, type DatasetVersion, type DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, type DatasetsDataLayer, DatasetsTable, type Environment, type EnvironmentSecret, type EnvironmentSecretsDataLayer, type EnvironmentSecretsTable, type EnvironmentsDataLayer, type EnvironmentsTable, FileCacheBackend, FileCacheConfig, type FireworksAIProviderConfig, type GatewayManifest, type GoogleProviderConfig, type GuardrailConfig, type GuardrailConfigsDataLayer, GuardrailConfigsTable, type GuardrailResult, type GuardrailResults, type HuggingFaceProviderConfig, type InlineProviderConfig, type InlineProvidersConfig, Insertable, LLMOPS_INTERNAL_HEADER, LLMOPS_REQUEST_ID_HEADER, LLMOPS_SESSION_ID_HEADER, LLMOPS_SPAN_ID_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER, LLMOPS_USER_ID_HEADER, LLMOpsClient, LLMOpsConfig, type LLMOpsConfigInput, type LLMRequest, type LLMRequestInsert, type LLMRequestsDataLayer, LLMRequestsTable, MS, ManifestBuilder, type ManifestConfig, type ManifestEnvironment, type ManifestGuardrail, type ManifestProviderGuardrailOverride, ManifestRouter, ManifestService, type ManifestTargetingRule, type ManifestVariantVersion, MemoryCacheBackend, MemoryCacheConfig, MigrationOptions, MigrationResult, type MistralAIProviderConfig, ModelPricing, ModelsDevPricingProvider, type OpenAIProviderConfig, type OracleProviderConfig, type Playground, type PlaygroundColumn, type PlaygroundResult, type PlaygroundResultsDataLayer, PlaygroundResultsTable, type PlaygroundRun, type PlaygroundRunsDataLayer, PlaygroundRunsTable, type PlaygroundsDataLayer, PlaygroundsTable, Prettify, PricingProvider, type ProviderConfig, type ProviderConfigMap, type ProviderConfigsDataLayer, ProviderConfigsTable, type ProviderGuardrailOverride, type ProviderGuardrailOverridesDataLayer, ProviderGuardrailOverridesTable, type ProvidersConfig, type RoutingContext, type RoutingResult, SCHEMA_METADATA, type SagemakerProviderConfig, Selectable, Span, SpanEvent, type SpanEventInsert, SpanEventsTable, type SpanInsert, SpansTable, type StabilityAIProviderConfig, SupportedProviders, type TableName, type TargetingRule, type TargetingRulesDataLayer, type TargetingRulesTable, Trace, type TraceUpsert, type TracesDataLayer, TracesTable, Updateable, UsageData, type ValidatedLLMOpsConfig, type Variant, VariantJsonData, type VariantVersion, type VariantVersionsDataLayer, VariantVersionsTable, type VariantsDataLayer, type VariantsTable, type VertexAIProviderConfig, type WorkersAIProviderConfig, type WorkspaceSettings, type WorkspaceSettingsDataLayer, WorkspaceSettingsTable, calculateCost, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createConfigDataLayer, createConfigVariantDataLayer, createDataLayer, createDatabase, createDatabaseFromConnection, createDatasetsDataLayer, createEnvironmentDataLayer, createEnvironmentSecretDataLayer, createGuardrailConfigsDataLayer, createLLMRequestsDataLayer, createNeonDialect, createPlaygroundDataLayer, createPlaygroundResultsDataLayer, createPlaygroundRunsDataLayer, createProviderConfigsDataLayer, createProviderGuardrailOverridesDataLayer, createTargetingRulesDataLayer, createTracesDataLayer, createVariantDataLayer, createVariantVersionsDataLayer, createWorkspaceSettingsDataLayer, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, dollarsToMicroDollars, environmentSecretsSchema, environmentsSchema, executeWithSchema, formatCost, gateway, generateId, getAuthClientOptions, getDefaultPricingProvider, getDefaultProviders, getMigrations, guardrailConfigsSchema, llmRequestsSchema, llmopsConfigSchema, logger, matchType, mergeWithDefaultProviders, microDollarsToDollars, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
4195
+ export { type AnthropicProviderConfig, type AnyProviderConfig, AuthClientDatabaseConfig, AuthClientOptions, type AzureAIProviderConfig, type AzureOpenAIProviderConfig, BaseCacheConfig, type BaseProviderConfig, type BedrockProviderConfig, COST_SUMMARY_GROUP_BY, CacheBackend, CacheBackendType, CacheConfig, CacheEntry, CacheOptions, CacheService, CacheStats, ChatCompletionCreateParamsBase, type Config, type ConfigVariant, type ConfigVariantsDataLayer, type ConfigVariantsTable, type ConfigsDataLayer, type ConfigsTable, type CortexProviderConfig, CostResult, type CostSummaryGroupBy, DEFAULT_PROVIDER_ENV_VARS, type DataLayer, type Database, DatabaseConnection, DatabaseOptions, DatabaseType, type Dataset, type DatasetRecord, DatasetRecordsTable, type DatasetVersion, type DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, type DatasetsDataLayer, DatasetsTable, type Environment, type EnvironmentSecret, type EnvironmentSecretsDataLayer, type EnvironmentSecretsTable, type EnvironmentsDataLayer, type EnvironmentsTable, FileCacheBackend, FileCacheConfig, type FireworksAIProviderConfig, type GatewayManifest, type GoogleProviderConfig, type GuardrailConfig, type GuardrailConfigsDataLayer, GuardrailConfigsTable, type GuardrailResult, type GuardrailResults, type HuggingFaceProviderConfig, type InlineProviderConfig, type InlineProvidersConfig, Insertable, LLMOPS_INTERNAL_HEADER, LLMOPS_REQUEST_ID_HEADER, LLMOPS_SESSION_ID_HEADER, LLMOPS_SPAN_ID_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER, LLMOPS_USER_ID_HEADER, LLMOpsClient, LLMOpsConfig, type LLMOpsConfigInput, LLMOpsPricingProvider, type LLMRequest, type LLMRequestInsert, type LLMRequestsDataLayer, LLMRequestsTable, MS, ManifestBuilder, type ManifestConfig, type ManifestEnvironment, type ManifestGuardrail, type ManifestProviderGuardrailOverride, ManifestRouter, ManifestService, type ManifestTargetingRule, type ManifestVariantVersion, MemoryCacheBackend, MemoryCacheConfig, MigrationOptions, MigrationResult, type MistralAIProviderConfig, ModelPricing, type OpenAIProviderConfig, type OracleProviderConfig, type Playground, type PlaygroundColumn, type PlaygroundResult, type PlaygroundResultsDataLayer, PlaygroundResultsTable, type PlaygroundRun, type PlaygroundRunsDataLayer, PlaygroundRunsTable, type PlaygroundsDataLayer, PlaygroundsTable, Prettify, PricingProvider, type ProviderConfig, type ProviderConfigMap, type ProviderConfigsDataLayer, ProviderConfigsTable, type ProviderGuardrailOverride, type ProviderGuardrailOverridesDataLayer, ProviderGuardrailOverridesTable, type ProvidersConfig, type RoutingContext, type RoutingResult, SCHEMA_METADATA, type SagemakerProviderConfig, Selectable, Span, SpanEvent, type SpanEventInsert, SpanEventsTable, type SpanInsert, SpansTable, type StabilityAIProviderConfig, SupportedProviders, type TableName, type TargetingRule, type TargetingRulesDataLayer, type TargetingRulesTable, Trace, type TraceUpsert, type TracesDataLayer, TracesTable, Updateable, UsageData, type ValidatedLLMOpsConfig, type Variant, VariantJsonData, type VariantVersion, type VariantVersionsDataLayer, VariantVersionsTable, type VariantsDataLayer, type VariantsTable, type VertexAIProviderConfig, type WorkersAIProviderConfig, type WorkspaceSettings, type WorkspaceSettingsDataLayer, WorkspaceSettingsTable, calculateCacheAwareCost, calculateCost, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createConfigDataLayer, createConfigVariantDataLayer, createDataLayer, createDatabase, createDatabaseFromConnection, createDatasetsDataLayer, createEnvironmentDataLayer, createEnvironmentSecretDataLayer, createGuardrailConfigsDataLayer, createLLMRequestsDataLayer, createNeonDialect, createPlaygroundDataLayer, createPlaygroundResultsDataLayer, createPlaygroundRunsDataLayer, createProviderConfigsDataLayer, createProviderGuardrailOverridesDataLayer, createTargetingRulesDataLayer, createTracesDataLayer, createVariantDataLayer, createVariantVersionsDataLayer, createWorkspaceSettingsDataLayer, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, dollarsToMicroDollars, environmentSecretsSchema, environmentsSchema, executeWithSchema, formatCost, gateway, generateId, getAuthClientOptions, getDefaultPricingProvider, getDefaultProviders, getMigrations, guardrailConfigsSchema, llmRequestsSchema, llmopsConfigSchema, logger, matchType, mergeWithDefaultProviders, microDollarsToDollars, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as schemas, B as any, C as llmRequestsSchema, D as playgroundsSchema, E as playgroundRunsSchema, F as variantVersionsSchema, G as object, H as boolean, I as variantsSchema, J as union, K as record, L as workspaceSettingsSchema, M as spansSchema, N as targetingRulesSchema, O as providerConfigsSchema, P as tracesSchema, R as zod_default, S as guardrailConfigsSchema, T as playgroundResultsSchema, U as literal, V as array, W as number, Y as unknown, _ as datasetVersionRecordsSchema, a as matchType, b as environmentSecretsSchema, c as logger, d as validatePartialTableData, f as validateTableData, g as datasetRecordsSchema, h as configsSchema, i as getMigrations, j as spanEventsSchema, k as providerGuardrailOverridesSchema, l as parsePartialTableData, m as configVariantsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as SCHEMA_METADATA, q as string, r as detectDatabaseType, s as getAuthClientOptions, t as createDatabase, u as parseTableData, v as datasetVersionsSchema, w as playgroundColumnSchema, x as environmentsSchema, y as datasetsSchema, z as _enum } from "./db-CQvUnGBp.mjs";
1
+ import { A as schemas, B as any, C as llmRequestsSchema, D as playgroundsSchema, E as playgroundRunsSchema, F as variantVersionsSchema, G as object, H as boolean, I as variantsSchema, J as union, K as record, L as workspaceSettingsSchema, M as spansSchema, N as targetingRulesSchema, O as providerConfigsSchema, P as tracesSchema, R as zod_default, S as guardrailConfigsSchema, T as playgroundResultsSchema, U as literal, V as array, W as number, Y as unknown, _ as datasetVersionRecordsSchema, a as matchType, b as environmentSecretsSchema, c as logger, d as validatePartialTableData, f as validateTableData, g as datasetRecordsSchema, h as configsSchema, i as getMigrations, j as spanEventsSchema, k as providerGuardrailOverridesSchema, l as parsePartialTableData, m as configVariantsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as SCHEMA_METADATA, q as string, r as detectDatabaseType, s as getAuthClientOptions, t as createDatabase, u as parseTableData, v as datasetVersionsSchema, w as playgroundColumnSchema, x as environmentsSchema, y as datasetsSchema, z as _enum } from "./db-Cd1KR24Y.mjs";
2
2
  import { n as executeWithSchema, t as createNeonDialect } from "./neon-dialect-DySGBYUi.mjs";
3
3
  import gateway from "@llmops/gateway";
4
4
  import { sql } from "kysely";
@@ -2000,7 +2000,9 @@ const insertLLMRequestSchema = zod_default.object({
2000
2000
  completionTokens: zod_default.number().int().default(0),
2001
2001
  totalTokens: zod_default.number().int().default(0),
2002
2002
  cachedTokens: zod_default.number().int().default(0),
2003
+ cacheCreationTokens: zod_default.number().int().default(0),
2003
2004
  cost: zod_default.number().int().default(0),
2005
+ cacheSavings: zod_default.number().int().default(0),
2004
2006
  inputCost: zod_default.number().int().default(0),
2005
2007
  outputCost: zod_default.number().int().default(0),
2006
2008
  endpoint: zod_default.string(),
@@ -2095,7 +2097,9 @@ const createLLMRequestsDataLayer = (db) => {
2095
2097
  completionTokens: req.completionTokens,
2096
2098
  totalTokens: req.totalTokens,
2097
2099
  cachedTokens: req.cachedTokens,
2100
+ cacheCreationTokens: req.cacheCreationTokens,
2098
2101
  cost: req.cost,
2102
+ cacheSavings: req.cacheSavings,
2099
2103
  inputCost: req.inputCost,
2100
2104
  outputCost: req.outputCost,
2101
2105
  endpoint: req.endpoint,
@@ -2133,7 +2137,9 @@ const createLLMRequestsDataLayer = (db) => {
2133
2137
  completionTokens: req.completionTokens,
2134
2138
  totalTokens: req.totalTokens,
2135
2139
  cachedTokens: req.cachedTokens,
2140
+ cacheCreationTokens: req.cacheCreationTokens,
2136
2141
  cost: req.cost,
2142
+ cacheSavings: req.cacheSavings,
2137
2143
  inputCost: req.inputCost,
2138
2144
  outputCost: req.outputCost,
2139
2145
  endpoint: req.endpoint,
@@ -2195,6 +2201,8 @@ const createLLMRequestsDataLayer = (db) => {
2195
2201
  sql`COALESCE(SUM(${col$1("promptTokens")}), 0)`.as("totalPromptTokens"),
2196
2202
  sql`COALESCE(SUM(${col$1("completionTokens")}), 0)`.as("totalCompletionTokens"),
2197
2203
  sql`COALESCE(SUM(${col$1("totalTokens")}), 0)`.as("totalTokens"),
2204
+ sql`COALESCE(SUM(${col$1("cachedTokens")}), 0)`.as("totalCachedTokens"),
2205
+ sql`COALESCE(SUM(${col$1("cacheSavings")}), 0)`.as("totalCacheSavings"),
2198
2206
  sql`COUNT(*)`.as("requestCount")
2199
2207
  ]).where(sql`${col$1("createdAt")} >= ${startDate.toISOString()}`).where(sql`${col$1("createdAt")} <= ${endDate.toISOString()}`);
2200
2208
  if (configId) query = query.where("configId", "=", configId);
@@ -3708,7 +3716,64 @@ function calculateCost(usage, pricing) {
3708
3716
  return {
3709
3717
  inputCost,
3710
3718
  outputCost,
3711
- totalCost: inputCost + outputCost
3719
+ totalCost: inputCost + outputCost,
3720
+ cacheSavings: 0
3721
+ };
3722
+ }
3723
+ /**
3724
+ * Get default cache read rate as a fraction of input cost per provider.
3725
+ * Used when models.dev doesn't provide cache pricing.
3726
+ */
3727
+ function getDefaultCacheReadRate(provider, inputCostPer1M) {
3728
+ switch (provider?.toLowerCase()) {
3729
+ case "anthropic": return inputCostPer1M * .1;
3730
+ case "openai":
3731
+ case "azure-openai": return inputCostPer1M * .5;
3732
+ case "google":
3733
+ case "gemini":
3734
+ case "vertex_ai": return inputCostPer1M * .25;
3735
+ default: return inputCostPer1M * .5;
3736
+ }
3737
+ }
3738
+ /**
3739
+ * Get default cache write/creation rate as a fraction of input cost per provider.
3740
+ * Used when models.dev doesn't provide cache pricing.
3741
+ */
3742
+ function getDefaultCacheWriteRate(provider, inputCostPer1M) {
3743
+ switch (provider?.toLowerCase()) {
3744
+ case "anthropic": return inputCostPer1M * 1.25;
3745
+ default: return inputCostPer1M;
3746
+ }
3747
+ }
3748
+ /**
3749
+ * Calculate cache-aware cost of an LLM request in micro-dollars.
3750
+ *
3751
+ * Splits input tokens into uncached, cache-read, and cache-creation buckets,
3752
+ * each priced at different rates. Falls back to provider-specific multipliers
3753
+ * when models.dev doesn't provide cache pricing.
3754
+ *
3755
+ * @param usage - Token usage data (with cachedTokens and cacheCreationTokens)
3756
+ * @param pricing - Model pricing (may include cacheReadCostPer1M / cacheWriteCostPer1M)
3757
+ * @param provider - Provider name for fallback rate selection
3758
+ * @returns Cost breakdown in micro-dollars
3759
+ */
3760
+ function calculateCacheAwareCost(usage, pricing, provider) {
3761
+ const cachedTokens = usage.cachedTokens ?? 0;
3762
+ const cacheCreationTokens = usage.cacheCreationTokens ?? 0;
3763
+ if (cachedTokens === 0 && cacheCreationTokens === 0) return calculateCost(usage, pricing);
3764
+ const cacheReadRate = pricing.cacheReadCostPer1M ?? getDefaultCacheReadRate(provider, pricing.inputCostPer1M);
3765
+ const cacheWriteRate = pricing.cacheWriteCostPer1M ?? getDefaultCacheWriteRate(provider, pricing.inputCostPer1M);
3766
+ const uncachedInputTokens = Math.max(0, usage.promptTokens - cachedTokens - cacheCreationTokens);
3767
+ const regularInputCost = Math.round(uncachedInputTokens * pricing.inputCostPer1M);
3768
+ const cacheReadCost = Math.round(cachedTokens * cacheReadRate);
3769
+ const cacheWriteCost = Math.round(cacheCreationTokens * cacheWriteRate);
3770
+ const outputCost = Math.round(usage.completionTokens * pricing.outputCostPer1M);
3771
+ const inputCost = regularInputCost + cacheReadCost + cacheWriteCost;
3772
+ return {
3773
+ inputCost,
3774
+ outputCost,
3775
+ totalCost: inputCost + outputCost,
3776
+ cacheSavings: Math.round((cachedTokens + cacheCreationTokens) * pricing.inputCostPer1M) - cacheReadCost - cacheWriteCost
3712
3777
  };
3713
3778
  }
3714
3779
  /**
@@ -3760,111 +3825,108 @@ function formatCost(microDollars, decimals = 6) {
3760
3825
 
3761
3826
  //#endregion
3762
3827
  //#region src/pricing/provider.ts
3763
- const MODELS_DEV_API = "https://models.dev/api.json";
3828
+ const LLMOPS_MODELS_API = "https://models.llmops.build";
3829
+ /**
3830
+ * Convert price from USD cents per token to dollars per 1M tokens.
3831
+ *
3832
+ * API returns cents/token. Our system uses dollars/1M tokens.
3833
+ * Formula: (centsPerToken / 100) * 1_000_000 = centsPerToken * 10_000
3834
+ */
3835
+ function centsPerTokenToCostPer1M(centsPerToken) {
3836
+ return centsPerToken * 1e4;
3837
+ }
3764
3838
  /**
3765
- * Pricing provider that fetches data from models.dev API
3839
+ * Pricing provider that fetches per-model data from the LLMOps Models API.
3766
3840
  *
3767
3841
  * Features:
3768
- * - Caches pricing data with configurable TTL (default 5 minutes)
3769
- * - Supports fallback to local cache on fetch failure
3770
- * - Thread-safe cache refresh
3842
+ * - Per-model in-memory cache with configurable TTL (default 5 minutes)
3843
+ * - Deduplicates concurrent fetches for the same model
3844
+ * - Caches null results (404s) to avoid repeated lookups
3845
+ * - Falls back to stale cache on fetch errors
3771
3846
  */
3772
- var ModelsDevPricingProvider = class {
3847
+ var LLMOpsPricingProvider = class {
3773
3848
  cache = /* @__PURE__ */ new Map();
3774
- lastFetch = 0;
3849
+ pendingFetches = /* @__PURE__ */ new Map();
3775
3850
  cacheTTL;
3776
- fetchPromise = null;
3777
- ready = false;
3778
- /**
3779
- * Create a new ModelsDevPricingProvider
3780
- *
3781
- * @param cacheTTL - Cache TTL in milliseconds (default: 5 minutes)
3782
- */
3783
- constructor(cacheTTL = 300 * 1e3) {
3784
- this.cacheTTL = cacheTTL;
3851
+ baseUrl;
3852
+ constructor(options) {
3853
+ this.cacheTTL = options?.cacheTTL ?? 300 * 1e3;
3854
+ this.baseUrl = options?.baseUrl ?? LLMOPS_MODELS_API;
3785
3855
  }
3786
- /**
3787
- * Generate a cache key for a provider/model combination
3788
- */
3789
3856
  getCacheKey(provider, model) {
3790
3857
  return `${provider.toLowerCase()}:${model.toLowerCase()}`;
3791
3858
  }
3792
3859
  /**
3793
- * Fetch pricing data from models.dev API
3860
+ * Fetch pricing for a single model from the API
3794
3861
  */
3795
- async fetchPricingData() {
3862
+ async fetchModelPricing(provider, model) {
3863
+ const url = `${this.baseUrl}/model-configs/pricing/${encodeURIComponent(provider)}/${model}`;
3796
3864
  try {
3797
- logger.debug("[Pricing] Fetching pricing data from models.dev");
3798
- const response = await fetch(MODELS_DEV_API);
3799
- if (!response.ok) throw new Error(`Failed to fetch models.dev API: ${response.status}`);
3800
- const data = await response.json();
3801
- this.cache.clear();
3802
- for (const [providerId, provider] of Object.entries(data)) {
3803
- if (!provider.models) continue;
3804
- for (const [_modelId, model] of Object.entries(provider.models)) {
3805
- if (!model.cost) continue;
3806
- const cacheKey = this.getCacheKey(providerId, model.id);
3807
- this.cache.set(cacheKey, {
3808
- inputCostPer1M: model.cost.input ?? 0,
3809
- outputCostPer1M: model.cost.output ?? 0,
3810
- cacheReadCostPer1M: model.cost.cache_read,
3811
- cacheWriteCostPer1M: model.cost.cache_write,
3812
- reasoningCostPer1M: model.cost.reasoning
3813
- });
3814
- const nameKey = this.getCacheKey(providerId, model.name);
3815
- if (nameKey !== cacheKey) this.cache.set(nameKey, this.cache.get(cacheKey));
3816
- }
3865
+ logger.debug(`[Pricing] GET ${url}`);
3866
+ const startTime = Date.now();
3867
+ const response = await fetch(url);
3868
+ const elapsed = Date.now() - startTime;
3869
+ logger.debug(`[Pricing] GET ${url} -> ${response.status} (${elapsed}ms)`);
3870
+ if (response.status === 404) {
3871
+ logger.debug(`[Pricing] No pricing found for ${provider}/${model}`);
3872
+ return null;
3817
3873
  }
3818
- this.lastFetch = Date.now();
3819
- this.ready = true;
3820
- logger.debug(`[Pricing] Cached pricing for ${this.cache.size} models from models.dev`);
3874
+ if (!response.ok) throw new Error(`API returned ${response.status}`);
3875
+ const data = await response.json();
3876
+ if (!data.pay_as_you_go) return null;
3877
+ const payg = data.pay_as_you_go;
3878
+ const pricing = {
3879
+ inputCostPer1M: centsPerTokenToCostPer1M(payg.request_token?.price ?? 0),
3880
+ outputCostPer1M: centsPerTokenToCostPer1M(payg.response_token?.price ?? 0),
3881
+ cacheReadCostPer1M: payg.cache_read_input_token?.price != null ? centsPerTokenToCostPer1M(payg.cache_read_input_token.price) : void 0,
3882
+ cacheWriteCostPer1M: payg.cache_write_input_token?.price != null ? centsPerTokenToCostPer1M(payg.cache_write_input_token.price) : void 0
3883
+ };
3884
+ logger.debug(`[Pricing] Cached pricing for ${provider}/${model}: input=$${pricing.inputCostPer1M}/1M, output=$${pricing.outputCostPer1M}/1M`);
3885
+ return pricing;
3821
3886
  } catch (error) {
3822
- logger.error(`[Pricing] Failed to fetch pricing data: ${error instanceof Error ? error.message : String(error)}`);
3823
- if (this.cache.size === 0) throw error;
3887
+ logger.error(`[Pricing] Failed to fetch pricing for ${provider}/${model}: ${error instanceof Error ? error.message : String(error)}`);
3888
+ const cacheKey = this.getCacheKey(provider, model);
3889
+ const stale = this.cache.get(cacheKey);
3890
+ if (stale) {
3891
+ logger.debug(`[Pricing] Using stale cache for ${provider}/${model}`);
3892
+ return stale.pricing;
3893
+ }
3894
+ return null;
3824
3895
  }
3825
3896
  }
3826
3897
  /**
3827
- * Ensure cache is fresh, fetching if necessary
3828
- */
3829
- async ensureFreshCache() {
3830
- if (!(Date.now() - this.lastFetch > this.cacheTTL) && this.cache.size > 0) return;
3831
- if (!this.fetchPromise) this.fetchPromise = this.fetchPricingData().finally(() => {
3832
- this.fetchPromise = null;
3833
- });
3834
- await this.fetchPromise;
3835
- }
3836
- /**
3837
3898
  * Get pricing for a specific model
3838
3899
  */
3839
3900
  async getModelPricing(provider, model) {
3840
- await this.ensureFreshCache();
3841
3901
  const cacheKey = this.getCacheKey(provider, model);
3842
- const pricing = this.cache.get(cacheKey);
3843
- if (!pricing) {
3844
- logger.debug(`[Pricing] No pricing found for ${provider}/${model}, trying partial match`);
3845
- for (const [key, value] of this.cache.entries()) if (key.startsWith(`${provider.toLowerCase()}:`)) {
3846
- const modelPart = key.split(":")[1];
3847
- if (model.toLowerCase().includes(modelPart)) {
3848
- logger.debug(`[Pricing] Found partial match: ${key}`);
3849
- return value;
3850
- }
3851
- }
3852
- return null;
3902
+ const cached = this.cache.get(cacheKey);
3903
+ if (cached && Date.now() - cached.fetchedAt < this.cacheTTL) return cached.pricing;
3904
+ let pending = this.pendingFetches.get(cacheKey);
3905
+ if (!pending) {
3906
+ pending = this.fetchModelPricing(provider, model).then((pricing) => {
3907
+ this.cache.set(cacheKey, {
3908
+ pricing,
3909
+ fetchedAt: Date.now()
3910
+ });
3911
+ return pricing;
3912
+ }).finally(() => {
3913
+ this.pendingFetches.delete(cacheKey);
3914
+ });
3915
+ this.pendingFetches.set(cacheKey, pending);
3853
3916
  }
3854
- return pricing;
3917
+ return pending;
3855
3918
  }
3856
3919
  /**
3857
- * Force refresh the pricing cache
3920
+ * Force refresh the pricing cache (clears all cached entries)
3858
3921
  */
3859
3922
  async refreshCache() {
3860
- this.lastFetch = 0;
3861
- await this.ensureFreshCache();
3923
+ this.cache.clear();
3862
3924
  }
3863
3925
  /**
3864
- * Check if the provider is ready
3926
+ * Always ready no bulk pre-fetch needed
3865
3927
  */
3866
3928
  isReady() {
3867
- return this.ready;
3929
+ return true;
3868
3930
  }
3869
3931
  /**
3870
3932
  * Get the number of cached models (for debugging)
@@ -3878,7 +3940,7 @@ let defaultProvider = null;
3878
3940
  * Get the default pricing provider instance
3879
3941
  */
3880
3942
  function getDefaultPricingProvider() {
3881
- if (!defaultProvider) defaultProvider = new ModelsDevPricingProvider();
3943
+ if (!defaultProvider) defaultProvider = new LLMOpsPricingProvider();
3882
3944
  return defaultProvider;
3883
3945
  }
3884
3946
 
@@ -4251,4 +4313,4 @@ var ManifestRouter = class {
4251
4313
  };
4252
4314
 
4253
4315
  //#endregion
4254
- export { COST_SUMMARY_GROUP_BY, CacheService, DEFAULT_PROVIDER_ENV_VARS, FileCacheBackend, LLMOPS_INTERNAL_HEADER, LLMOPS_REQUEST_ID_HEADER, LLMOPS_SESSION_ID_HEADER, LLMOPS_SPAN_ID_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER, LLMOPS_USER_ID_HEADER, MS, ManifestBuilder, ManifestRouter, ManifestService, MemoryCacheBackend, ModelsDevPricingProvider, SCHEMA_METADATA, SupportedProviders, calculateCost, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createConfigDataLayer, createConfigVariantDataLayer, createDataLayer, createDatabase, createDatabaseFromConnection, createDatasetsDataLayer, createEnvironmentDataLayer, createEnvironmentSecretDataLayer, createGuardrailConfigsDataLayer, createLLMRequestsDataLayer, createNeonDialect, createPlaygroundDataLayer, createPlaygroundResultsDataLayer, createPlaygroundRunsDataLayer, createProviderConfigsDataLayer, createProviderGuardrailOverridesDataLayer, createTargetingRulesDataLayer, createTracesDataLayer, createVariantDataLayer, createVariantVersionsDataLayer, createWorkspaceSettingsDataLayer, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, dollarsToMicroDollars, environmentSecretsSchema, environmentsSchema, executeWithSchema, formatCost, gateway, generateId, getAuthClientOptions, getDefaultPricingProvider, getDefaultProviders, getMigrations, guardrailConfigsSchema, llmRequestsSchema, llmopsConfigSchema, logger, matchType, mergeWithDefaultProviders, microDollarsToDollars, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
4316
+ export { COST_SUMMARY_GROUP_BY, CacheService, DEFAULT_PROVIDER_ENV_VARS, FileCacheBackend, LLMOPS_INTERNAL_HEADER, LLMOPS_REQUEST_ID_HEADER, LLMOPS_SESSION_ID_HEADER, LLMOPS_SPAN_ID_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER, LLMOPS_USER_ID_HEADER, LLMOpsPricingProvider, MS, ManifestBuilder, ManifestRouter, ManifestService, MemoryCacheBackend, SCHEMA_METADATA, SupportedProviders, calculateCacheAwareCost, calculateCost, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createConfigDataLayer, createConfigVariantDataLayer, createDataLayer, createDatabase, createDatabaseFromConnection, createDatasetsDataLayer, createEnvironmentDataLayer, createEnvironmentSecretDataLayer, createGuardrailConfigsDataLayer, createLLMRequestsDataLayer, createNeonDialect, createPlaygroundDataLayer, createPlaygroundResultsDataLayer, createPlaygroundRunsDataLayer, createProviderConfigsDataLayer, createProviderGuardrailOverridesDataLayer, createTargetingRulesDataLayer, createTracesDataLayer, createVariantDataLayer, createVariantVersionsDataLayer, createWorkspaceSettingsDataLayer, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, dollarsToMicroDollars, environmentSecretsSchema, environmentsSchema, executeWithSchema, formatCost, gateway, generateId, getAuthClientOptions, getDefaultPricingProvider, getDefaultProviders, getMigrations, guardrailConfigsSchema, llmRequestsSchema, llmopsConfigSchema, logger, matchType, mergeWithDefaultProviders, microDollarsToDollars, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
@@ -1,3 +1,3 @@
1
- const require_neon_dialect = require('./neon-dialect-SqAJhPFS.cjs');
1
+ const require_neon_dialect = require('./neon-dialect-oh8u9vRy.cjs');
2
2
 
3
3
  exports.createNeonDialect = require_neon_dialect.createNeonDialect;
@@ -1,4 +1,4 @@
1
- const require_db = require('./db-C6ApWDjW.cjs');
1
+ const require_db = require('./db-i0OOYxJm.cjs');
2
2
  let kysely_neon = require("kysely-neon");
3
3
  require("@neondatabase/serverless");
4
4
 
@@ -1,4 +1,4 @@
1
- const require_db = require('./db-C6ApWDjW.cjs');
1
+ const require_db = require('./db-i0OOYxJm.cjs');
2
2
  let kysely = require("kysely");
3
3
 
4
4
  //#region src/db/node-sqlite-dialect.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmops/core",
3
- "version": "0.6.1",
3
+ "version": "0.6.3-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.6.1"
58
+ "@llmops/gateway": "^0.6.3-beta.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/json-logic-js": "^2.0.8",