@tstdl/base 0.93.165 → 0.93.167

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.
@@ -5,7 +5,7 @@ import { distinct, shuffle } from '../../utils/array/index.js';
5
5
  import { isInstanceOf, isNullOrUndefined } from '../../utils/type-guards.js';
6
6
  import { millisecondsPerMinute, millisecondsPerSecond } from '../../utils/units.js';
7
7
  const pluginKey = 'vertexai-multi-location';
8
- const geminiModelReference = vertexAI.model('gemini-2.5-flash');
8
+ const geminiModelReference = vertexAI.model('gemini-');
9
9
  const defaultTokenLimitThreshold = 131_072;
10
10
  export function vertexAiMultiLocation(options) {
11
11
  if (options.locations.length == 0) {
@@ -1,4 +1,5 @@
1
1
  import type { CircuitBreakerConfig } from '../../circuit-breaker/circuit-breaker.js';
2
+ export type { GeminiConfig } from '@genkit-ai/google-genai';
2
3
  export declare abstract class VertexAiMultiLocationOptions {
3
4
  /** The Google Cloud locations to use for routing. */
4
5
  locations: string[];
@@ -126,10 +126,10 @@ const assignRequestSystemInstructions = {
126
126
  const assignRequestUserInstructions = { Task: 'Evaluate the document against the list of open requests and find the best match following the system instructions.' };
127
127
  let DocumentManagementAiService = DocumentManagementAiService_1 = class DocumentManagementAiService {
128
128
  #genkit = injectGenkit();
129
- #contentExtractionModel = injectModel('gemini-2.5-flash-lite').withConfig({ temperature: 0.1, topP: 0.75, topK: 8 });
130
- #classifyModel = injectModel('gemini-2.5-flash').withConfig({ temperature: 0.1, topP: 0.75, topK: 8, thinkingConfig: { thinkingBudget: 0 } });
131
- #dataExtractionModel = injectModel('gemini-2.5-flash').withConfig({ temperature: 0.1, topP: 0.75, topK: 8, thinkingConfig: { thinkingBudget: 0 } });
132
- #assignModel = injectModel('gemini-2.5-flash').withConfig({ temperature: 0.1, topP: 0.75, topK: 8, thinkingConfig: { thinkingBudget: 0 } });
129
+ #contentExtractionModel = injectModel('gemini-3.1-flash-lite-preview').withConfig({ thinkingConfig: { thinkingLevel: 'LOW' } });
130
+ #classifyModel = injectModel('gemini-3.1-flash-lite-preview').withConfig({ thinkingConfig: { thinkingLevel: 'LOW' } });
131
+ #dataExtractionModel = injectModel('gemini-3.1-flash-lite-preview').withConfig({ thinkingConfig: { thinkingLevel: 'LOW' } });
132
+ #assignModel = injectModel('gemini-3.1-flash-lite-preview').withConfig({ thinkingConfig: { thinkingLevel: 'LOW' } });
133
133
  #documentCollectionService = inject(DocumentCollectionService);
134
134
  #documentTagService = inject(DocumentTagService);
135
135
  #documentCategoryTypeService = inject(DocumentCategoryTypeService);
@@ -12,7 +12,7 @@ const systemPromptBase = {
12
12
  };
13
13
  export class AiValidationExecutor extends DocumentValidationExecutor {
14
14
  genkit = injectGenkit();
15
- baseModel = injectModel('gemini-2.5-flash');
15
+ baseModel = injectModel('gemini-3.1-flash-lite-preview').withConfig({ thinkingConfig: { thinkingLevel: 'LOW' } });
16
16
  aiProvider = inject(DocumentManagementAiProviderService, undefined, { optional: true });
17
17
  getAiConfiguration(_context) {
18
18
  return {};
@@ -16,7 +16,7 @@ let ExampleAiProviderService = class ExampleAiProviderService extends DocumentMa
16
16
  return {
17
17
  defaults: {
18
18
  language: 'German', // Steer all AI outputs to German
19
- model: injectModel('gemini-2.5-flash'),
19
+ model: injectModel('gemini-3.1-flash-lite-preview').withConfig({ thinkingConfig: { thinkingLevel: 'LOW' } }),
20
20
  prompt: {
21
21
  systemAddition: 'Additional global instructions for all AI steps.',
22
22
  },
@@ -32,7 +32,7 @@ let ExampleAiProviderService = class ExampleAiProviderService extends DocumentMa
32
32
  getClassificationConfiguration() {
33
33
  return {
34
34
  // Use a faster/cheaper model for classification
35
- model: injectModel('gemini-2.5-flash-lite'),
35
+ model: injectModel('gemini-3.1-flash-lite-preview').withConfig({ thinkingConfig: { thinkingLevel: 'LOW' } }),
36
36
  prompt: {
37
37
  systemAddition: 'For classification, focus strictly on the layout.',
38
38
  },
@@ -1,6 +1,6 @@
1
1
  import type { BuildColumns, NotNull } from 'drizzle-orm';
2
2
  import type { ExtraConfigColumn, PgColumn, PgColumnBuilder, PgTableWithColumns } from 'drizzle-orm/pg-core';
3
- import type { CamelCase, ConditionalPick, SnakeCase } from 'type-fest';
3
+ import type { CamelCase, ConditionalKeys, SnakeCase } from 'type-fest';
4
4
  import type { JsonPath } from '../../json-path/json-path.js';
5
5
  import type { Record } from '../../schema/index.js';
6
6
  import type { Tagged, UnionToIntersection } from '../../types/index.js';
@@ -47,9 +47,9 @@ export type PgTableFromType<T extends EntityType = EntityType, S extends string
47
47
  }[keyof EmbeddedProperties<InstanceType<T>>]>, 'pg'>;
48
48
  dialect: 'pg';
49
49
  }>;
50
- export type EmbeddedProperties<T> = ConditionalPick<T, Tagged<unknown, EmbeddedConfigTag, {
50
+ export type EmbeddedProperties<T> = Pick<T, ConditionalKeys<T, Tagged<unknown, EmbeddedConfigTag, {
51
51
  prefix: any;
52
- }>>;
52
+ }>>>;
53
53
  export type EmbeddedColumns<T, Prefix extends string> = {
54
54
  [P in keyof T as CamelCase<`${Prefix}${Extract<P, string>}`>]: Column<CamelCase<`${Prefix}${Extract<P, string>}`>, T[P]>;
55
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.93.165",
3
+ "version": "0.93.167",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -149,11 +149,11 @@
149
149
  "reflect-metadata": "^0.2",
150
150
  "rxjs": "^7.8",
151
151
  "ts-pattern": "^5.9",
152
- "type-fest": "^5.4"
152
+ "type-fest": "^5.5"
153
153
  },
154
154
  "peerDependencies": {
155
- "@aws-sdk/client-s3": "^3.1010",
156
- "@aws-sdk/s3-request-presigner": "^3.1010",
155
+ "@aws-sdk/client-s3": "^3.1012",
156
+ "@aws-sdk/s3-request-presigner": "^3.1012",
157
157
  "@genkit-ai/google-genai": "^1.30",
158
158
  "@google-cloud/storage": "^7.19",
159
159
  "@toon-format/toon": "^2.1.0",
@@ -199,7 +199,7 @@
199
199
  "globals": "17.4",
200
200
  "tsc-alias": "1.8",
201
201
  "typedoc-github-wiki-theme": "2.1",
202
- "typedoc-plugin-markdown": "4.10",
202
+ "typedoc-plugin-markdown": "4.11",
203
203
  "typedoc-plugin-missing-exports": "4.1",
204
204
  "typescript": "5.9",
205
205
  "typescript-eslint": "8.57",