@llmops/core 0.1.0-beta.8 → 0.1.1-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.
@@ -0,0 +1,2088 @@
1
+ import { A as TargetingRulesTable, B as schemas, C as EnvironmentSecretsTable, D as Selectable, E as SCHEMA_METADATA, F as VariantsTable, H as variantVersionsSchema, I as configVariantsSchema, L as configsSchema, M as Variant, N as VariantVersion, O as TableName, P as VariantVersionsTable, R as environmentSecretsSchema, S as EnvironmentSecret, T as Insertable, U as variantsSchema, V as targetingRulesSchema, _ as ConfigVariant, a as createDatabaseFromConnection, b as Database, c as MigrationResult, d as runAutoMigrations, f as parsePartialTableData, g as Config, h as validateTableData, i as createDatabase, j as Updateable, k as TargetingRule, l as getMigrations, m as validatePartialTableData, n as DatabaseOptions, o as detectDatabaseType, p as parseTableData, r as DatabaseType, s as MigrationOptions, t as DatabaseConnection, u as matchType, v as ConfigVariantsTable, w as EnvironmentsTable, x as Environment, y as ConfigsTable, z as environmentsSchema } from "./index-CG30o-6r.cjs";
2
+ import { Kysely } from "kysely";
3
+ import * as zod0 from "zod";
4
+ import { z } from "zod";
5
+ import gateway from "@llmops/gateway";
6
+ import pino from "pino";
7
+ import * as zod_v4_core0 from "zod/v4/core";
8
+
9
+ //#region src/providers/supported-providers.d.ts
10
+ /**
11
+ * Supported providers - derived from @llmops/gateway providers
12
+ * @see packages/gateway/src/providers/index.ts
13
+ */
14
+ declare enum SupportedProviders {
15
+ OPENAI = "openai",
16
+ COHERE = "cohere",
17
+ ANTHROPIC = "anthropic",
18
+ AZURE_OPENAI = "azure-openai",
19
+ HUGGINGFACE = "huggingface",
20
+ ANYSCALE = "anyscale",
21
+ PALM = "palm",
22
+ TOGETHER_AI = "together-ai",
23
+ GOOGLE = "google",
24
+ VERTEX_AI = "vertex-ai",
25
+ PERPLEXITY_AI = "perplexity-ai",
26
+ MISTRAL_AI = "mistral-ai",
27
+ DEEPINFRA = "deepinfra",
28
+ NCOMPASS = "ncompass",
29
+ STABILITY_AI = "stability-ai",
30
+ NOMIC = "nomic",
31
+ OLLAMA = "ollama",
32
+ AI21 = "ai21",
33
+ BEDROCK = "bedrock",
34
+ GROQ = "groq",
35
+ SEGMIND = "segmind",
36
+ JINA = "jina",
37
+ FIREWORKS_AI = "fireworks-ai",
38
+ WORKERS_AI = "workers-ai",
39
+ REKA_AI = "reka-ai",
40
+ MOONSHOT = "moonshot",
41
+ OPENROUTER = "openrouter",
42
+ LINGYI = "lingyi",
43
+ ZHIPU = "zhipu",
44
+ NOVITA_AI = "novita-ai",
45
+ MONSTERAPI = "monsterapi",
46
+ DEEPSEEK = "deepseek",
47
+ PREDIBASE = "predibase",
48
+ TRITON = "triton",
49
+ VOYAGE = "voyage",
50
+ AZURE_AI = "azure-ai",
51
+ GITHUB = "github",
52
+ DEEPBRICKS = "deepbricks",
53
+ SILICONFLOW = "siliconflow",
54
+ CEREBRAS = "cerebras",
55
+ INFERENCE_NET = "inference-net",
56
+ SAMBANOVA = "sambanova",
57
+ LEMONFOX_AI = "lemonfox-ai",
58
+ UPSTAGE = "upstage",
59
+ LAMBDA = "lambda",
60
+ DASHSCOPE = "dashscope",
61
+ X_AI = "x-ai",
62
+ QDRANT = "qdrant",
63
+ SAGEMAKER = "sagemaker",
64
+ NEBIUS = "nebius",
65
+ RECRAFT_AI = "recraft-ai",
66
+ MILVUS = "milvus",
67
+ REPLICATE = "replicate",
68
+ LEPTON = "lepton",
69
+ KLUSTER_AI = "kluster-ai",
70
+ NSCALE = "nscale",
71
+ HYPERBOLIC = "hyperbolic",
72
+ BYTEZ = "bytez",
73
+ FEATHERLESS_AI = "featherless-ai",
74
+ KRUTRIM = "krutrim",
75
+ AI302 = "302ai",
76
+ COMETAPI = "cometapi",
77
+ MATTERAI = "matterai",
78
+ MESHY = "meshy",
79
+ NEXTBIT = "nextbit",
80
+ TRIPO3D = "tripo3d",
81
+ MODAL = "modal",
82
+ Z_AI = "z-ai",
83
+ ORACLE = "oracle",
84
+ IOINTELLIGENCE = "iointelligence",
85
+ AIBADGR = "aibadgr",
86
+ }
87
+ //#endregion
88
+ //#region src/providers/provider-configs.d.ts
89
+ /**
90
+ * Base provider configuration - all providers require at least an API key
91
+ */
92
+ interface BaseProviderConfig {
93
+ /** The API key for authentication */
94
+ apiKey: string;
95
+ /** Custom base URL for the provider */
96
+ customHost?: string;
97
+ /** Request timeout in milliseconds */
98
+ requestTimeout?: number;
99
+ /** Headers to forward to the provider */
100
+ forwardHeaders?: string[];
101
+ }
102
+ /**
103
+ * OpenAI-specific configuration
104
+ */
105
+ interface OpenAIProviderConfig extends BaseProviderConfig {
106
+ /** OpenAI organization ID */
107
+ openaiOrganization?: string;
108
+ /** OpenAI project ID */
109
+ openaiProject?: string;
110
+ /** OpenAI beta features header */
111
+ openaiBeta?: string;
112
+ }
113
+ /**
114
+ * Anthropic-specific configuration
115
+ */
116
+ interface AnthropicProviderConfig extends BaseProviderConfig {
117
+ /** Anthropic beta features header */
118
+ anthropicBeta?: string;
119
+ /** Anthropic API version */
120
+ anthropicVersion?: string;
121
+ }
122
+ /**
123
+ * Azure OpenAI-specific configuration
124
+ */
125
+ interface AzureOpenAIProviderConfig extends BaseProviderConfig {
126
+ /** Azure resource name */
127
+ resourceName?: string;
128
+ /** Azure deployment ID */
129
+ deploymentId?: string;
130
+ /** Azure API version */
131
+ apiVersion?: string;
132
+ /** Azure model name */
133
+ azureModelName?: string;
134
+ /** Azure authentication mode: 'apiKey' | 'entra' | 'managed' | 'workload' */
135
+ azureAuthMode?: string;
136
+ /** Azure AD token for authentication */
137
+ azureAdToken?: string;
138
+ /** Azure managed identity client ID */
139
+ azureManagedClientId?: string;
140
+ /** Azure workload identity client ID */
141
+ azureWorkloadClientId?: string;
142
+ /** Azure Entra client ID */
143
+ azureEntraClientId?: string;
144
+ /** Azure Entra client secret */
145
+ azureEntraClientSecret?: string;
146
+ /** Azure Entra tenant ID */
147
+ azureEntraTenantId?: string;
148
+ /** Azure Entra scope */
149
+ azureEntraScope?: string;
150
+ }
151
+ /**
152
+ * Azure AI (Foundry) specific configuration
153
+ */
154
+ interface AzureAIProviderConfig extends BaseProviderConfig {
155
+ /** Azure API version */
156
+ azureApiVersion?: string;
157
+ /** Azure Foundry URL */
158
+ azureFoundryUrl?: string;
159
+ /** Azure deployment name */
160
+ azureDeploymentName?: string;
161
+ /** Extra parameters for Azure */
162
+ azureExtraParameters?: string;
163
+ }
164
+ /**
165
+ * AWS Bedrock-specific configuration
166
+ */
167
+ interface BedrockProviderConfig extends BaseProviderConfig {
168
+ /** AWS secret access key */
169
+ awsSecretAccessKey?: string;
170
+ /** AWS access key ID */
171
+ awsAccessKeyId?: string;
172
+ /** AWS session token (for temporary credentials) */
173
+ awsSessionToken?: string;
174
+ /** AWS region (e.g., 'us-east-1') */
175
+ awsRegion?: string;
176
+ /** AWS authentication type: 'assumedRole' | 'apiKey' */
177
+ awsAuthType?: string;
178
+ /** AWS role ARN for assumed role authentication */
179
+ awsRoleArn?: string;
180
+ /** AWS external ID for cross-account access */
181
+ awsExternalId?: string;
182
+ /** AWS Bedrock model ID */
183
+ awsBedrockModel?: string;
184
+ }
185
+ /**
186
+ * AWS Sagemaker-specific configuration
187
+ */
188
+ interface SagemakerProviderConfig extends BedrockProviderConfig {
189
+ /** Sagemaker custom attributes */
190
+ amznSagemakerCustomAttributes?: string;
191
+ /** Sagemaker target model */
192
+ amznSagemakerTargetModel?: string;
193
+ /** Sagemaker target variant */
194
+ amznSagemakerTargetVariant?: string;
195
+ /** Sagemaker target container hostname */
196
+ amznSagemakerTargetContainerHostname?: string;
197
+ /** Sagemaker inference ID */
198
+ amznSagemakerInferenceId?: string;
199
+ /** Sagemaker enable explanations */
200
+ amznSagemakerEnableExplanations?: string;
201
+ /** Sagemaker inference component */
202
+ amznSagemakerInferenceComponent?: string;
203
+ /** Sagemaker session ID */
204
+ amznSagemakerSessionId?: string;
205
+ /** Sagemaker model name */
206
+ amznSagemakerModelName?: string;
207
+ /** AWS S3 bucket for file operations */
208
+ awsS3Bucket?: string;
209
+ /** AWS S3 object key */
210
+ awsS3ObjectKey?: string;
211
+ }
212
+ /**
213
+ * Google Vertex AI-specific configuration
214
+ */
215
+ interface VertexAIProviderConfig extends BaseProviderConfig {
216
+ /** Vertex AI region (e.g., 'us-central1') */
217
+ vertexRegion?: string;
218
+ /** Vertex AI project ID */
219
+ vertexProjectId?: string;
220
+ /** Vertex AI service account JSON credentials */
221
+ vertexServiceAccountJson?: Record<string, unknown>;
222
+ /** Vertex AI storage bucket name */
223
+ vertexStorageBucketName?: string;
224
+ /** Vertex AI model name */
225
+ vertexModelName?: string;
226
+ }
227
+ /**
228
+ * Google AI (Gemini) configuration
229
+ */
230
+ interface GoogleProviderConfig extends BaseProviderConfig {}
231
+ /**
232
+ * Cloudflare Workers AI-specific configuration
233
+ */
234
+ interface WorkersAIProviderConfig extends BaseProviderConfig {
235
+ /** Cloudflare account ID */
236
+ workersAiAccountId?: string;
237
+ }
238
+ /**
239
+ * Stability AI-specific configuration
240
+ */
241
+ interface StabilityAIProviderConfig extends BaseProviderConfig {
242
+ /** Stability client ID */
243
+ stabilityClientId?: string;
244
+ /** Stability client user ID */
245
+ stabilityClientUserId?: string;
246
+ /** Stability client version */
247
+ stabilityClientVersion?: string;
248
+ }
249
+ /**
250
+ * Hugging Face-specific configuration
251
+ */
252
+ interface HuggingFaceProviderConfig extends BaseProviderConfig {
253
+ /** Hugging Face base URL for inference endpoints */
254
+ huggingfaceBaseUrl?: string;
255
+ }
256
+ /**
257
+ * Fireworks AI-specific configuration
258
+ */
259
+ interface FireworksAIProviderConfig extends BaseProviderConfig {
260
+ /** Fireworks account ID */
261
+ fireworksAccountId?: string;
262
+ }
263
+ /**
264
+ * Mistral AI-specific configuration
265
+ */
266
+ interface MistralAIProviderConfig extends BaseProviderConfig {
267
+ /** Use FIM completions endpoint */
268
+ mistralFimCompletion?: string;
269
+ }
270
+ /**
271
+ * Oracle Cloud-specific configuration
272
+ */
273
+ interface OracleProviderConfig extends BaseProviderConfig {
274
+ /** Oracle API version (e.g., '20160918') */
275
+ oracleApiVersion?: string;
276
+ /** Oracle region (e.g., 'us-ashburn-1') */
277
+ oracleRegion?: string;
278
+ /** Oracle compartment ID */
279
+ oracleCompartmentId?: string;
280
+ /** Oracle serving mode: 'ON_DEMAND' | 'DEDICATED' */
281
+ oracleServingMode?: string;
282
+ /** Oracle tenancy OCID */
283
+ oracleTenancy?: string;
284
+ /** Oracle user OCID */
285
+ oracleUser?: string;
286
+ /** Oracle API key fingerprint */
287
+ oracleFingerprint?: string;
288
+ /** Oracle private key (PEM format) */
289
+ oraclePrivateKey?: string;
290
+ /** Oracle key passphrase */
291
+ oracleKeyPassphrase?: string;
292
+ }
293
+ /**
294
+ * Snowflake Cortex-specific configuration
295
+ */
296
+ interface CortexProviderConfig extends BaseProviderConfig {
297
+ /** Snowflake account identifier */
298
+ snowflakeAccount?: string;
299
+ }
300
+ /**
301
+ * Provider config type mapping - maps each provider to its specific config type
302
+ */
303
+ interface ProviderConfigMap {
304
+ [SupportedProviders.OPENAI]: OpenAIProviderConfig;
305
+ [SupportedProviders.ANTHROPIC]: AnthropicProviderConfig;
306
+ [SupportedProviders.AZURE_OPENAI]: AzureOpenAIProviderConfig;
307
+ [SupportedProviders.AZURE_AI]: AzureAIProviderConfig;
308
+ [SupportedProviders.BEDROCK]: BedrockProviderConfig;
309
+ [SupportedProviders.SAGEMAKER]: SagemakerProviderConfig;
310
+ [SupportedProviders.VERTEX_AI]: VertexAIProviderConfig;
311
+ [SupportedProviders.GOOGLE]: GoogleProviderConfig;
312
+ [SupportedProviders.WORKERS_AI]: WorkersAIProviderConfig;
313
+ [SupportedProviders.STABILITY_AI]: StabilityAIProviderConfig;
314
+ [SupportedProviders.HUGGINGFACE]: HuggingFaceProviderConfig;
315
+ [SupportedProviders.FIREWORKS_AI]: FireworksAIProviderConfig;
316
+ [SupportedProviders.MISTRAL_AI]: MistralAIProviderConfig;
317
+ [SupportedProviders.ORACLE]: OracleProviderConfig;
318
+ [SupportedProviders.COHERE]: BaseProviderConfig;
319
+ [SupportedProviders.ANYSCALE]: BaseProviderConfig;
320
+ [SupportedProviders.PALM]: BaseProviderConfig;
321
+ [SupportedProviders.TOGETHER_AI]: BaseProviderConfig;
322
+ [SupportedProviders.PERPLEXITY_AI]: BaseProviderConfig;
323
+ [SupportedProviders.DEEPINFRA]: BaseProviderConfig;
324
+ [SupportedProviders.NCOMPASS]: BaseProviderConfig;
325
+ [SupportedProviders.NOMIC]: BaseProviderConfig;
326
+ [SupportedProviders.OLLAMA]: BaseProviderConfig;
327
+ [SupportedProviders.AI21]: BaseProviderConfig;
328
+ [SupportedProviders.GROQ]: BaseProviderConfig;
329
+ [SupportedProviders.SEGMIND]: BaseProviderConfig;
330
+ [SupportedProviders.JINA]: BaseProviderConfig;
331
+ [SupportedProviders.REKA_AI]: BaseProviderConfig;
332
+ [SupportedProviders.MOONSHOT]: BaseProviderConfig;
333
+ [SupportedProviders.OPENROUTER]: BaseProviderConfig;
334
+ [SupportedProviders.LINGYI]: BaseProviderConfig;
335
+ [SupportedProviders.ZHIPU]: BaseProviderConfig;
336
+ [SupportedProviders.NOVITA_AI]: BaseProviderConfig;
337
+ [SupportedProviders.MONSTERAPI]: BaseProviderConfig;
338
+ [SupportedProviders.DEEPSEEK]: BaseProviderConfig;
339
+ [SupportedProviders.PREDIBASE]: BaseProviderConfig;
340
+ [SupportedProviders.TRITON]: BaseProviderConfig;
341
+ [SupportedProviders.VOYAGE]: BaseProviderConfig;
342
+ [SupportedProviders.GITHUB]: BaseProviderConfig;
343
+ [SupportedProviders.DEEPBRICKS]: BaseProviderConfig;
344
+ [SupportedProviders.SILICONFLOW]: BaseProviderConfig;
345
+ [SupportedProviders.CEREBRAS]: BaseProviderConfig;
346
+ [SupportedProviders.INFERENCE_NET]: BaseProviderConfig;
347
+ [SupportedProviders.SAMBANOVA]: BaseProviderConfig;
348
+ [SupportedProviders.LEMONFOX_AI]: BaseProviderConfig;
349
+ [SupportedProviders.UPSTAGE]: BaseProviderConfig;
350
+ [SupportedProviders.LAMBDA]: BaseProviderConfig;
351
+ [SupportedProviders.DASHSCOPE]: BaseProviderConfig;
352
+ [SupportedProviders.X_AI]: BaseProviderConfig;
353
+ [SupportedProviders.QDRANT]: BaseProviderConfig;
354
+ [SupportedProviders.NEBIUS]: BaseProviderConfig;
355
+ [SupportedProviders.RECRAFT_AI]: BaseProviderConfig;
356
+ [SupportedProviders.MILVUS]: BaseProviderConfig;
357
+ [SupportedProviders.REPLICATE]: BaseProviderConfig;
358
+ [SupportedProviders.LEPTON]: BaseProviderConfig;
359
+ [SupportedProviders.KLUSTER_AI]: BaseProviderConfig;
360
+ [SupportedProviders.NSCALE]: BaseProviderConfig;
361
+ [SupportedProviders.HYPERBOLIC]: BaseProviderConfig;
362
+ [SupportedProviders.BYTEZ]: BaseProviderConfig;
363
+ [SupportedProviders.FEATHERLESS_AI]: BaseProviderConfig;
364
+ [SupportedProviders.KRUTRIM]: BaseProviderConfig;
365
+ [SupportedProviders.AI302]: BaseProviderConfig;
366
+ [SupportedProviders.COMETAPI]: BaseProviderConfig;
367
+ [SupportedProviders.MATTERAI]: BaseProviderConfig;
368
+ [SupportedProviders.MESHY]: BaseProviderConfig;
369
+ [SupportedProviders.NEXTBIT]: BaseProviderConfig;
370
+ [SupportedProviders.TRIPO3D]: BaseProviderConfig;
371
+ [SupportedProviders.MODAL]: BaseProviderConfig;
372
+ [SupportedProviders.Z_AI]: BaseProviderConfig;
373
+ [SupportedProviders.IOINTELLIGENCE]: BaseProviderConfig;
374
+ [SupportedProviders.AIBADGR]: BaseProviderConfig;
375
+ }
376
+ /**
377
+ * Union of all possible provider configs
378
+ */
379
+ type AnyProviderConfig = ProviderConfigMap[SupportedProviders];
380
+ /**
381
+ * Partial provider configurations - all providers are optional
382
+ */
383
+ type ProvidersConfig = { [K in SupportedProviders]?: ProviderConfigMap[K] };
384
+ //#endregion
385
+ //#region src/schemas/config.d.ts
386
+ /**
387
+ * Auto-migration configuration options:
388
+ * - true: Always run migrations on startup
389
+ * - false: Never run migrations on startup (default)
390
+ * - 'development': Only run migrations when NODE_ENV is 'development'
391
+ */
392
+ type AutoMigrateConfig = boolean | 'development';
393
+ declare const llmopsConfigSchema: z.ZodObject<{
394
+ database: z.ZodAny;
395
+ auth: z.ZodObject<{
396
+ type: z.ZodLiteral<"basic">;
397
+ defaultUser: z.ZodString;
398
+ defaultPassword: z.ZodString;
399
+ }, z.core.$strip>;
400
+ basePath: z.ZodString;
401
+ providers: z.ZodObject<{
402
+ openai: z.ZodOptional<z.ZodObject<{
403
+ apiKey: z.ZodString;
404
+ customHost: z.ZodOptional<z.ZodString>;
405
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
406
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
407
+ }, z.core.$loose>>;
408
+ cohere: z.ZodOptional<z.ZodObject<{
409
+ apiKey: z.ZodString;
410
+ customHost: z.ZodOptional<z.ZodString>;
411
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
412
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
413
+ }, z.core.$loose>>;
414
+ anthropic: z.ZodOptional<z.ZodObject<{
415
+ apiKey: z.ZodString;
416
+ customHost: z.ZodOptional<z.ZodString>;
417
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
418
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
419
+ }, z.core.$loose>>;
420
+ "azure-openai": z.ZodOptional<z.ZodObject<{
421
+ apiKey: z.ZodString;
422
+ customHost: z.ZodOptional<z.ZodString>;
423
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
424
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
425
+ }, z.core.$loose>>;
426
+ huggingface: z.ZodOptional<z.ZodObject<{
427
+ apiKey: z.ZodString;
428
+ customHost: z.ZodOptional<z.ZodString>;
429
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
430
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
431
+ }, z.core.$loose>>;
432
+ anyscale: z.ZodOptional<z.ZodObject<{
433
+ apiKey: z.ZodString;
434
+ customHost: z.ZodOptional<z.ZodString>;
435
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
436
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
437
+ }, z.core.$loose>>;
438
+ palm: z.ZodOptional<z.ZodObject<{
439
+ apiKey: z.ZodString;
440
+ customHost: z.ZodOptional<z.ZodString>;
441
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
442
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
443
+ }, z.core.$loose>>;
444
+ "together-ai": z.ZodOptional<z.ZodObject<{
445
+ apiKey: z.ZodString;
446
+ customHost: z.ZodOptional<z.ZodString>;
447
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
448
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
449
+ }, z.core.$loose>>;
450
+ google: z.ZodOptional<z.ZodObject<{
451
+ apiKey: z.ZodString;
452
+ customHost: z.ZodOptional<z.ZodString>;
453
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
454
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
455
+ }, z.core.$loose>>;
456
+ "vertex-ai": z.ZodOptional<z.ZodObject<{
457
+ apiKey: z.ZodString;
458
+ customHost: z.ZodOptional<z.ZodString>;
459
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
460
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
461
+ }, z.core.$loose>>;
462
+ "perplexity-ai": z.ZodOptional<z.ZodObject<{
463
+ apiKey: z.ZodString;
464
+ customHost: z.ZodOptional<z.ZodString>;
465
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
466
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
467
+ }, z.core.$loose>>;
468
+ "mistral-ai": z.ZodOptional<z.ZodObject<{
469
+ apiKey: z.ZodString;
470
+ customHost: z.ZodOptional<z.ZodString>;
471
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
472
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
473
+ }, z.core.$loose>>;
474
+ deepinfra: z.ZodOptional<z.ZodObject<{
475
+ apiKey: z.ZodString;
476
+ customHost: z.ZodOptional<z.ZodString>;
477
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
478
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
479
+ }, z.core.$loose>>;
480
+ ncompass: z.ZodOptional<z.ZodObject<{
481
+ apiKey: z.ZodString;
482
+ customHost: z.ZodOptional<z.ZodString>;
483
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
484
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
485
+ }, z.core.$loose>>;
486
+ "stability-ai": z.ZodOptional<z.ZodObject<{
487
+ apiKey: z.ZodString;
488
+ customHost: z.ZodOptional<z.ZodString>;
489
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
490
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
491
+ }, z.core.$loose>>;
492
+ nomic: z.ZodOptional<z.ZodObject<{
493
+ apiKey: z.ZodString;
494
+ customHost: z.ZodOptional<z.ZodString>;
495
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
496
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
497
+ }, z.core.$loose>>;
498
+ ollama: z.ZodOptional<z.ZodObject<{
499
+ apiKey: z.ZodString;
500
+ customHost: z.ZodOptional<z.ZodString>;
501
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
502
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
503
+ }, z.core.$loose>>;
504
+ ai21: z.ZodOptional<z.ZodObject<{
505
+ apiKey: z.ZodString;
506
+ customHost: z.ZodOptional<z.ZodString>;
507
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
508
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
509
+ }, z.core.$loose>>;
510
+ bedrock: z.ZodOptional<z.ZodObject<{
511
+ apiKey: z.ZodString;
512
+ customHost: z.ZodOptional<z.ZodString>;
513
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
514
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
515
+ }, z.core.$loose>>;
516
+ groq: z.ZodOptional<z.ZodObject<{
517
+ apiKey: z.ZodString;
518
+ customHost: z.ZodOptional<z.ZodString>;
519
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
520
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
521
+ }, z.core.$loose>>;
522
+ segmind: z.ZodOptional<z.ZodObject<{
523
+ apiKey: z.ZodString;
524
+ customHost: z.ZodOptional<z.ZodString>;
525
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
526
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
527
+ }, z.core.$loose>>;
528
+ jina: z.ZodOptional<z.ZodObject<{
529
+ apiKey: z.ZodString;
530
+ customHost: z.ZodOptional<z.ZodString>;
531
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
532
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
533
+ }, z.core.$loose>>;
534
+ "fireworks-ai": z.ZodOptional<z.ZodObject<{
535
+ apiKey: z.ZodString;
536
+ customHost: z.ZodOptional<z.ZodString>;
537
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
538
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
539
+ }, z.core.$loose>>;
540
+ "workers-ai": z.ZodOptional<z.ZodObject<{
541
+ apiKey: z.ZodString;
542
+ customHost: z.ZodOptional<z.ZodString>;
543
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
544
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
545
+ }, z.core.$loose>>;
546
+ "reka-ai": z.ZodOptional<z.ZodObject<{
547
+ apiKey: z.ZodString;
548
+ customHost: z.ZodOptional<z.ZodString>;
549
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
550
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
551
+ }, z.core.$loose>>;
552
+ moonshot: z.ZodOptional<z.ZodObject<{
553
+ apiKey: z.ZodString;
554
+ customHost: z.ZodOptional<z.ZodString>;
555
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
556
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
557
+ }, z.core.$loose>>;
558
+ openrouter: z.ZodOptional<z.ZodObject<{
559
+ apiKey: z.ZodString;
560
+ customHost: z.ZodOptional<z.ZodString>;
561
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
562
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
563
+ }, z.core.$loose>>;
564
+ lingyi: z.ZodOptional<z.ZodObject<{
565
+ apiKey: z.ZodString;
566
+ customHost: z.ZodOptional<z.ZodString>;
567
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
568
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
569
+ }, z.core.$loose>>;
570
+ zhipu: z.ZodOptional<z.ZodObject<{
571
+ apiKey: z.ZodString;
572
+ customHost: z.ZodOptional<z.ZodString>;
573
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
574
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
575
+ }, z.core.$loose>>;
576
+ "novita-ai": z.ZodOptional<z.ZodObject<{
577
+ apiKey: z.ZodString;
578
+ customHost: z.ZodOptional<z.ZodString>;
579
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
580
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
581
+ }, z.core.$loose>>;
582
+ monsterapi: z.ZodOptional<z.ZodObject<{
583
+ apiKey: z.ZodString;
584
+ customHost: z.ZodOptional<z.ZodString>;
585
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
586
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
587
+ }, z.core.$loose>>;
588
+ deepseek: z.ZodOptional<z.ZodObject<{
589
+ apiKey: z.ZodString;
590
+ customHost: z.ZodOptional<z.ZodString>;
591
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
592
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
593
+ }, z.core.$loose>>;
594
+ predibase: z.ZodOptional<z.ZodObject<{
595
+ apiKey: z.ZodString;
596
+ customHost: z.ZodOptional<z.ZodString>;
597
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
598
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
599
+ }, z.core.$loose>>;
600
+ triton: z.ZodOptional<z.ZodObject<{
601
+ apiKey: z.ZodString;
602
+ customHost: z.ZodOptional<z.ZodString>;
603
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
604
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
605
+ }, z.core.$loose>>;
606
+ voyage: z.ZodOptional<z.ZodObject<{
607
+ apiKey: z.ZodString;
608
+ customHost: z.ZodOptional<z.ZodString>;
609
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
610
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
611
+ }, z.core.$loose>>;
612
+ "azure-ai": z.ZodOptional<z.ZodObject<{
613
+ apiKey: z.ZodString;
614
+ customHost: z.ZodOptional<z.ZodString>;
615
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
616
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
617
+ }, z.core.$loose>>;
618
+ github: z.ZodOptional<z.ZodObject<{
619
+ apiKey: z.ZodString;
620
+ customHost: z.ZodOptional<z.ZodString>;
621
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
622
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
623
+ }, z.core.$loose>>;
624
+ deepbricks: z.ZodOptional<z.ZodObject<{
625
+ apiKey: z.ZodString;
626
+ customHost: z.ZodOptional<z.ZodString>;
627
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
628
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
629
+ }, z.core.$loose>>;
630
+ siliconflow: z.ZodOptional<z.ZodObject<{
631
+ apiKey: z.ZodString;
632
+ customHost: z.ZodOptional<z.ZodString>;
633
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
634
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
635
+ }, z.core.$loose>>;
636
+ cerebras: z.ZodOptional<z.ZodObject<{
637
+ apiKey: z.ZodString;
638
+ customHost: z.ZodOptional<z.ZodString>;
639
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
640
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
641
+ }, z.core.$loose>>;
642
+ "inference-net": z.ZodOptional<z.ZodObject<{
643
+ apiKey: z.ZodString;
644
+ customHost: z.ZodOptional<z.ZodString>;
645
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
646
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
647
+ }, z.core.$loose>>;
648
+ sambanova: z.ZodOptional<z.ZodObject<{
649
+ apiKey: z.ZodString;
650
+ customHost: z.ZodOptional<z.ZodString>;
651
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
652
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
653
+ }, z.core.$loose>>;
654
+ "lemonfox-ai": z.ZodOptional<z.ZodObject<{
655
+ apiKey: z.ZodString;
656
+ customHost: z.ZodOptional<z.ZodString>;
657
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
658
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
659
+ }, z.core.$loose>>;
660
+ upstage: z.ZodOptional<z.ZodObject<{
661
+ apiKey: z.ZodString;
662
+ customHost: z.ZodOptional<z.ZodString>;
663
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
664
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
665
+ }, z.core.$loose>>;
666
+ lambda: z.ZodOptional<z.ZodObject<{
667
+ apiKey: z.ZodString;
668
+ customHost: z.ZodOptional<z.ZodString>;
669
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
670
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
671
+ }, z.core.$loose>>;
672
+ dashscope: z.ZodOptional<z.ZodObject<{
673
+ apiKey: z.ZodString;
674
+ customHost: z.ZodOptional<z.ZodString>;
675
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
676
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
677
+ }, z.core.$loose>>;
678
+ "x-ai": z.ZodOptional<z.ZodObject<{
679
+ apiKey: z.ZodString;
680
+ customHost: z.ZodOptional<z.ZodString>;
681
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
682
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
683
+ }, z.core.$loose>>;
684
+ qdrant: z.ZodOptional<z.ZodObject<{
685
+ apiKey: z.ZodString;
686
+ customHost: z.ZodOptional<z.ZodString>;
687
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
688
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
689
+ }, z.core.$loose>>;
690
+ sagemaker: z.ZodOptional<z.ZodObject<{
691
+ apiKey: z.ZodString;
692
+ customHost: z.ZodOptional<z.ZodString>;
693
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
694
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
695
+ }, z.core.$loose>>;
696
+ nebius: z.ZodOptional<z.ZodObject<{
697
+ apiKey: z.ZodString;
698
+ customHost: z.ZodOptional<z.ZodString>;
699
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
700
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
701
+ }, z.core.$loose>>;
702
+ "recraft-ai": z.ZodOptional<z.ZodObject<{
703
+ apiKey: z.ZodString;
704
+ customHost: z.ZodOptional<z.ZodString>;
705
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
706
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
707
+ }, z.core.$loose>>;
708
+ milvus: z.ZodOptional<z.ZodObject<{
709
+ apiKey: z.ZodString;
710
+ customHost: z.ZodOptional<z.ZodString>;
711
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
712
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
713
+ }, z.core.$loose>>;
714
+ replicate: z.ZodOptional<z.ZodObject<{
715
+ apiKey: z.ZodString;
716
+ customHost: z.ZodOptional<z.ZodString>;
717
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
718
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
719
+ }, z.core.$loose>>;
720
+ lepton: z.ZodOptional<z.ZodObject<{
721
+ apiKey: z.ZodString;
722
+ customHost: z.ZodOptional<z.ZodString>;
723
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
724
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
725
+ }, z.core.$loose>>;
726
+ "kluster-ai": z.ZodOptional<z.ZodObject<{
727
+ apiKey: z.ZodString;
728
+ customHost: z.ZodOptional<z.ZodString>;
729
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
730
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
731
+ }, z.core.$loose>>;
732
+ nscale: z.ZodOptional<z.ZodObject<{
733
+ apiKey: z.ZodString;
734
+ customHost: z.ZodOptional<z.ZodString>;
735
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
736
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
737
+ }, z.core.$loose>>;
738
+ hyperbolic: z.ZodOptional<z.ZodObject<{
739
+ apiKey: z.ZodString;
740
+ customHost: z.ZodOptional<z.ZodString>;
741
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
742
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
743
+ }, z.core.$loose>>;
744
+ bytez: z.ZodOptional<z.ZodObject<{
745
+ apiKey: z.ZodString;
746
+ customHost: z.ZodOptional<z.ZodString>;
747
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
748
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
749
+ }, z.core.$loose>>;
750
+ "featherless-ai": z.ZodOptional<z.ZodObject<{
751
+ apiKey: z.ZodString;
752
+ customHost: z.ZodOptional<z.ZodString>;
753
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
754
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
755
+ }, z.core.$loose>>;
756
+ krutrim: z.ZodOptional<z.ZodObject<{
757
+ apiKey: z.ZodString;
758
+ customHost: z.ZodOptional<z.ZodString>;
759
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
760
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
761
+ }, z.core.$loose>>;
762
+ "302ai": z.ZodOptional<z.ZodObject<{
763
+ apiKey: z.ZodString;
764
+ customHost: z.ZodOptional<z.ZodString>;
765
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
766
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
767
+ }, z.core.$loose>>;
768
+ cometapi: z.ZodOptional<z.ZodObject<{
769
+ apiKey: z.ZodString;
770
+ customHost: z.ZodOptional<z.ZodString>;
771
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
772
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
773
+ }, z.core.$loose>>;
774
+ matterai: z.ZodOptional<z.ZodObject<{
775
+ apiKey: z.ZodString;
776
+ customHost: z.ZodOptional<z.ZodString>;
777
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
778
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
779
+ }, z.core.$loose>>;
780
+ meshy: z.ZodOptional<z.ZodObject<{
781
+ apiKey: z.ZodString;
782
+ customHost: z.ZodOptional<z.ZodString>;
783
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
784
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
785
+ }, z.core.$loose>>;
786
+ nextbit: z.ZodOptional<z.ZodObject<{
787
+ apiKey: z.ZodString;
788
+ customHost: z.ZodOptional<z.ZodString>;
789
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
790
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
791
+ }, z.core.$loose>>;
792
+ tripo3d: z.ZodOptional<z.ZodObject<{
793
+ apiKey: z.ZodString;
794
+ customHost: z.ZodOptional<z.ZodString>;
795
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
796
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
797
+ }, z.core.$loose>>;
798
+ modal: z.ZodOptional<z.ZodObject<{
799
+ apiKey: z.ZodString;
800
+ customHost: z.ZodOptional<z.ZodString>;
801
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
802
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
803
+ }, z.core.$loose>>;
804
+ "z-ai": z.ZodOptional<z.ZodObject<{
805
+ apiKey: z.ZodString;
806
+ customHost: z.ZodOptional<z.ZodString>;
807
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
808
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
809
+ }, z.core.$loose>>;
810
+ oracle: z.ZodOptional<z.ZodObject<{
811
+ apiKey: z.ZodString;
812
+ customHost: z.ZodOptional<z.ZodString>;
813
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
814
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
815
+ }, z.core.$loose>>;
816
+ iointelligence: z.ZodOptional<z.ZodObject<{
817
+ apiKey: z.ZodString;
818
+ customHost: z.ZodOptional<z.ZodString>;
819
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
820
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
821
+ }, z.core.$loose>>;
822
+ aibadgr: z.ZodOptional<z.ZodObject<{
823
+ apiKey: z.ZodString;
824
+ customHost: z.ZodOptional<z.ZodString>;
825
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
826
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
827
+ }, z.core.$loose>>;
828
+ }, z.core.$strip>;
829
+ autoMigrate: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"development">]>>>;
830
+ schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
831
+ }, z.core.$strip>;
832
+ /**
833
+ * Validated LLMOps configuration with typed providers
834
+ * Uses ProvidersConfig for proper provider-specific typing
835
+ *
836
+ * Note: autoMigrate and schema are optional in input but always present after validation
837
+ */
838
+ type ValidatedLLMOpsConfig = Omit<z.infer<typeof llmopsConfigSchema>, 'providers' | 'autoMigrate' | 'schema'> & {
839
+ providers: ProvidersConfig;
840
+ autoMigrate?: AutoMigrateConfig;
841
+ schema: string;
842
+ };
843
+ /**
844
+ * Input type for LLMOps configuration (before validation)
845
+ * Users can omit optional fields like autoMigrate and schema
846
+ */
847
+ type LLMOpsConfigInput = Omit<ValidatedLLMOpsConfig, 'autoMigrate' | 'schema'> & {
848
+ autoMigrate?: AutoMigrateConfig;
849
+ schema?: string;
850
+ };
851
+ declare function validateLLMOpsConfig(config: unknown): ValidatedLLMOpsConfig;
852
+ //#endregion
853
+ //#region src/types/helper.d.ts
854
+ /**
855
+ * @references From better-auth
856
+ */
857
+ type Prettify<T> = Omit<T, never>;
858
+ //#endregion
859
+ //#region src/types/index.d.ts
860
+ /**
861
+ * LLMOpsConfig is the user-facing config type (allows optional fields)
862
+ */
863
+ type LLMOpsConfig = LLMOpsConfigInput;
864
+ type LLMOpsClient = {
865
+ handler: (request: Request) => Promise<Response>;
866
+ config: LLMOpsConfig;
867
+ };
868
+ //#endregion
869
+ //#region src/schemas/openai.d.ts
870
+ declare const chatCompletionCreateParamsBaseSchema: z.ZodObject<{
871
+ messages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
872
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
873
+ text: z.ZodString;
874
+ type: z.ZodLiteral<"text">;
875
+ }, z.core.$strip>>]>;
876
+ role: z.ZodLiteral<"developer">;
877
+ name: z.ZodOptional<z.ZodString>;
878
+ }, z.core.$strip>, z.ZodObject<{
879
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
880
+ text: z.ZodString;
881
+ type: z.ZodLiteral<"text">;
882
+ }, z.core.$strip>>]>;
883
+ role: z.ZodLiteral<"system">;
884
+ name: z.ZodOptional<z.ZodString>;
885
+ }, z.core.$strip>, z.ZodObject<{
886
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
887
+ text: z.ZodString;
888
+ type: z.ZodLiteral<"text">;
889
+ }, z.core.$strip>, z.ZodObject<{
890
+ image_url: z.ZodObject<{
891
+ url: z.ZodString;
892
+ detail: z.ZodOptional<z.ZodEnum<{
893
+ auto: "auto";
894
+ low: "low";
895
+ high: "high";
896
+ }>>;
897
+ }, z.core.$strip>;
898
+ type: z.ZodLiteral<"image_url">;
899
+ }, z.core.$strip>, z.ZodObject<{
900
+ input_audio: z.ZodObject<{
901
+ data: z.ZodString;
902
+ format: z.ZodEnum<{
903
+ wav: "wav";
904
+ mp3: "mp3";
905
+ }>;
906
+ }, z.core.$strip>;
907
+ type: z.ZodLiteral<"input_audio">;
908
+ }, z.core.$strip>, z.ZodObject<{
909
+ file: z.ZodObject<{
910
+ file_data: z.ZodOptional<z.ZodString>;
911
+ file_id: z.ZodOptional<z.ZodString>;
912
+ filename: z.ZodOptional<z.ZodString>;
913
+ }, z.core.$strip>;
914
+ type: z.ZodLiteral<"file">;
915
+ }, z.core.$strip>]>>]>;
916
+ role: z.ZodLiteral<"user">;
917
+ name: z.ZodOptional<z.ZodString>;
918
+ }, z.core.$strip>, z.ZodObject<{
919
+ role: z.ZodLiteral<"assistant">;
920
+ audio: z.ZodNullable<z.ZodOptional<z.ZodObject<{
921
+ id: z.ZodString;
922
+ }, z.core.$strip>>>;
923
+ content: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
924
+ text: z.ZodString;
925
+ type: z.ZodLiteral<"text">;
926
+ }, z.core.$strip>, z.ZodObject<{
927
+ refusal: z.ZodString;
928
+ type: z.ZodLiteral<"refusal">;
929
+ }, z.core.$strip>]>>]>>>;
930
+ function_call: z.ZodNullable<z.ZodOptional<z.ZodObject<{
931
+ arguments: z.ZodString;
932
+ name: z.ZodString;
933
+ }, z.core.$strip>>>;
934
+ name: z.ZodOptional<z.ZodString>;
935
+ refusal: z.ZodNullable<z.ZodOptional<z.ZodString>>;
936
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
937
+ id: z.ZodString;
938
+ function: z.ZodObject<{
939
+ arguments: z.ZodString;
940
+ name: z.ZodString;
941
+ }, z.core.$strip>;
942
+ type: z.ZodLiteral<"function">;
943
+ }, z.core.$strip>>>;
944
+ }, z.core.$strip>, z.ZodObject<{
945
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
946
+ text: z.ZodString;
947
+ type: z.ZodLiteral<"text">;
948
+ }, z.core.$strip>>]>;
949
+ role: z.ZodLiteral<"tool">;
950
+ tool_call_id: z.ZodString;
951
+ }, z.core.$strip>, z.ZodObject<{
952
+ content: z.ZodNullable<z.ZodString>;
953
+ name: z.ZodString;
954
+ role: z.ZodLiteral<"function">;
955
+ }, z.core.$strip>]>>;
956
+ model: z.ZodString;
957
+ audio: z.ZodNullable<z.ZodOptional<z.ZodObject<{
958
+ format: z.ZodEnum<{
959
+ wav: "wav";
960
+ mp3: "mp3";
961
+ aac: "aac";
962
+ flac: "flac";
963
+ opus: "opus";
964
+ pcm16: "pcm16";
965
+ }>;
966
+ voice: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
967
+ alloy: "alloy";
968
+ ash: "ash";
969
+ ballad: "ballad";
970
+ coral: "coral";
971
+ echo: "echo";
972
+ sage: "sage";
973
+ shimmer: "shimmer";
974
+ verse: "verse";
975
+ marin: "marin";
976
+ cedar: "cedar";
977
+ }>]>;
978
+ }, z.core.$strip>>>;
979
+ frequency_penalty: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
980
+ function_call: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
981
+ auto: "auto";
982
+ none: "none";
983
+ }>, z.ZodObject<{
984
+ name: z.ZodString;
985
+ }, z.core.$strip>]>>;
986
+ functions: z.ZodOptional<z.ZodArray<z.ZodObject<{
987
+ name: z.ZodString;
988
+ description: z.ZodOptional<z.ZodString>;
989
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
990
+ }, z.core.$strip>>>;
991
+ logit_bias: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
992
+ logprobs: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
993
+ max_completion_tokens: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
994
+ max_tokens: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
995
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
996
+ modalities: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<{
997
+ text: "text";
998
+ audio: "audio";
999
+ }>>>>;
1000
+ n: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1001
+ parallel_tool_calls: z.ZodOptional<z.ZodBoolean>;
1002
+ prediction: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1003
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
1004
+ text: z.ZodString;
1005
+ type: z.ZodLiteral<"text">;
1006
+ }, z.core.$strip>>]>;
1007
+ type: z.ZodLiteral<"content">;
1008
+ }, z.core.$strip>>>;
1009
+ presence_penalty: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1010
+ prompt_cache_key: z.ZodOptional<z.ZodString>;
1011
+ prompt_cache_retention: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1012
+ "in-memory": "in-memory";
1013
+ "24h": "24h";
1014
+ }>>>;
1015
+ reasoning_effort: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1016
+ low: "low";
1017
+ high: "high";
1018
+ none: "none";
1019
+ minimal: "minimal";
1020
+ medium: "medium";
1021
+ xhigh: "xhigh";
1022
+ }>>>;
1023
+ response_format: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1024
+ type: z.ZodLiteral<"text">;
1025
+ }, z.core.$strip>, z.ZodObject<{
1026
+ type: z.ZodLiteral<"json_object">;
1027
+ }, z.core.$strip>, z.ZodObject<{
1028
+ type: z.ZodLiteral<"json_schema">;
1029
+ json_schema: z.ZodObject<{
1030
+ name: z.ZodString;
1031
+ description: z.ZodOptional<z.ZodString>;
1032
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1033
+ strict: z.ZodOptional<z.ZodBoolean>;
1034
+ }, z.core.$strip>;
1035
+ }, z.core.$strip>]>>;
1036
+ safety_identifier: z.ZodOptional<z.ZodString>;
1037
+ seed: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1038
+ service_tier: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1039
+ default: "default";
1040
+ priority: "priority";
1041
+ auto: "auto";
1042
+ flex: "flex";
1043
+ scale: "scale";
1044
+ }>>>;
1045
+ stop: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
1046
+ store: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1047
+ stream: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1048
+ stream_options: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1049
+ include_obfuscation: z.ZodOptional<z.ZodBoolean>;
1050
+ include_usage: z.ZodOptional<z.ZodBoolean>;
1051
+ }, z.core.$strip>>>;
1052
+ temperature: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1053
+ tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1054
+ auto: "auto";
1055
+ none: "none";
1056
+ required: "required";
1057
+ }>, z.ZodObject<{
1058
+ allowed_tools: z.ZodObject<{
1059
+ mode: z.ZodEnum<{
1060
+ auto: "auto";
1061
+ required: "required";
1062
+ }>;
1063
+ tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1064
+ }, z.core.$strip>;
1065
+ type: z.ZodLiteral<"allowed_tools">;
1066
+ }, z.core.$strip>, z.ZodObject<{
1067
+ function: z.ZodObject<{
1068
+ name: z.ZodString;
1069
+ }, z.core.$strip>;
1070
+ type: z.ZodLiteral<"function">;
1071
+ }, z.core.$strip>, z.ZodObject<{
1072
+ custom: z.ZodObject<{
1073
+ name: z.ZodString;
1074
+ }, z.core.$strip>;
1075
+ type: z.ZodLiteral<"custom">;
1076
+ }, z.core.$strip>]>>;
1077
+ tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1078
+ function: z.ZodObject<{
1079
+ name: z.ZodString;
1080
+ description: z.ZodOptional<z.ZodString>;
1081
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1082
+ }, z.core.$strip>;
1083
+ type: z.ZodLiteral<"function">;
1084
+ }, z.core.$strip>, z.ZodObject<{
1085
+ custom: z.ZodObject<{
1086
+ name: z.ZodString;
1087
+ description: z.ZodOptional<z.ZodString>;
1088
+ format: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1089
+ type: z.ZodLiteral<"text">;
1090
+ }, z.core.$strip>, z.ZodObject<{
1091
+ grammar: z.ZodObject<{
1092
+ definition: z.ZodString;
1093
+ syntax: z.ZodEnum<{
1094
+ lark: "lark";
1095
+ regex: "regex";
1096
+ }>;
1097
+ }, z.core.$strip>;
1098
+ type: z.ZodLiteral<"grammar">;
1099
+ }, z.core.$strip>]>>;
1100
+ }, z.core.$strip>;
1101
+ type: z.ZodLiteral<"custom">;
1102
+ }, z.core.$strip>]>>>;
1103
+ top_logprobs: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1104
+ top_p: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1105
+ user: z.ZodOptional<z.ZodString>;
1106
+ verbosity: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1107
+ low: "low";
1108
+ high: "high";
1109
+ medium: "medium";
1110
+ }>>>;
1111
+ web_search_options: z.ZodOptional<z.ZodObject<{
1112
+ search_context_size: z.ZodOptional<z.ZodEnum<{
1113
+ low: "low";
1114
+ high: "high";
1115
+ medium: "medium";
1116
+ }>>;
1117
+ user_location: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1118
+ approximate: z.ZodObject<{
1119
+ city: z.ZodOptional<z.ZodString>;
1120
+ country: z.ZodOptional<z.ZodString>;
1121
+ region: z.ZodOptional<z.ZodString>;
1122
+ timezone: z.ZodOptional<z.ZodString>;
1123
+ }, z.core.$strip>;
1124
+ type: z.ZodLiteral<"approximate">;
1125
+ }, z.core.$strip>>>;
1126
+ }, z.core.$strip>>;
1127
+ }, z.core.$strip>;
1128
+ type ChatCompletionCreateParamsBase = z.infer<typeof chatCompletionCreateParamsBaseSchema>;
1129
+ /**
1130
+ * Schema for variant jsonData - these are the parameters that can be
1131
+ * configured per variant to override the default chat completion settings.
1132
+ * This is a subset of ChatCompletionCreateParamsBase that makes sense to
1133
+ * configure at the variant level (excludes messages which come from the request).
1134
+ */
1135
+ declare const variantJsonDataSchema: z.ZodObject<{
1136
+ system_prompt: z.ZodOptional<z.ZodString>;
1137
+ model: z.ZodOptional<z.ZodString>;
1138
+ audio: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1139
+ format: z.ZodEnum<{
1140
+ wav: "wav";
1141
+ mp3: "mp3";
1142
+ aac: "aac";
1143
+ flac: "flac";
1144
+ opus: "opus";
1145
+ pcm16: "pcm16";
1146
+ }>;
1147
+ voice: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
1148
+ alloy: "alloy";
1149
+ ash: "ash";
1150
+ ballad: "ballad";
1151
+ coral: "coral";
1152
+ echo: "echo";
1153
+ sage: "sage";
1154
+ shimmer: "shimmer";
1155
+ verse: "verse";
1156
+ marin: "marin";
1157
+ cedar: "cedar";
1158
+ }>]>;
1159
+ }, z.core.$strip>>>;
1160
+ frequency_penalty: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1161
+ function_call: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1162
+ auto: "auto";
1163
+ none: "none";
1164
+ }>, z.ZodObject<{
1165
+ name: z.ZodString;
1166
+ }, z.core.$strip>]>>;
1167
+ functions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1168
+ name: z.ZodString;
1169
+ description: z.ZodOptional<z.ZodString>;
1170
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1171
+ }, z.core.$strip>>>;
1172
+ logit_bias: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
1173
+ logprobs: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1174
+ max_completion_tokens: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1175
+ max_tokens: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1176
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
1177
+ modalities: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<{
1178
+ text: "text";
1179
+ audio: "audio";
1180
+ }>>>>;
1181
+ n: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1182
+ parallel_tool_calls: z.ZodOptional<z.ZodBoolean>;
1183
+ prediction: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1184
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
1185
+ text: z.ZodString;
1186
+ type: z.ZodLiteral<"text">;
1187
+ }, z.core.$strip>>]>;
1188
+ type: z.ZodLiteral<"content">;
1189
+ }, z.core.$strip>>>;
1190
+ presence_penalty: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1191
+ prompt_cache_key: z.ZodOptional<z.ZodString>;
1192
+ prompt_cache_retention: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1193
+ "in-memory": "in-memory";
1194
+ "24h": "24h";
1195
+ }>>>;
1196
+ reasoning_effort: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1197
+ low: "low";
1198
+ high: "high";
1199
+ none: "none";
1200
+ minimal: "minimal";
1201
+ medium: "medium";
1202
+ xhigh: "xhigh";
1203
+ }>>>;
1204
+ response_format: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1205
+ type: z.ZodLiteral<"text">;
1206
+ }, z.core.$strip>, z.ZodObject<{
1207
+ type: z.ZodLiteral<"json_object">;
1208
+ }, z.core.$strip>, z.ZodObject<{
1209
+ type: z.ZodLiteral<"json_schema">;
1210
+ json_schema: z.ZodObject<{
1211
+ name: z.ZodString;
1212
+ description: z.ZodOptional<z.ZodString>;
1213
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1214
+ strict: z.ZodOptional<z.ZodBoolean>;
1215
+ }, z.core.$strip>;
1216
+ }, z.core.$strip>]>>;
1217
+ safety_identifier: z.ZodOptional<z.ZodString>;
1218
+ seed: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1219
+ service_tier: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1220
+ default: "default";
1221
+ priority: "priority";
1222
+ auto: "auto";
1223
+ flex: "flex";
1224
+ scale: "scale";
1225
+ }>>>;
1226
+ stop: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
1227
+ store: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1228
+ stream: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1229
+ stream_options: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1230
+ include_obfuscation: z.ZodOptional<z.ZodBoolean>;
1231
+ include_usage: z.ZodOptional<z.ZodBoolean>;
1232
+ }, z.core.$strip>>>;
1233
+ temperature: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1234
+ tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1235
+ auto: "auto";
1236
+ none: "none";
1237
+ required: "required";
1238
+ }>, z.ZodObject<{
1239
+ allowed_tools: z.ZodObject<{
1240
+ mode: z.ZodEnum<{
1241
+ auto: "auto";
1242
+ required: "required";
1243
+ }>;
1244
+ tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1245
+ }, z.core.$strip>;
1246
+ type: z.ZodLiteral<"allowed_tools">;
1247
+ }, z.core.$strip>, z.ZodObject<{
1248
+ function: z.ZodObject<{
1249
+ name: z.ZodString;
1250
+ }, z.core.$strip>;
1251
+ type: z.ZodLiteral<"function">;
1252
+ }, z.core.$strip>, z.ZodObject<{
1253
+ custom: z.ZodObject<{
1254
+ name: z.ZodString;
1255
+ }, z.core.$strip>;
1256
+ type: z.ZodLiteral<"custom">;
1257
+ }, z.core.$strip>]>>;
1258
+ tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1259
+ function: z.ZodObject<{
1260
+ name: z.ZodString;
1261
+ description: z.ZodOptional<z.ZodString>;
1262
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1263
+ }, z.core.$strip>;
1264
+ type: z.ZodLiteral<"function">;
1265
+ }, z.core.$strip>, z.ZodObject<{
1266
+ custom: z.ZodObject<{
1267
+ name: z.ZodString;
1268
+ description: z.ZodOptional<z.ZodString>;
1269
+ format: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1270
+ type: z.ZodLiteral<"text">;
1271
+ }, z.core.$strip>, z.ZodObject<{
1272
+ grammar: z.ZodObject<{
1273
+ definition: z.ZodString;
1274
+ syntax: z.ZodEnum<{
1275
+ lark: "lark";
1276
+ regex: "regex";
1277
+ }>;
1278
+ }, z.core.$strip>;
1279
+ type: z.ZodLiteral<"grammar">;
1280
+ }, z.core.$strip>]>>;
1281
+ }, z.core.$strip>;
1282
+ type: z.ZodLiteral<"custom">;
1283
+ }, z.core.$strip>]>>>;
1284
+ top_logprobs: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1285
+ top_p: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1286
+ user: z.ZodOptional<z.ZodString>;
1287
+ verbosity: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
1288
+ low: "low";
1289
+ high: "high";
1290
+ medium: "medium";
1291
+ }>>>;
1292
+ web_search_options: z.ZodOptional<z.ZodObject<{
1293
+ search_context_size: z.ZodOptional<z.ZodEnum<{
1294
+ low: "low";
1295
+ high: "high";
1296
+ medium: "medium";
1297
+ }>>;
1298
+ user_location: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1299
+ approximate: z.ZodObject<{
1300
+ city: z.ZodOptional<z.ZodString>;
1301
+ country: z.ZodOptional<z.ZodString>;
1302
+ region: z.ZodOptional<z.ZodString>;
1303
+ timezone: z.ZodOptional<z.ZodString>;
1304
+ }, z.core.$strip>;
1305
+ type: z.ZodLiteral<"approximate">;
1306
+ }, z.core.$strip>>>;
1307
+ }, z.core.$strip>>;
1308
+ }, z.core.$strip>;
1309
+ type VariantJsonData = z.infer<typeof variantJsonDataSchema>;
1310
+ //#endregion
1311
+ //#region src/utils/logger.d.ts
1312
+ declare const logger: pino.Logger<never, boolean>;
1313
+ //#endregion
1314
+ //#region src/utils/id.d.ts
1315
+ declare const generateId: (size?: number) => string;
1316
+ //#endregion
1317
+ //#region src/datalayer/index.d.ts
1318
+ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
1319
+ createVariantVersion: (params: zod0.infer<zod0.ZodObject<{
1320
+ variantId: zod0.ZodString;
1321
+ provider: zod0.ZodString;
1322
+ modelName: zod0.ZodString;
1323
+ jsonData: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
1324
+ }, zod_v4_core0.$strip>>) => Promise<{
1325
+ version: number;
1326
+ id: string;
1327
+ createdAt: Date;
1328
+ updatedAt: Date;
1329
+ variantId: string;
1330
+ provider: string;
1331
+ modelName: string;
1332
+ jsonData: Record<string, unknown>;
1333
+ } | undefined>;
1334
+ getVariantVersionById: (params: zod0.infer<zod0.ZodObject<{
1335
+ id: zod0.ZodString;
1336
+ }, zod_v4_core0.$strip>>) => Promise<{
1337
+ version: number;
1338
+ id: string;
1339
+ createdAt: Date;
1340
+ updatedAt: Date;
1341
+ variantId: string;
1342
+ provider: string;
1343
+ modelName: string;
1344
+ jsonData: Record<string, unknown>;
1345
+ } | undefined>;
1346
+ getVariantVersionsByVariantId: (params: zod0.infer<zod0.ZodObject<{
1347
+ variantId: zod0.ZodString;
1348
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1349
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1350
+ }, zod_v4_core0.$strip>>) => Promise<{
1351
+ version: number;
1352
+ id: string;
1353
+ createdAt: Date;
1354
+ updatedAt: Date;
1355
+ variantId: string;
1356
+ provider: string;
1357
+ modelName: string;
1358
+ jsonData: Record<string, unknown>;
1359
+ }[]>;
1360
+ getLatestVariantVersion: (params: zod0.infer<zod0.ZodObject<{
1361
+ variantId: zod0.ZodString;
1362
+ }, zod_v4_core0.$strip>>) => Promise<{
1363
+ version: number;
1364
+ id: string;
1365
+ createdAt: Date;
1366
+ updatedAt: Date;
1367
+ variantId: string;
1368
+ provider: string;
1369
+ modelName: string;
1370
+ jsonData: Record<string, unknown>;
1371
+ } | undefined>;
1372
+ getVariantVersionByNumber: (params: zod0.infer<zod0.ZodObject<{
1373
+ variantId: zod0.ZodString;
1374
+ version: zod0.ZodNumber;
1375
+ }, zod_v4_core0.$strip>>) => Promise<{
1376
+ version: number;
1377
+ id: string;
1378
+ createdAt: Date;
1379
+ updatedAt: Date;
1380
+ variantId: string;
1381
+ provider: string;
1382
+ modelName: string;
1383
+ jsonData: Record<string, unknown>;
1384
+ } | undefined>;
1385
+ deleteVariantVersion: (params: zod0.infer<zod0.ZodObject<{
1386
+ id: zod0.ZodString;
1387
+ }, zod_v4_core0.$strip>>) => Promise<{
1388
+ version: number;
1389
+ id: string;
1390
+ createdAt: Date;
1391
+ updatedAt: Date;
1392
+ variantId: string;
1393
+ provider: string;
1394
+ modelName: string;
1395
+ jsonData: Record<string, unknown>;
1396
+ } | undefined>;
1397
+ deleteVariantVersionsByVariantId: (params: zod0.infer<zod0.ZodObject<{
1398
+ variantId: zod0.ZodString;
1399
+ }, zod_v4_core0.$strip>>) => Promise<{
1400
+ version: number;
1401
+ id: string;
1402
+ createdAt: Date;
1403
+ updatedAt: Date;
1404
+ variantId: string;
1405
+ provider: string;
1406
+ modelName: string;
1407
+ jsonData: Record<string, unknown>;
1408
+ }[]>;
1409
+ getVariantVersionWithVariant: (params: zod0.infer<zod0.ZodObject<{
1410
+ id: zod0.ZodString;
1411
+ }, zod_v4_core0.$strip>>) => Promise<{
1412
+ version: number;
1413
+ id: string;
1414
+ createdAt: Date;
1415
+ updatedAt: Date;
1416
+ variantId: string;
1417
+ provider: string;
1418
+ modelName: string;
1419
+ jsonData: Record<string, unknown>;
1420
+ variantName: string;
1421
+ } | undefined>;
1422
+ getVariantVersionsWithVariantByVariantId: (params: zod0.infer<zod0.ZodObject<{
1423
+ variantId: zod0.ZodString;
1424
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1425
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1426
+ }, zod_v4_core0.$strip>>) => Promise<{
1427
+ version: number;
1428
+ id: string;
1429
+ createdAt: Date;
1430
+ updatedAt: Date;
1431
+ variantId: string;
1432
+ provider: string;
1433
+ modelName: string;
1434
+ jsonData: Record<string, unknown>;
1435
+ variantName: string;
1436
+ }[]>;
1437
+ createVariant: (params: zod0.infer<zod0.ZodObject<{
1438
+ name: zod0.ZodString;
1439
+ }, zod_v4_core0.$strip>>) => Promise<{
1440
+ name: string;
1441
+ id: string;
1442
+ createdAt: Date;
1443
+ updatedAt: Date;
1444
+ } | undefined>;
1445
+ updateVariant: (params: zod0.infer<zod0.ZodObject<{
1446
+ variantId: zod0.ZodString;
1447
+ name: zod0.ZodOptional<zod0.ZodString>;
1448
+ }, zod_v4_core0.$strip>>) => Promise<{
1449
+ name: string;
1450
+ id: string;
1451
+ createdAt: Date;
1452
+ updatedAt: Date;
1453
+ } | undefined>;
1454
+ getVariantById: (params: zod0.infer<zod0.ZodObject<{
1455
+ variantId: zod0.ZodString;
1456
+ }, zod_v4_core0.$strip>>) => Promise<{
1457
+ name: string;
1458
+ id: string;
1459
+ createdAt: Date;
1460
+ updatedAt: Date;
1461
+ } | undefined>;
1462
+ getVariantWithLatestVersion: (params: zod0.infer<zod0.ZodObject<{
1463
+ variantId: zod0.ZodString;
1464
+ }, zod_v4_core0.$strip>>) => Promise<{
1465
+ latestVersion: {
1466
+ version: number;
1467
+ id: string;
1468
+ createdAt: Date;
1469
+ updatedAt: Date;
1470
+ variantId: string;
1471
+ provider: string;
1472
+ modelName: string;
1473
+ jsonData: Record<string, unknown>;
1474
+ } | null;
1475
+ name: string;
1476
+ id: string;
1477
+ createdAt: Date;
1478
+ updatedAt: Date;
1479
+ } | undefined>;
1480
+ deleteVariant: (params: zod0.infer<zod0.ZodObject<{
1481
+ variantId: zod0.ZodString;
1482
+ }, zod_v4_core0.$strip>>) => Promise<{
1483
+ name: string;
1484
+ id: string;
1485
+ createdAt: Date;
1486
+ updatedAt: Date;
1487
+ } | undefined>;
1488
+ listVariants: (params?: zod0.infer<zod0.ZodObject<{
1489
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1490
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1491
+ }, zod_v4_core0.$strip>>) => Promise<{
1492
+ name: string;
1493
+ id: string;
1494
+ createdAt: Date;
1495
+ updatedAt: Date;
1496
+ }[]>;
1497
+ listVariantsWithLatestVersion: (params?: zod0.infer<zod0.ZodObject<{
1498
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1499
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1500
+ }, zod_v4_core0.$strip>>) => Promise<{
1501
+ latestVersion: {
1502
+ version: number;
1503
+ id: string;
1504
+ createdAt: Date;
1505
+ updatedAt: Date;
1506
+ variantId: string;
1507
+ provider: string;
1508
+ modelName: string;
1509
+ jsonData: Record<string, unknown>;
1510
+ } | null;
1511
+ name: string;
1512
+ id: string;
1513
+ createdAt: Date;
1514
+ updatedAt: Date;
1515
+ }[]>;
1516
+ createTargetingRule: (params: zod0.infer<zod0.ZodObject<{
1517
+ environmentId: zod0.ZodString;
1518
+ configId: zod0.ZodString;
1519
+ configVariantId: zod0.ZodString;
1520
+ variantVersionId: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
1521
+ weight: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodNumber>>;
1522
+ priority: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodNumber>>;
1523
+ enabled: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodBoolean>>;
1524
+ conditions: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
1525
+ }, zod_v4_core0.$strip>>) => Promise<{
1526
+ id: string;
1527
+ createdAt: Date;
1528
+ updatedAt: Date;
1529
+ environmentId: string;
1530
+ configId: string;
1531
+ configVariantId: string;
1532
+ variantVersionId: string | null;
1533
+ weight: number;
1534
+ priority: number;
1535
+ enabled: boolean;
1536
+ conditions: Record<string, unknown>;
1537
+ } | undefined>;
1538
+ updateTargetingRule: (params: zod0.infer<zod0.ZodObject<{
1539
+ id: zod0.ZodString;
1540
+ variantVersionId: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
1541
+ weight: zod0.ZodOptional<zod0.ZodNumber>;
1542
+ priority: zod0.ZodOptional<zod0.ZodNumber>;
1543
+ enabled: zod0.ZodOptional<zod0.ZodBoolean>;
1544
+ conditions: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
1545
+ }, zod_v4_core0.$strip>>) => Promise<{
1546
+ id: string;
1547
+ createdAt: Date;
1548
+ updatedAt: Date;
1549
+ environmentId: string;
1550
+ configId: string;
1551
+ configVariantId: string;
1552
+ variantVersionId: string | null;
1553
+ weight: number;
1554
+ priority: number;
1555
+ enabled: boolean;
1556
+ conditions: Record<string, unknown>;
1557
+ } | undefined>;
1558
+ getTargetingRuleById: (params: zod0.infer<zod0.ZodObject<{
1559
+ id: zod0.ZodString;
1560
+ }, zod_v4_core0.$strip>>) => Promise<{
1561
+ id: string;
1562
+ createdAt: Date;
1563
+ updatedAt: Date;
1564
+ environmentId: string;
1565
+ configId: string;
1566
+ configVariantId: string;
1567
+ variantVersionId: string | null;
1568
+ weight: number;
1569
+ priority: number;
1570
+ enabled: boolean;
1571
+ conditions: Record<string, unknown>;
1572
+ } | undefined>;
1573
+ getTargetingRulesByConfigId: (params: zod0.infer<zod0.ZodObject<{
1574
+ configId: zod0.ZodString;
1575
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1576
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1577
+ }, zod_v4_core0.$strip>>) => Promise<{
1578
+ id: string;
1579
+ createdAt: Date;
1580
+ updatedAt: Date;
1581
+ environmentId: string;
1582
+ configId: string;
1583
+ configVariantId: string;
1584
+ variantVersionId: string | null;
1585
+ weight: number;
1586
+ priority: number;
1587
+ enabled: boolean;
1588
+ conditions: Record<string, unknown>;
1589
+ }[]>;
1590
+ getTargetingRulesByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
1591
+ environmentId: zod0.ZodString;
1592
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1593
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1594
+ }, zod_v4_core0.$strip>>) => Promise<{
1595
+ id: string;
1596
+ createdAt: Date;
1597
+ updatedAt: Date;
1598
+ environmentId: string;
1599
+ configId: string;
1600
+ configVariantId: string;
1601
+ variantVersionId: string | null;
1602
+ weight: number;
1603
+ priority: number;
1604
+ enabled: boolean;
1605
+ conditions: Record<string, unknown>;
1606
+ }[]>;
1607
+ getTargetingRulesByConfigAndEnvironment: (params: zod0.infer<zod0.ZodObject<{
1608
+ configId: zod0.ZodString;
1609
+ environmentId: zod0.ZodString;
1610
+ }, zod_v4_core0.$strip>>) => Promise<{
1611
+ id: string;
1612
+ createdAt: Date;
1613
+ updatedAt: Date;
1614
+ environmentId: string;
1615
+ configId: string;
1616
+ configVariantId: string;
1617
+ variantVersionId: string | null;
1618
+ weight: number;
1619
+ priority: number;
1620
+ enabled: boolean;
1621
+ conditions: Record<string, unknown>;
1622
+ }[]>;
1623
+ deleteTargetingRule: (params: zod0.infer<zod0.ZodObject<{
1624
+ id: zod0.ZodString;
1625
+ }, zod_v4_core0.$strip>>) => Promise<{
1626
+ id: string;
1627
+ createdAt: Date;
1628
+ updatedAt: Date;
1629
+ environmentId: string;
1630
+ configId: string;
1631
+ configVariantId: string;
1632
+ variantVersionId: string | null;
1633
+ weight: number;
1634
+ priority: number;
1635
+ enabled: boolean;
1636
+ conditions: Record<string, unknown>;
1637
+ } | undefined>;
1638
+ deleteTargetingRulesByConfigId: (params: zod0.infer<zod0.ZodObject<{
1639
+ configId: zod0.ZodString;
1640
+ }, zod_v4_core0.$strip>>) => Promise<{
1641
+ id: string;
1642
+ createdAt: Date;
1643
+ updatedAt: Date;
1644
+ environmentId: string;
1645
+ configId: string;
1646
+ configVariantId: string;
1647
+ variantVersionId: string | null;
1648
+ weight: number;
1649
+ priority: number;
1650
+ enabled: boolean;
1651
+ conditions: Record<string, unknown>;
1652
+ }[]>;
1653
+ deleteTargetingRulesByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
1654
+ environmentId: zod0.ZodString;
1655
+ }, zod_v4_core0.$strip>>) => Promise<{
1656
+ id: string;
1657
+ createdAt: Date;
1658
+ updatedAt: Date;
1659
+ environmentId: string;
1660
+ configId: string;
1661
+ configVariantId: string;
1662
+ variantVersionId: string | null;
1663
+ weight: number;
1664
+ priority: number;
1665
+ enabled: boolean;
1666
+ conditions: Record<string, unknown>;
1667
+ }[]>;
1668
+ listTargetingRules: (params?: zod0.infer<zod0.ZodObject<{
1669
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1670
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1671
+ }, zod_v4_core0.$strip>>) => Promise<{
1672
+ id: string;
1673
+ createdAt: Date;
1674
+ updatedAt: Date;
1675
+ environmentId: string;
1676
+ configId: string;
1677
+ configVariantId: string;
1678
+ variantVersionId: string | null;
1679
+ weight: number;
1680
+ priority: number;
1681
+ enabled: boolean;
1682
+ conditions: Record<string, unknown>;
1683
+ }[]>;
1684
+ getTargetingRulesWithDetailsByConfigId: (params: zod0.infer<zod0.ZodObject<{
1685
+ configId: zod0.ZodString;
1686
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1687
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1688
+ }, zod_v4_core0.$strip>>) => Promise<{
1689
+ variantProvider: string | null;
1690
+ variantModelName: string | null;
1691
+ pinnedVersion: number | null | undefined;
1692
+ latestVersion: number | null | undefined;
1693
+ variantName: string | null;
1694
+ id: string;
1695
+ createdAt: Date;
1696
+ updatedAt: Date;
1697
+ environmentId: string;
1698
+ configId: string;
1699
+ configVariantId: string;
1700
+ variantVersionId: string | null;
1701
+ weight: number;
1702
+ priority: number;
1703
+ enabled: boolean;
1704
+ conditions: Record<string, unknown>;
1705
+ variantId: string | null;
1706
+ environmentName: string | null;
1707
+ environmentSlug: string | null;
1708
+ }[]>;
1709
+ setTargetingForEnvironment: (params: zod0.infer<zod0.ZodObject<{
1710
+ environmentId: zod0.ZodString;
1711
+ configId: zod0.ZodString;
1712
+ configVariantId: zod0.ZodString;
1713
+ variantVersionId: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
1714
+ }, zod_v4_core0.$strip>>) => Promise<{
1715
+ id: string;
1716
+ createdAt: Date;
1717
+ updatedAt: Date;
1718
+ environmentId: string;
1719
+ configId: string;
1720
+ configVariantId: string;
1721
+ variantVersionId: string | null;
1722
+ weight: number;
1723
+ priority: number;
1724
+ enabled: boolean;
1725
+ conditions: Record<string, unknown>;
1726
+ } | undefined>;
1727
+ createEnvironmentSecret: (params: zod0.infer<zod0.ZodObject<{
1728
+ environmentId: zod0.ZodUUID;
1729
+ keyName: zod0.ZodString;
1730
+ keyValue: zod0.ZodString;
1731
+ }, zod_v4_core0.$strip>>) => Promise<{
1732
+ id: string;
1733
+ createdAt: Date;
1734
+ updatedAt: Date;
1735
+ environmentId: string;
1736
+ keyName: string;
1737
+ keyValue: string;
1738
+ } | undefined>;
1739
+ updateEnvironmentSecret: (params: zod0.infer<zod0.ZodObject<{
1740
+ secretId: zod0.ZodUUID;
1741
+ keyName: zod0.ZodOptional<zod0.ZodString>;
1742
+ keyValue: zod0.ZodOptional<zod0.ZodString>;
1743
+ }, zod_v4_core0.$strip>>) => Promise<{
1744
+ id: string;
1745
+ createdAt: Date;
1746
+ updatedAt: Date;
1747
+ environmentId: string;
1748
+ keyName: string;
1749
+ keyValue: string;
1750
+ } | undefined>;
1751
+ getEnvironmentSecretById: (params: zod0.infer<zod0.ZodObject<{
1752
+ secretId: zod0.ZodUUID;
1753
+ }, zod_v4_core0.$strip>>) => Promise<{
1754
+ id: string;
1755
+ createdAt: Date;
1756
+ updatedAt: Date;
1757
+ environmentId: string;
1758
+ keyName: string;
1759
+ keyValue: string;
1760
+ } | undefined>;
1761
+ getSecretsByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
1762
+ environmentId: zod0.ZodUUID;
1763
+ }, zod_v4_core0.$strip>>) => Promise<{
1764
+ id: string;
1765
+ createdAt: Date;
1766
+ updatedAt: Date;
1767
+ environmentId: string;
1768
+ keyName: string;
1769
+ keyValue: string;
1770
+ }[]>;
1771
+ deleteEnvironmentSecret: (params: zod0.infer<zod0.ZodObject<{
1772
+ secretId: zod0.ZodUUID;
1773
+ }, zod_v4_core0.$strip>>) => Promise<{
1774
+ id: string;
1775
+ createdAt: Date;
1776
+ updatedAt: Date;
1777
+ environmentId: string;
1778
+ keyName: string;
1779
+ keyValue: string;
1780
+ } | undefined>;
1781
+ deleteSecretsByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
1782
+ environmentId: zod0.ZodUUID;
1783
+ }, zod_v4_core0.$strip>>) => Promise<{
1784
+ id: string;
1785
+ createdAt: Date;
1786
+ updatedAt: Date;
1787
+ environmentId: string;
1788
+ keyName: string;
1789
+ keyValue: string;
1790
+ }[]>;
1791
+ listEnvironmentSecrets: (params?: zod0.infer<zod0.ZodObject<{
1792
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1793
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1794
+ }, zod_v4_core0.$strip>>) => Promise<{
1795
+ id: string;
1796
+ createdAt: Date;
1797
+ updatedAt: Date;
1798
+ environmentId: string;
1799
+ keyName: string;
1800
+ keyValue: string;
1801
+ }[]>;
1802
+ countEnvironmentSecrets: () => Promise<number>;
1803
+ createNewEnvironment: (params: zod0.infer<zod0.ZodObject<{
1804
+ name: zod0.ZodString;
1805
+ slug: zod0.ZodString;
1806
+ isProd: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodBoolean>>;
1807
+ }, zod_v4_core0.$strip>>) => Promise<{
1808
+ slug: string;
1809
+ name: string;
1810
+ id: string;
1811
+ createdAt: Date;
1812
+ updatedAt: Date;
1813
+ isProd: boolean;
1814
+ } | undefined>;
1815
+ updateEnvironment: (params: zod0.infer<zod0.ZodObject<{
1816
+ environmentId: zod0.ZodUUID;
1817
+ name: zod0.ZodOptional<zod0.ZodString>;
1818
+ slug: zod0.ZodOptional<zod0.ZodString>;
1819
+ }, zod_v4_core0.$strip>>) => Promise<{
1820
+ slug: string;
1821
+ name: string;
1822
+ id: string;
1823
+ createdAt: Date;
1824
+ updatedAt: Date;
1825
+ isProd: boolean;
1826
+ } | undefined>;
1827
+ getEnvironmentById: (params: zod0.infer<zod0.ZodObject<{
1828
+ environmentId: zod0.ZodUUID;
1829
+ }, zod_v4_core0.$strip>>) => Promise<{
1830
+ slug: string;
1831
+ name: string;
1832
+ id: string;
1833
+ createdAt: Date;
1834
+ updatedAt: Date;
1835
+ isProd: boolean;
1836
+ } | undefined>;
1837
+ getEnvironmentBySlug: (params: zod0.infer<zod0.ZodObject<{
1838
+ slug: zod0.ZodString;
1839
+ }, zod_v4_core0.$strip>>) => Promise<{
1840
+ slug: string;
1841
+ name: string;
1842
+ id: string;
1843
+ createdAt: Date;
1844
+ updatedAt: Date;
1845
+ isProd: boolean;
1846
+ } | undefined>;
1847
+ deleteEnvironment: (params: zod0.infer<zod0.ZodObject<{
1848
+ environmentId: zod0.ZodUUID;
1849
+ }, zod_v4_core0.$strip>>) => Promise<{
1850
+ slug: string;
1851
+ name: string;
1852
+ id: string;
1853
+ createdAt: Date;
1854
+ updatedAt: Date;
1855
+ isProd: boolean;
1856
+ } | undefined>;
1857
+ listEnvironments: (params?: zod0.infer<zod0.ZodObject<{
1858
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1859
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1860
+ }, zod_v4_core0.$strip>>) => Promise<{
1861
+ slug: string;
1862
+ name: string;
1863
+ id: string;
1864
+ createdAt: Date;
1865
+ updatedAt: Date;
1866
+ isProd: boolean;
1867
+ }[]>;
1868
+ countEnvironments: () => Promise<number>;
1869
+ createConfigVariant: (params: zod0.infer<zod0.ZodObject<{
1870
+ configId: zod0.ZodString;
1871
+ variantId: zod0.ZodString;
1872
+ }, zod_v4_core0.$strip>>) => Promise<{
1873
+ id: string;
1874
+ createdAt: Date;
1875
+ updatedAt: Date;
1876
+ variantId: string;
1877
+ configId: string;
1878
+ } | undefined>;
1879
+ getConfigVariantById: (params: zod0.infer<zod0.ZodObject<{
1880
+ id: zod0.ZodString;
1881
+ }, zod_v4_core0.$strip>>) => Promise<{
1882
+ id: string;
1883
+ createdAt: Date;
1884
+ updatedAt: Date;
1885
+ variantId: string;
1886
+ configId: string;
1887
+ } | undefined>;
1888
+ getConfigVariantsByConfigId: (params: zod0.infer<zod0.ZodObject<{
1889
+ configId: zod0.ZodString;
1890
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1891
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1892
+ }, zod_v4_core0.$strip>>) => Promise<{
1893
+ id: string;
1894
+ createdAt: Date;
1895
+ updatedAt: Date;
1896
+ variantId: string;
1897
+ configId: string;
1898
+ }[]>;
1899
+ getConfigVariantsByVariantId: (params: zod0.infer<zod0.ZodObject<{
1900
+ variantId: zod0.ZodString;
1901
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1902
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1903
+ }, zod_v4_core0.$strip>>) => Promise<{
1904
+ id: string;
1905
+ createdAt: Date;
1906
+ updatedAt: Date;
1907
+ variantId: string;
1908
+ configId: string;
1909
+ }[]>;
1910
+ deleteConfigVariant: (params: zod0.infer<zod0.ZodObject<{
1911
+ id: zod0.ZodString;
1912
+ }, zod_v4_core0.$strip>>) => Promise<{
1913
+ id: string;
1914
+ createdAt: Date;
1915
+ updatedAt: Date;
1916
+ variantId: string;
1917
+ configId: string;
1918
+ } | undefined>;
1919
+ deleteConfigVariantByIds: (params: zod0.infer<zod0.ZodObject<{
1920
+ configId: zod0.ZodString;
1921
+ variantId: zod0.ZodString;
1922
+ }, zod_v4_core0.$strip>>) => Promise<{
1923
+ id: string;
1924
+ createdAt: Date;
1925
+ updatedAt: Date;
1926
+ variantId: string;
1927
+ configId: string;
1928
+ } | undefined>;
1929
+ listConfigVariants: (params?: zod0.infer<zod0.ZodObject<{
1930
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1931
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1932
+ }, zod_v4_core0.$strip>>) => Promise<{
1933
+ id: string;
1934
+ createdAt: Date;
1935
+ updatedAt: Date;
1936
+ variantId: string;
1937
+ configId: string;
1938
+ }[]>;
1939
+ getConfigVariantWithDetails: (params: zod0.infer<zod0.ZodObject<{
1940
+ id: zod0.ZodString;
1941
+ }, zod_v4_core0.$strip>>) => Promise<{
1942
+ latestVersion: {
1943
+ version: number;
1944
+ id: string;
1945
+ createdAt: Date;
1946
+ updatedAt: Date;
1947
+ variantId: string;
1948
+ provider: string;
1949
+ modelName: string;
1950
+ jsonData: Record<string, unknown>;
1951
+ } | null;
1952
+ variantName: string | null;
1953
+ id: string;
1954
+ createdAt: Date;
1955
+ updatedAt: Date;
1956
+ variantId: string;
1957
+ configId: string;
1958
+ configName: string | null | undefined;
1959
+ } | undefined>;
1960
+ getConfigVariantsWithDetailsByConfigId: (params: zod0.infer<zod0.ZodObject<{
1961
+ configId: zod0.ZodString;
1962
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
1963
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
1964
+ }, zod_v4_core0.$strip>>) => Promise<{
1965
+ provider: string | null;
1966
+ modelName: string | null;
1967
+ jsonData: Record<string, unknown> | null;
1968
+ latestVersion: {
1969
+ version: number;
1970
+ id: string;
1971
+ createdAt: Date;
1972
+ updatedAt: Date;
1973
+ variantId: string;
1974
+ provider: string;
1975
+ modelName: string;
1976
+ jsonData: Record<string, unknown>;
1977
+ } | null;
1978
+ name: string | null;
1979
+ id: string;
1980
+ createdAt: Date;
1981
+ updatedAt: Date;
1982
+ variantId: string;
1983
+ configId: string;
1984
+ }[]>;
1985
+ createVariantAndLinkToConfig: (params: zod0.infer<zod0.ZodObject<{
1986
+ configId: zod0.ZodString;
1987
+ name: zod0.ZodString;
1988
+ provider: zod0.ZodString;
1989
+ modelName: zod0.ZodString;
1990
+ jsonData: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
1991
+ }, zod_v4_core0.$strip>>) => Promise<{
1992
+ variant: {
1993
+ name: string;
1994
+ id: string;
1995
+ createdAt: Date;
1996
+ updatedAt: Date;
1997
+ };
1998
+ version: {
1999
+ version: number;
2000
+ id: string;
2001
+ createdAt: Date;
2002
+ updatedAt: Date;
2003
+ variantId: string;
2004
+ provider: string;
2005
+ modelName: string;
2006
+ jsonData: Record<string, unknown>;
2007
+ };
2008
+ configVariant: {
2009
+ id: string;
2010
+ createdAt: Date;
2011
+ updatedAt: Date;
2012
+ variantId: string;
2013
+ configId: string;
2014
+ };
2015
+ }>;
2016
+ getVariantJsonDataForConfig: (params: zod0.infer<zod0.ZodObject<{
2017
+ configId: zod0.ZodString;
2018
+ envSecret: zod0.ZodOptional<zod0.ZodString>;
2019
+ }, zod_v4_core0.$strip>>) => Promise<{
2020
+ version: number;
2021
+ provider: string;
2022
+ modelName: string;
2023
+ jsonData: Record<string, unknown>;
2024
+ }>;
2025
+ createNewConfig: (params: zod0.infer<zod0.ZodObject<{
2026
+ name: zod0.ZodString;
2027
+ }, zod_v4_core0.$strip>>) => Promise<{
2028
+ slug: string;
2029
+ name: string | undefined;
2030
+ id: string;
2031
+ createdAt: Date;
2032
+ updatedAt: Date;
2033
+ } | undefined>;
2034
+ updateConfigName: (params: zod0.infer<zod0.ZodObject<{
2035
+ configId: zod0.ZodUUID;
2036
+ newName: zod0.ZodString;
2037
+ }, zod_v4_core0.$strip>>) => Promise<{
2038
+ slug: string;
2039
+ name: string | undefined;
2040
+ id: string;
2041
+ createdAt: Date;
2042
+ updatedAt: Date;
2043
+ } | undefined>;
2044
+ getConfigById: (params: zod0.infer<zod0.ZodObject<{
2045
+ configId: zod0.ZodUUID;
2046
+ }, zod_v4_core0.$strip>>) => Promise<{
2047
+ slug: string;
2048
+ name: string | undefined;
2049
+ id: string;
2050
+ createdAt: Date;
2051
+ updatedAt: Date;
2052
+ } | undefined>;
2053
+ deleteConfig: (params: zod0.infer<zod0.ZodObject<{
2054
+ configId: zod0.ZodUUID;
2055
+ }, zod_v4_core0.$strip>>) => Promise<{
2056
+ slug: string;
2057
+ name: string | undefined;
2058
+ id: string;
2059
+ createdAt: Date;
2060
+ updatedAt: Date;
2061
+ } | undefined>;
2062
+ listConfigs: (params?: zod0.infer<zod0.ZodObject<{
2063
+ limit: zod0.ZodOptional<zod0.ZodNumber>;
2064
+ offset: zod0.ZodOptional<zod0.ZodNumber>;
2065
+ }, zod_v4_core0.$strip>>) => Promise<{
2066
+ slug: string;
2067
+ name: string | undefined;
2068
+ id: string;
2069
+ createdAt: Date;
2070
+ updatedAt: Date;
2071
+ }[]>;
2072
+ getConfigWithVariants: (params: zod0.infer<zod0.ZodObject<{
2073
+ configId: zod0.ZodUUID;
2074
+ }, zod_v4_core0.$strip>>) => Promise<{
2075
+ provider: string | null;
2076
+ modelName: string | null;
2077
+ jsonData: Record<string, unknown> | null;
2078
+ variantName: string | null;
2079
+ id: string;
2080
+ slug: string;
2081
+ name: string | undefined;
2082
+ createdAt: Date;
2083
+ updatedAt: Date;
2084
+ variantId: string | null;
2085
+ }[]>;
2086
+ }>;
2087
+ //#endregion
2088
+ export { type AnthropicProviderConfig, type AnyProviderConfig, AutoMigrateConfig, type AzureAIProviderConfig, type AzureOpenAIProviderConfig, type BaseProviderConfig, type BedrockProviderConfig, ChatCompletionCreateParamsBase, Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, type CortexProviderConfig, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, type FireworksAIProviderConfig, type GoogleProviderConfig, type HuggingFaceProviderConfig, Insertable, LLMOpsClient, LLMOpsConfig, type LLMOpsConfigInput, MigrationOptions, MigrationResult, type MistralAIProviderConfig, type OpenAIProviderConfig, type OracleProviderConfig, Prettify, type ProviderConfigMap, type ProvidersConfig, SCHEMA_METADATA, type SagemakerProviderConfig, Selectable, type StabilityAIProviderConfig, SupportedProviders, TableName, TargetingRule, TargetingRulesTable, Updateable, type ValidatedLLMOpsConfig, Variant, VariantJsonData, VariantVersion, VariantVersionsTable, VariantsTable, type VertexAIProviderConfig, type WorkersAIProviderConfig, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createDataLayer, createDatabase, createDatabaseFromConnection, detectDatabaseType, environmentSecretsSchema, environmentsSchema, gateway, generateId, getMigrations, llmopsConfigSchema, logger, matchType, parsePartialTableData, parseTableData, runAutoMigrations, schemas, targetingRulesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema };