@decocms/bindings 0.2.2 → 0.2.3

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/models.js ADDED
@@ -0,0 +1,111 @@
1
+ import { z } from 'zod';
2
+
3
+ // src/well-known/models.ts
4
+ var BaseCollectionEntitySchema = z.object({
5
+ id: z.string().describe("Unique identifier for the entity"),
6
+ title: z.string().describe("Human-readable title for the entity"),
7
+ created_at: z.string().datetime(),
8
+ updated_at: z.string().datetime(),
9
+ created_by: z.string().optional(),
10
+ updated_by: z.string().optional()
11
+ });
12
+ var ComparisonExpressionSchema = z.object({
13
+ field: z.array(z.string()),
14
+ operator: z.enum(["eq", "gt", "gte", "lt", "lte", "in", "like", "contains"]),
15
+ value: z.unknown()
16
+ });
17
+ var WhereExpressionSchema = z.union([
18
+ ComparisonExpressionSchema,
19
+ z.object({
20
+ operator: z.enum(["and", "or", "not"]),
21
+ conditions: z.array(ComparisonExpressionSchema)
22
+ })
23
+ ]);
24
+ var OrderByExpressionSchema = z.object({
25
+ field: z.array(z.string()),
26
+ direction: z.enum(["asc", "desc"]),
27
+ nulls: z.enum(["first", "last"]).optional()
28
+ });
29
+ var CollectionListInputSchema = z.object({
30
+ where: WhereExpressionSchema.optional().describe("Filter expression"),
31
+ orderBy: z.array(OrderByExpressionSchema).optional().describe("Sort expressions"),
32
+ limit: z.number().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),
33
+ offset: z.number().int().min(0).optional().describe("Number of items to skip")
34
+ });
35
+ function createCollectionListOutputSchema(entitySchema) {
36
+ return z.object({
37
+ items: z.array(entitySchema).describe("Array of collection items"),
38
+ totalCount: z.number().int().min(0).optional().describe("Total number of matching items (if available)"),
39
+ hasMore: z.boolean().optional().describe("Whether there are more items available")
40
+ });
41
+ }
42
+ var CollectionGetInputSchema = z.object({
43
+ id: z.string().describe("ID of the entity to retrieve")
44
+ });
45
+ function createCollectionGetOutputSchema(entitySchema) {
46
+ return z.object({
47
+ item: entitySchema.nullable().describe("The retrieved item, or null if not found")
48
+ });
49
+ }
50
+ z.object({
51
+ id: z.string().describe("ID of the entity to delete")
52
+ });
53
+ function createCollectionBindings(collectionName, entitySchema, options) {
54
+ const upperName = collectionName.toUpperCase();
55
+ const bindings = [
56
+ {
57
+ name: `COLLECTION_${upperName}_LIST`,
58
+ inputSchema: CollectionListInputSchema,
59
+ outputSchema: createCollectionListOutputSchema(entitySchema)
60
+ },
61
+ {
62
+ name: `COLLECTION_${upperName}_GET`,
63
+ inputSchema: CollectionGetInputSchema,
64
+ outputSchema: createCollectionGetOutputSchema(entitySchema)
65
+ }
66
+ ];
67
+ return bindings;
68
+ }
69
+
70
+ // src/well-known/models.ts
71
+ var ModelSchema = BaseCollectionEntitySchema.extend({
72
+ // Model-specific fields
73
+ logo: z.string().nullable(),
74
+ description: z.string().nullable(),
75
+ capabilities: z.array(z.string()),
76
+ limits: z.object({
77
+ contextWindow: z.number(),
78
+ maxOutputTokens: z.number()
79
+ }).nullable(),
80
+ costs: z.object({
81
+ input: z.number(),
82
+ output: z.number()
83
+ }).nullable(),
84
+ // Provider information
85
+ provider: z.enum([
86
+ "openai",
87
+ "anthropic",
88
+ "google",
89
+ "xai",
90
+ "deepseek",
91
+ "openai-compatible",
92
+ "openrouter"
93
+ ]).nullable(),
94
+ // Streaming endpoint information
95
+ endpoint: z.object({
96
+ url: z.string().url(),
97
+ method: z.string().default("POST"),
98
+ contentType: z.string().default("application/json"),
99
+ stream: z.boolean().default(true)
100
+ }).nullable()
101
+ });
102
+ var MODELS_COLLECTION_BINDING = createCollectionBindings(
103
+ "models",
104
+ ModelSchema);
105
+ var MODELS_BINDING = [
106
+ ...MODELS_COLLECTION_BINDING
107
+ ];
108
+
109
+ export { MODELS_BINDING, MODELS_COLLECTION_BINDING, ModelSchema };
110
+ //# sourceMappingURL=models.js.map
111
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/well-known/collections.ts","../src/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AAE,MAAA;AAAO,GAClB,EACA,QAAA,EAAS;AAAA;AAAA,EAEZ,QAAA,EAAUA,EACP,IAAA,CAAK;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,GACD,EACA,QAAA,EAAS;AAAA;AAAA,EAEZ,QAAA,EAAUA,EACP,MAAA,CAAO;AAAA,IACN,GAAA,EAAKA,CAAAA,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI;AAAA,IACpB,MAAA,EAAQA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,MAAM,CAAA;AAAA,IACjC,WAAA,EAAaA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,kBAAkB,CAAA;AAAA,IAClD,MAAA,EAAQA,CAAAA,CAAE,OAAA,EAAQ,CAAE,QAAQ,IAAI;AAAA,GACjC,EACA,QAAA;AACL,CAAC;AAQM,IAAM,yBAAA,GAA4B,wBAAA;AAAA,EACvC,QAAA;AAAA,EACA,WAEF;AAYO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAG;AACL","file":"models.js","sourcesContent":["import { z } from \"zod\";\nimport type { ToolBinder } from \"../core/binder\";\n\n/**\n * Collection Bindings\n *\n * This module provides standardized tool bindings for Collections, representing\n * SQL table-like structures with CRUD + Search operations compatible with TanStack DB.\n *\n * Key Features:\n * - Generic collection bindings that work with any entity type\n * - Standardized tool naming: `COLLECTION_{COLLECTION}_*`\n * - Compatible with TanStack DB query-collection\n * - Full TypeScript support with proper type constraints\n * - Support for filtering, sorting, and pagination\n * - Simple id and title fields for human-readable identification\n */\n\n/**\n * Base schema for collection entities\n * All collection entities must have an id, title, and audit trail fields\n */\nexport const BaseCollectionEntitySchema = z.object({\n id: z.string().describe(\"Unique identifier for the entity\"),\n title: z.string().describe(\"Human-readable title for the entity\"),\n created_at: z.string().datetime(),\n updated_at: z.string().datetime(),\n created_by: z.string().optional(),\n updated_by: z.string().optional(),\n});\n\n/**\n * Type helper for BaseCollectionEntitySchema\n */\nexport type BaseCollectionEntitySchemaType = typeof BaseCollectionEntitySchema;\n\n/**\n * Comparison expression schema for filtering\n */\nconst ComparisonExpressionSchema = z.object({\n field: z.array(z.string()),\n operator: z.enum([\"eq\", \"gt\", \"gte\", \"lt\", \"lte\", \"in\", \"like\", \"contains\"]),\n value: z.unknown(),\n});\n\n/**\n * Where expression schema for filtering\n * Supports TanStack DB predicate push-down patterns\n */\nexport const WhereExpressionSchema = z.union([\n ComparisonExpressionSchema,\n z.object({\n operator: z.enum([\"and\", \"or\", \"not\"]),\n conditions: z.array(ComparisonExpressionSchema),\n }),\n]);\n\n/**\n * Where expression type for filtering\n * Derived from WhereExpressionSchema\n */\nexport type WhereExpression = z.infer<typeof WhereExpressionSchema>;\n\n/**\n * Order by expression for sorting\n */\nexport const OrderByExpressionSchema = z.object({\n field: z.array(z.string()),\n direction: z.enum([\"asc\", \"desc\"]),\n nulls: z.enum([\"first\", \"last\"]).optional(),\n});\n\n/**\n * List/Query input schema for collections\n * Compatible with TanStack DB LoadSubsetOptions\n */\nexport const CollectionListInputSchema = z.object({\n where: WhereExpressionSchema.optional().describe(\"Filter expression\"),\n orderBy: z\n .array(OrderByExpressionSchema)\n .optional()\n .describe(\"Sort expressions\"),\n limit: z\n .number()\n .int()\n .min(1)\n .max(1000)\n .optional()\n .describe(\"Maximum number of items to return\"),\n offset: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Number of items to skip\"),\n});\n\n/**\n * Factory function to create list output schema for a specific collection type\n */\nexport function createCollectionListOutputSchema<T extends z.ZodTypeAny>(\n entitySchema: T,\n) {\n return z.object({\n items: z.array(entitySchema).describe(\"Array of collection items\"),\n totalCount: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Total number of matching items (if available)\"),\n hasMore: z\n .boolean()\n .optional()\n .describe(\"Whether there are more items available\"),\n });\n}\n\n/**\n * Get by ID input schema\n */\nexport const CollectionGetInputSchema = z.object({\n id: z.string().describe(\"ID of the entity to retrieve\"),\n});\n\n/**\n * Factory function to create get output schema\n */\nexport function createCollectionGetOutputSchema<T extends z.ZodTypeAny>(\n entitySchema: T,\n) {\n return z.object({\n item: entitySchema\n .nullable()\n .describe(\"The retrieved item, or null if not found\"),\n });\n}\n\n/**\n * Factory function to create insert input schema\n */\nexport function createCollectionInsertInputSchema<T extends z.ZodTypeAny>(\n entitySchema: T,\n) {\n // Remove id field since it may be auto-generated by the server\n return z.object({\n data: entitySchema.describe(\n \"Data for the new entity (id may be auto-generated)\",\n ),\n });\n}\n\n/**\n * Factory function to create insert output schema\n */\nexport function createCollectionInsertOutputSchema<T extends z.ZodTypeAny>(\n entitySchema: T,\n) {\n return z.object({\n item: entitySchema.describe(\"The created entity with generated id\"),\n });\n}\n\n/**\n * Factory function to create update input schema\n */\nexport function createCollectionUpdateInputSchema<T extends z.ZodTypeAny>(\n entitySchema: T,\n) {\n return z.object({\n id: z.string().describe(\"ID of the entity to update\"),\n data: (entitySchema as unknown as z.AnyZodObject)\n .partial()\n .describe(\"Partial entity data to update\"),\n });\n}\n\n/**\n * Factory function to create update output schema\n */\nexport function createCollectionUpdateOutputSchema<T extends z.ZodTypeAny>(\n entitySchema: T,\n) {\n return z.object({\n item: entitySchema.describe(\"The updated entity\"),\n });\n}\n\n/**\n * Delete input schema\n */\nexport const CollectionDeleteInputSchema = z.object({\n id: z.string().describe(\"ID of the entity to delete\"),\n});\n\n/**\n * Factory function to create delete output schema\n */\nexport function createCollectionDeleteOutputSchema<T extends z.ZodTypeAny>(\n entitySchema: T,\n) {\n return z.object({\n item: entitySchema.describe(\"The deleted entity\"),\n });\n}\n\n/**\n * Options for creating collection bindings\n */\nexport interface CollectionBindingOptions {\n /**\n * If true, only LIST and GET operations will be included (read-only collection)\n * @default false\n */\n readOnly?: boolean;\n}\n\n/**\n * Creates generic collection bindings for a specific entity type\n *\n * This function generates standardized tool bindings that work with any collection/table\n * by accepting a custom entity schema and collection name. The bindings provide:\n * - COLLECTION_{NAME}_LIST - Query/search entities with filtering and sorting (required)\n * - COLLECTION_{NAME}_GET - Get a single entity by ID (required)\n * - COLLECTION_{NAME}_CREATE - Create a new entity (optional, excluded if readOnly=true)\n * - COLLECTION_{NAME}_UPDATE - Update an existing entity (optional, excluded if readOnly=true)\n * - COLLECTION_{NAME}_DELETE - Delete an entity (optional, excluded if readOnly=true)\n *\n * @param collectionName - The name of the collection/table (e.g., \"users\", \"products\", \"orders\")\n * @param entitySchema - The Zod schema for the entity type (must extend BaseCollectionEntitySchema)\n * @param options - Optional configuration for the collection bindings\n * @returns Array of tool bindings for Collection CRUD + Query operations\n *\n * @example\n * ```typescript\n * const UserSchema = z.object({\n * id: z.string(),\n * title: z.string(),\n * created_at: z.string().datetime(),\n * updated_at: z.string().datetime(),\n * created_by: z.string().optional(),\n * updated_by: z.string().optional(),\n * email: z.string().email(),\n * });\n *\n * // Full CRUD collection\n * const USER_COLLECTION_BINDING = createCollectionBindings(\"users\", UserSchema);\n *\n * // Read-only collection (only LIST and GET)\n * const READONLY_COLLECTION_BINDING = createCollectionBindings(\"products\", ProductSchema, { readOnly: true });\n * ```\n */\nexport function createCollectionBindings<\n TEntitySchema extends BaseCollectionEntitySchemaType,\n TName extends string,\n>(\n collectionName: TName,\n entitySchema: TEntitySchema,\n options?: CollectionBindingOptions,\n) {\n const upperName = collectionName.toUpperCase() as Uppercase<TName>;\n const readOnly = options?.readOnly ?? false;\n\n const bindings: CollectionBinding<TEntitySchema, Uppercase<TName>>[number][] =\n [\n {\n name: `COLLECTION_${upperName}_LIST` as const,\n inputSchema: CollectionListInputSchema,\n outputSchema: createCollectionListOutputSchema(entitySchema),\n },\n {\n name: `COLLECTION_${upperName}_GET` as const,\n inputSchema: CollectionGetInputSchema,\n outputSchema: createCollectionGetOutputSchema(entitySchema),\n },\n ];\n\n // Only include mutation operations if not read-only\n if (!readOnly) {\n bindings.push(\n {\n name: `COLLECTION_${upperName}_CREATE` as const,\n inputSchema: createCollectionInsertInputSchema(entitySchema),\n outputSchema: createCollectionInsertOutputSchema(entitySchema),\n opt: true,\n },\n {\n name: `COLLECTION_${upperName}_UPDATE` as const,\n inputSchema: createCollectionUpdateInputSchema(entitySchema),\n outputSchema: createCollectionUpdateOutputSchema(entitySchema),\n opt: true,\n },\n {\n name: `COLLECTION_${upperName}_DELETE` as const,\n inputSchema: CollectionDeleteInputSchema,\n outputSchema: createCollectionDeleteOutputSchema(entitySchema),\n opt: true,\n },\n );\n }\n\n return bindings satisfies readonly ToolBinder[];\n}\n\nexport type ReadOnlyCollectionBinding<\n TEntitySchema extends BaseCollectionEntitySchemaType,\n TUpperName extends Uppercase<string> = Uppercase<string>,\n> = [\n {\n name: `COLLECTION_${TUpperName}_LIST`;\n inputSchema: typeof CollectionListInputSchema;\n outputSchema: ReturnType<\n typeof createCollectionListOutputSchema<TEntitySchema>\n >;\n },\n {\n name: `COLLECTION_${TUpperName}_GET`;\n inputSchema: typeof CollectionGetInputSchema;\n outputSchema: ReturnType<\n typeof createCollectionGetOutputSchema<TEntitySchema>\n >;\n },\n];\n/**\n * Type helper to extract the collection binding type\n */\nexport type CollectionBinding<\n TEntitySchema extends BaseCollectionEntitySchemaType,\n TUpperName extends Uppercase<string> = Uppercase<string>,\n> = [\n ...ReadOnlyCollectionBinding<TEntitySchema, TUpperName>,\n {\n name: `COLLECTION_${TUpperName}_CREATE`;\n inputSchema: ReturnType<\n typeof createCollectionInsertInputSchema<TEntitySchema>\n >;\n outputSchema: ReturnType<\n typeof createCollectionInsertOutputSchema<TEntitySchema>\n >;\n opt: true;\n },\n {\n name: `COLLECTION_${TUpperName}_UPDATE`;\n inputSchema: ReturnType<\n typeof createCollectionUpdateInputSchema<TEntitySchema>\n >;\n outputSchema: ReturnType<\n typeof createCollectionUpdateOutputSchema<TEntitySchema>\n >;\n opt: true;\n },\n {\n name: `COLLECTION_${TUpperName}_DELETE`;\n inputSchema: typeof CollectionDeleteInputSchema;\n outputSchema: ReturnType<\n typeof createCollectionDeleteOutputSchema<TEntitySchema>\n >;\n opt: true;\n },\n];\n\n/**\n * Type helper to extract tool names from a collection binding\n */\nexport type CollectionTools<\n TEntitySchema extends BaseCollectionEntitySchemaType,\n TUpperName extends Uppercase<string> = Uppercase<string>,\n> = CollectionBinding<TEntitySchema, TUpperName>[number][\"name\"];\n\n// Export types for TypeScript usage\nexport type CollectionListInput = z.infer<typeof CollectionListInputSchema>;\nexport type CollectionGetInput = z.infer<typeof CollectionGetInputSchema>;\nexport type CollectionDeleteInput = z.infer<typeof CollectionDeleteInputSchema>;\nexport type OrderByExpression = z.infer<typeof OrderByExpressionSchema>;\n\n/**\n * Type helper for list output with generic item type\n */\nexport type CollectionListOutput<T> = {\n items: T[];\n totalCount?: number;\n hasMore?: boolean;\n};\n\n/**\n * Type helper for get output with generic item type\n */\nexport type CollectionGetOutput<T> = {\n item: T | null;\n};\n\n/**\n * Type helper for insert output with generic item type\n */\nexport type CollectionInsertOutput<T> = {\n item: T;\n};\n\n/**\n * Type helper for update output with generic item type\n */\nexport type CollectionUpdateOutput<T> = {\n item: T;\n};\n\n/**\n * Type helper for delete output with generic item type\n */\nexport type CollectionDeleteOutput<T> = {\n item: T;\n};\n\n/**\n * Base collection entity type - inferred from BaseCollectionEntitySchema\n */\nexport type BaseCollectionEntity = z.infer<typeof BaseCollectionEntitySchema>;\n","/**\n * Models Well-Known Binding\n *\n * Defines the interface for AI model providers.\n * Any MCP that implements this binding can provide AI models and streaming endpoints.\n *\n * This binding uses collection bindings for LIST and GET operations (read-only).\n * Streaming endpoint information is included directly in the model entity schema.\n */\n\nimport { z } from \"zod\";\nimport type { Binder } from \"../core/binder\";\nimport {\n BaseCollectionEntitySchema,\n createCollectionBindings,\n} from \"./collections\";\n\n/**\n * Model entity schema for AI models\n * Extends BaseCollectionEntitySchema with model-specific fields\n * Base schema already includes: id, title, created_at, updated_at, created_by, updated_by\n */\nexport const ModelSchema = BaseCollectionEntitySchema.extend({\n // Model-specific fields\n logo: z.string().nullable(),\n description: z.string().nullable(),\n capabilities: z.array(z.string()),\n limits: z\n .object({\n contextWindow: z.number(),\n maxOutputTokens: z.number(),\n })\n .nullable(),\n costs: z\n .object({\n input: z.number(),\n output: z.number(),\n })\n .nullable(),\n // Provider information\n provider: z\n .enum([\n \"openai\",\n \"anthropic\",\n \"google\",\n \"xai\",\n \"deepseek\",\n \"openai-compatible\",\n \"openrouter\",\n ])\n .nullable(),\n // Streaming endpoint information\n endpoint: z\n .object({\n url: z.string().url(),\n method: z.string().default(\"POST\"),\n contentType: z.string().default(\"application/json\"),\n stream: z.boolean().default(true),\n })\n .nullable(),\n});\n\n/**\n * MODELS Collection Binding\n *\n * Collection bindings for models (read-only).\n * Provides LIST and GET operations for AI models.\n */\nexport const MODELS_COLLECTION_BINDING = createCollectionBindings(\n \"models\",\n ModelSchema,\n { readOnly: true },\n);\n\n/**\n * MODELS Binding\n *\n * Defines the interface for AI model providers.\n * Any MCP that implements this binding can provide AI models and streaming endpoints.\n *\n * Required tools:\n * - COLLECTION_MODELS_LIST: List available AI models with their capabilities\n * - COLLECTION_MODELS_GET: Get a single model by ID (includes streaming endpoint info)\n */\nexport const MODELS_BINDING = [\n ...MODELS_COLLECTION_BINDING,\n] as const satisfies Binder;\n"]}
@@ -276,7 +276,7 @@ declare const ModelSchema: z.ZodObject<{
276
276
  input: number;
277
277
  output: number;
278
278
  }>>;
279
- provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "xai", "deepseek", "openai-compatible", "openrouter"]>>;
279
+ provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "x-ai", "deepseek", "openai-compatible", "openrouter"]>>;
280
280
  }, "strip", z.ZodTypeAny, {
281
281
  description: string | null;
282
282
  capabilities: string[];
@@ -290,7 +290,7 @@ declare const ModelSchema: z.ZodObject<{
290
290
  input: number;
291
291
  output: number;
292
292
  } | null;
293
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
293
+ provider: "openai" | "anthropic" | "google" | "x-ai" | "deepseek" | "openai-compatible" | "openrouter" | null;
294
294
  }, {
295
295
  description: string | null;
296
296
  capabilities: string[];
@@ -304,7 +304,7 @@ declare const ModelSchema: z.ZodObject<{
304
304
  input: number;
305
305
  output: number;
306
306
  } | null;
307
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
307
+ provider: "openai" | "anthropic" | "google" | "x-ai" | "deepseek" | "openai-compatible" | "openrouter" | null;
308
308
  }>;
309
309
  declare const LanguageModelInputSchema: z.ZodObject<{
310
310
  modelId: z.ZodString;
@@ -503,7 +503,7 @@ declare const ModelCollectionEntitySchema: z.ZodObject<{
503
503
  input: number;
504
504
  output: number;
505
505
  } | null;
506
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
506
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
507
507
  created_by?: string | undefined;
508
508
  updated_by?: string | undefined;
509
509
  }, {
@@ -522,7 +522,7 @@ declare const ModelCollectionEntitySchema: z.ZodObject<{
522
522
  input: number;
523
523
  output: number;
524
524
  } | null;
525
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
525
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
526
526
  created_by?: string | undefined;
527
527
  updated_by?: string | undefined;
528
528
  }>;
