ToolJet/server/data-migrations/1774000000000-AddLLMKeyEnvConfiguredToTable.ts
Avinash a7771b76b0
Feat/selfhost ai (#15730)
* Feature: add self-host AI support in licensing module

* chore: update submodule commits for frontend and server

* Feature: add self-host AI check in LicenseBase class

* chore: update submodule commit for server

* Feature: add AITripleSparkles icon and update icon switch case

* chore: update submodule commit for frontend

* Feature: add BYOK support in LicenseBase and related modules

* Feature: add updateKey function to aiService and new route for LLM key in breadcrumbs

* Feature: add getKeySettings function to aiService and update service exports

* chore: update submodule commits for frontend and server

* Feature: add LLM_KEY_ENV_CONFIGURED to INSTANCE_SYSTEM_SETTINGS and create migration for its initial value

* chore: update submodule commits for frontend and server

* chore: update submodule commits for frontend and server

* chore: update submodule commit for frontend

* refactor: replace selfhostAI and byok with aiPlan in LicenseBase and related files

* chore: update submodule commits for frontend and server

* chore: update submodule commits for frontend and server
refactor: enhance error handling in sendMessage function

* refactor: adjust formatting in generatePayloadForLimits function for consistency

* feat: add EncryptionModule registration and LLM_API_KEY enum to instance settings

* chore: update submodule commits for frontend and server

* feat: implement handleAITextResponse for improved API response handling and update aiPlan logic in LicenseBase

* chore: update submodule commits for frontend and server

* chore: update submodule commits for frontend and server

* chore: update submodule commit for server

* feat: update aiPlan logic to include selfhostai and byok options

* chore: update submodule commit for server

* chore: mark subproject commits as dirty for frontend and server

* feat: simplify AI plan check in LicenseBase class

* feat: add update and get key settings features to AI ability

* feat: implement organization AI key management with rotation and migration

* chore: update submodule commit for server

* chore: update subproject commit for server

* chore: update subproject commit for server

* chore: update subproject commit for server

* chore: update subproject commits for frontend and server

* chore: update subproject commit for frontend

* chore: update subproject commit reference in server/ee

* chore: update subproject commit reference in frontend/ee

---------

Co-authored-by: Kartik Gupta <gupta.kartik18kg@gmail.com>
2026-04-02 22:26:30 +05:30

19 lines
754 B
TypeScript

import { MigrationInterface, QueryRunner } from 'typeorm';
import { InstanceSettings } from '@entities/instance_settings.entity';
import { INSTANCE_SETTINGS_TYPE, INSTANCE_SYSTEM_SETTINGS } from '@modules/instance-settings/constants';
export class AddLLMKeyEnvConfiguredToTable1774000000000 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
const entityManager = queryRunner.manager;
await entityManager.insert(InstanceSettings, {
label: 'LLM Key ENV Configured',
dataType: 'boolean',
value: 'false',
key: INSTANCE_SYSTEM_SETTINGS.LLM_KEY_ENV_CONFIGURED,
type: INSTANCE_SETTINGS_TYPE.SYSTEM,
});
}
public async down(queryRunner: QueryRunner): Promise<void> {}
}