@@ -591,7 +591,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
591
591
  input: number;
592
592
  output: number;
593
593
  } | null;
594
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
594
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
595
595
  created_by?: string | undefined;
596
596
  updated_by?: string | undefined;
597
597
  }, {
@@ -610,7 +610,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
610
610
  input: number;
611
611
  output: number;
612
612
  } | null;
613
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
613
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
614
614
  created_by?: string | undefined;
615
615
  updated_by?: string | undefined;
616
616
  }>, "many">;
@@ -633,7 +633,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
633
633
  input: number;
634
634
  output: number;
635
635
  } | null;
636
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
636
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
637
637
  created_by?: string | undefined;
638
638
  updated_by?: string | undefined;
639
639
  }[];
@@ -656,7 +656,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
656
656
  input: number;
657
657
  output: number;
658
658
  } | null;
659
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
659
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
660
660
  created_by?: string | undefined;
661
661
  updated_by?: string | undefined;
662
662
  }[];
@@ -715,7 +715,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
715
715
  input: number;
716
716
  output: number;
717
717
  } | null;
718
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
718
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
719
719
  created_by?: string | undefined;
720
720
  updated_by?: string | undefined;
721
721
  }, {
@@ -734,7 +734,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
734
734
  input: number;
735
735
  output: number;
736
736
  } | null;
737
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
737
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
738
738
  created_by?: string | undefined;
739
739
  updated_by?: string | undefined;
740
740
  }>>;
@@ -755,7 +755,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
755
755
  input: number;
756
756
  output: number;
757
757
  } | null;
758
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
758
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
759
759
  created_by?: string | undefined;
760
760
  updated_by?: string | undefined;
761
761
  } | null;
@@ -776,7 +776,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
776
776
  input: number;
777
777
  output: number;
778
778
  } | null;
779
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
779
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
780
780
  created_by?: string | undefined;
781
781
  updated_by?: string | undefined;
782
782
  } | null;
@@ -832,7 +832,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
832
832
  input: number;
833
833
  output: number;
834
834
  } | null;
835
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
835
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
836
836
  created_by?: string | undefined;
837
837
  updated_by?: string | undefined;
838
838
  }, {
@@ -851,7 +851,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
851
851
  input: number;
852
852
  output: number;
853
853
  } | null;
854
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
854
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
855
855
  created_by?: string | undefined;
856
856
  updated_by?: string | undefined;
857
857
  }>;
@@ -872,7 +872,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
872
872
  input: number;
873
873
  output: number;
874
874
  } | null;
875
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
875
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
876
876
  created_by?: string | undefined;
877
877
  updated_by?: string | undefined;
878
878
  };
@@ -893,7 +893,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
893
893
  input: number;
894
894
  output: number;
895
895
  } | null;
896
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
896
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
897
897
  created_by?: string | undefined;
898
898
  updated_by?: string | undefined;
899
899
  };
@@ -947,7 +947,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
947
947
  input: number;
948
948
  output: number;
949
949
  } | null;
950
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
950
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
951
951
  created_by?: string | undefined;
952
952
  updated_by?: string | undefined;
953
953
  }, {
@@ -966,7 +966,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
966
966
  input: number;
967
967
  output: number;
968
968
  } | null;
969
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
969
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
970
970
  created_by?: string | undefined;
971
971
  updated_by?: string | undefined;
972
972
  }>;
@@ -987,7 +987,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
987
987
  input: number;
988
988
  output: number;
989
989
  } | null;
990
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
990
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
991
991
  created_by?: string | undefined;
992
992
  updated_by?: string | undefined;
993
993
  };
@@ -1008,7 +1008,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1008
1008
  input: number;
1009
1009
  output: number;
1010
1010
  } | null;
1011
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1011
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1012
1012
  created_by?: string | undefined;
1013
1013
  updated_by?: string | undefined;
1014
1014
  };
@@ -1085,7 +1085,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1085
1085
  input: number;
1086
1086
  output: number;
1087
1087
  } | null;
1088
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1088
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1089
1089
  created_by?: string | undefined;
1090
1090
  updated_by?: string | undefined;
1091
1091
  }, {
@@ -1104,7 +1104,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1104
1104
  input: number;
1105
1105
  output: number;
1106
1106
  } | null;
1107
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1107
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1108
1108
  created_by?: string | undefined;
1109
1109
  updated_by?: string | undefined;
1110
1110
  }>;
@@ -1125,7 +1125,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1125
1125
  input: number;
1126
1126
  output: number;
1127
1127
  } | null;
1128
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1128
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1129
1129
  created_by?: string | undefined;
1130
1130
  updated_by?: string | undefined;
1131
1131
  };
@@ -1146,7 +1146,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1146
1146
  input: number;
1147
1147
  output: number;
1148
1148
  } | null;
1149
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1149
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1150
1150
  created_by?: string | undefined;
1151
1151
  updated_by?: string | undefined;
1152
1152
  };
@@ -1204,7 +1204,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1204
1204
  input: number;
1205
1205
  output: number;
1206
1206
  } | null;
1207
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1207
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1208
1208
  created_by?: string | undefined;
1209
1209
  updated_by?: string | undefined;
1210
1210
  }, {
@@ -1223,7 +1223,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1223
1223
  input: number;
1224
1224
  output: number;
1225
1225
  } | null;
1226
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1226
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1227
1227
  created_by?: string | undefined;
1228
1228
  updated_by?: string | undefined;
1229
1229
  }>;
@@ -1244,7 +1244,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1244
1244
  input: number;
1245
1245
  output: number;
1246
1246
  } | null;
1247
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1247
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1248
1248
  created_by?: string | undefined;
1249
1249
  updated_by?: string | undefined;
1250
1250
  };
@@ -1265,7 +1265,7 @@ declare const LANGUAGE_MODEL_BINDING: ({
1265
1265
  input: number;
1266
1266
  output: number;
1267
1267
  } | null;
1268
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1268
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1269
1269
  created_by?: string | undefined;
1270
1270
  updated_by?: string | undefined;
1271
1271
  };
@@ -1739,7 +1739,7 @@ declare const LanguageModelBinding: {
1739
1739
  input: number;
1740
1740
  output: number;
1741
1741
  } | null;
1742
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1742
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1743
1743
  created_by?: string | undefined;
1744
1744
  updated_by?: string | undefined;
1745
1745
  }, {
@@ -1758,7 +1758,7 @@ declare const LanguageModelBinding: {
1758
1758
  input: number;
1759
1759
  output: number;
1760
1760
  } | null;
1761
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1761
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1762
1762
  created_by?: string | undefined;
1763
1763
  updated_by?: string | undefined;
1764
1764
  }>, "many">;
@@ -1781,7 +1781,7 @@ declare const LanguageModelBinding: {
1781
1781
  input: number;
1782
1782
  output: number;
1783
1783
  } | null;
1784
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1784
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1785
1785
  created_by?: string | undefined;
1786
1786
  updated_by?: string | undefined;
1787
1787
  }[];
@@ -1804,7 +1804,7 @@ declare const LanguageModelBinding: {
1804
1804
  input: number;
1805
1805
  output: number;
1806
1806
  } | null;
1807
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1807
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1808
1808
  created_by?: string | undefined;
1809
1809
  updated_by?: string | undefined;
1810
1810
  }[];
@@ -1863,7 +1863,7 @@ declare const LanguageModelBinding: {
1863
1863
  input: number;
1864
1864
  output: number;
1865
1865
  } | null;
1866
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1866
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1867
1867
  created_by?: string | undefined;
1868
1868
  updated_by?: string | undefined;
1869
1869
  }, {
@@ -1882,7 +1882,7 @@ declare const LanguageModelBinding: {
1882
1882
  input: number;
1883
1883
  output: number;
1884
1884
  } | null;
1885
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1885
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1886
1886
  created_by?: string | undefined;
1887
1887
  updated_by?: string | undefined;
1888
1888
  }>>;
@@ -1903,7 +1903,7 @@ declare const LanguageModelBinding: {
1903
1903
  input: number;
1904
1904
  output: number;
1905
1905
  } | null;
1906
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1906
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1907
1907
  created_by?: string | undefined;
1908
1908
  updated_by?: string | undefined;
1909
1909
  } | null;
@@ -1924,7 +1924,7 @@ declare const LanguageModelBinding: {
1924
1924
  input: number;
1925
1925
  output: number;
1926
1926
  } | null;
1927
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1927
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1928
1928
  created_by?: string | undefined;
1929
1929
  updated_by?: string | undefined;
1930
1930
  } | null;
@@ -1980,7 +1980,7 @@ declare const LanguageModelBinding: {
1980
1980
  input: number;
1981
1981
  output: number;
1982
1982
  } | null;
1983
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
1983
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1984
1984
  created_by?: string | undefined;
1985
1985
  updated_by?: string | undefined;
1986
1986
  }, {
@@ -1999,7 +1999,7 @@ declare const LanguageModelBinding: {
1999
1999
  input: number;
2000
2000
  output: number;
2001
2001
  } | null;
2002
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2002
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2003
2003
  created_by?: string | undefined;
2004
2004
  updated_by?: string | undefined;
2005
2005
  }>;
@@ -2020,7 +2020,7 @@ declare const LanguageModelBinding: {
2020
2020
  input: number;
2021
2021
  output: number;
2022
2022
  } | null;
2023
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2023
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2024
2024
  created_by?: string | undefined;
2025
2025
  updated_by?: string | undefined;
2026
2026
  };
@@ -2041,7 +2041,7 @@ declare const LanguageModelBinding: {
2041
2041
  input: number;
2042
2042
  output: number;
2043
2043
  } | null;
2044
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2044
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2045
2045
  created_by?: string | undefined;
2046
2046
  updated_by?: string | undefined;
2047
2047
  };
@@ -2095,7 +2095,7 @@ declare const LanguageModelBinding: {
2095
2095
  input: number;
2096
2096
  output: number;
2097
2097
  } | null;
2098
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2098
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2099
2099
  created_by?: string | undefined;
2100
2100
  updated_by?: string | undefined;
2101
2101
  }, {
@@ -2114,7 +2114,7 @@ declare const LanguageModelBinding: {
2114
2114
  input: number;
2115
2115
  output: number;
2116
2116
  } | null;
2117
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2117
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2118
2118
  created_by?: string | undefined;
2119
2119
  updated_by?: string | undefined;
2120
2120
  }>;
@@ -2135,7 +2135,7 @@ declare const LanguageModelBinding: {
2135
2135
  input: number;
2136
2136
  output: number;
2137
2137
  } | null;
2138
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2138
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2139
2139
  created_by?: string | undefined;
2140
2140
  updated_by?: string | undefined;
2141
2141
  };
@@ -2156,7 +2156,7 @@ declare const LanguageModelBinding: {
2156
2156
  input: number;
2157
2157
  output: number;
2158
2158
  } | null;
2159
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2159
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2160
2160
  created_by?: string | undefined;
2161
2161
  updated_by?: string | undefined;
2162
2162
  };
@@ -2233,7 +2233,7 @@ declare const LanguageModelBinding: {
2233
2233
  input: number;
2234
2234
  output: number;
2235
2235
  } | null;
2236
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2236
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2237
2237
  created_by?: string | undefined;
2238
2238
  updated_by?: string | undefined;
2239
2239
  }, {
@@ -2252,7 +2252,7 @@ declare const LanguageModelBinding: {
2252
2252
  input: number;
2253
2253
  output: number;
2254
2254
  } | null;
2255
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2255
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2256
2256
  created_by?: string | undefined;
2257
2257
  updated_by?: string | undefined;
2258
2258
  }>;
@@ -2273,7 +2273,7 @@ declare const LanguageModelBinding: {
2273
2273
  input: number;
2274
2274
  output: number;
2275
2275
  } | null;
2276
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2276
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2277
2277
  created_by?: string | undefined;
2278
2278
  updated_by?: string | undefined;
2279
2279
  };
@@ -2294,7 +2294,7 @@ declare const LanguageModelBinding: {
2294
2294
  input: number;
2295
2295
  output: number;
2296
2296
  } | null;
2297
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2297
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2298
2298
  created_by?: string | undefined;
2299
2299
  updated_by?: string | undefined;
2300
2300
  };
@@ -2352,7 +2352,7 @@ declare const LanguageModelBinding: {
2352
2352
  input: number;
2353
2353
  output: number;
2354
2354
  } | null;
2355
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2355
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2356
2356
  created_by?: string | undefined;
2357
2357
  updated_by?: string | undefined;
2358
2358
  }, {
@@ -2371,7 +2371,7 @@ declare const LanguageModelBinding: {
2371
2371
  input: number;
2372
2372
  output: number;
2373
2373
  } | null;
2374
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2374
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2375
2375
  created_by?: string | undefined;
2376
2376
  updated_by?: string | undefined;
2377
2377
  }>;
@@ -2392,7 +2392,7 @@ declare const LanguageModelBinding: {
2392
2392
  input: number;
2393
2393
  output: number;
2394
2394
  } | null;
2395
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2395
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2396
2396
  created_by?: string | undefined;
2397
2397
  updated_by?: string | undefined;
2398
2398
  };
@@ -2413,7 +2413,7 @@ declare const LanguageModelBinding: {
2413
2413
  input: number;
2414
2414
  output: number;
2415
2415
  } | null;
2416
- provider: "openai" | "anthropic" | "google" | "xai" | "deepseek" | "openai-compatible" | "openrouter" | null;
2416
+ provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
2417
2417
  created_by?: string | undefined;
2418
2418
  updated_by?: string | undefined;
2419
2419
  };
@@ -137,7 +137,7 @@ var ModelSchema = z.object({
137
137
  "openai",
138
138
  "anthropic",
139
139
  "google",
140
- "xai",
140
+ "x-ai",
141
141
  "deepseek",
142
142
  "openai-compatible",
143
143
  "openrouter"