Update OpenAI models from GPT-5.2 to GPT-5.4, add Gemini 3.1 Flash Lite, reorder Gemini models, and bump dependencies

This commit is contained in:
Andrew Beal 2026-04-12 12:58:16 +01:00
parent 6671f50078
commit c414915688
7 changed files with 61 additions and 67 deletions

View file

@ -60,16 +60,14 @@ export enum AIProviderModel {
GeminiFlash_2_5 = "gemini-2.5-flash",
GeminiPro_2_5 = "gemini-2.5-pro",
GeminiFlash_3_Preview = "gemini-3-flash-preview",
GeminiFlash_3_1_Preview_Lite = "gemini-3.1-flash-lite-preview",
GeminiPro_3_1_Preview = "gemini-3.1-pro-preview",
// OpenAI models
GPT_5_2_Instant = "gpt-5.2-chat-latest",
GPT_5_2_Thinking = "gpt-5.2",
GPT_5_2_Pro = "gpt-5.2-pro",
GPT_5_1 = "gpt-5.1",
GPT_5 = "gpt-5",
GPT_5_Mini = "gpt-5-mini",
GPT_5_Nano = "gpt-5-nano",
GPT_5_4 = "gpt-5.4",
GPT_5_4_Pro = "gpt-5.4-pro",
GPT_5_4_Mini = "gpt-5.4-mini",
GPT_5_4_Nano = "gpt-5.4-nano",
// Mistral models
MistralLarge = "mistral-large-latest",
@ -79,7 +77,7 @@ export enum AIProviderModel {
// Conversation naming models (aliases to existing models)
ClaudeNamer = ClaudeHaiku_4_5,
GeminiNamer = GeminiFlash_2_5_Lite,
OpenAINamer = GPT_5_2_Instant,
OpenAINamer = GPT_5_4_Nano,
MistralNamer = MistralSmall,
}

View file

@ -21,15 +21,13 @@ export enum Copy {
GeminiFlash_2_5 = "Gemini 2.5 Flash",
GeminiPro_2_5 = "Gemini 2.5 Pro",
GeminiFlash_3_Preview = "Gemini 3 Flash Preview",
GeminiFlash_3_1_Preview_Lite = "Gemini 3.1 Flash Lite Preview",
GeminiPro_3_1_Preview = "Gemini 3.1 Pro Preview",
GPT_5_2_Instant = "GPT-5.2 Instant",
GPT_5_2_Thinking = "GPT-5.2 Thinking",
GPT_5_2_Pro = "GPT-5.2 Pro",
GPT_5_1 = "GPT-5.1",
GPT_5 = "GPT-5",
GPT_5_Mini = "GPT-5 Mini",
GPT_5_Nano = "GPT-5 Nano",
GPT_5_4 = "GPT-5.4",
GPT_5_4_Pro = "GPT-5.4 Pro",
GPT_5_4_Mini = "GPT-5.4 Mini",
GPT_5_4_Nano = "GPT-5.4 Nano",
MistralLarge = "Mistral Large (latest)",
MistralMedium = "Mistral Medium (latest)",

View file

@ -260,23 +260,21 @@ export class VaultkeeperAISettingTab extends PluginSettingTab {
// OpenAI models
if (!providerFilter || providerFilter === AIProvider.OpenAI) {
const openaiGroup = select.createEl("optgroup", { attr: { label: Copy.ProviderOpenAI } });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_2_Instant, text: Copy.GPT_5_2_Instant });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_2_Thinking, text: Copy.GPT_5_2_Thinking });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_2_Pro, text: Copy.GPT_5_2_Pro });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_1, text: Copy.GPT_5_1 });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5, text: Copy.GPT_5 });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_Mini, text: Copy.GPT_5_Mini });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_Nano, text: Copy.GPT_5_Nano });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_4, text: Copy.GPT_5_4 });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_4_Pro, text: Copy.GPT_5_4_Pro });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_4_Mini, text: Copy.GPT_5_4_Mini });
openaiGroup.createEl("option", { value: AIProviderModel.GPT_5_4_Nano, text: Copy.GPT_5_4_Nano });
}
// Gemini models
if (!providerFilter || providerFilter === AIProvider.Gemini) {
const geminiGroup = select.createEl("optgroup", { attr: { label: Copy.ProviderGemini } });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiFlash_2_5_Lite, text: Copy.GeminiFlash_2_5_Lite });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiFlash_2_5, text: Copy.GeminiFlash_2_5 });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiPro_2_5, text: Copy.GeminiPro_2_5 });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiFlash_3_Preview, text: Copy.GeminiFlash_3_Preview });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiPro_3_1_Preview, text: Copy.GeminiPro_3_1_Preview });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiFlash_3_1_Preview_Lite, text: Copy.GeminiFlash_3_1_Preview_Lite });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiFlash_3_Preview, text: Copy.GeminiFlash_3_Preview });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiPro_2_5, text: Copy.GeminiPro_2_5 });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiFlash_2_5, text: Copy.GeminiFlash_2_5 });
geminiGroup.createEl("option", { value: AIProviderModel.GeminiFlash_2_5_Lite, text: Copy.GeminiFlash_2_5_Lite });
}
// Mistral models

View file

@ -19,7 +19,7 @@ describe('OpenAIConversationNamingService', () => {
// Mock SettingsService
mockSettingsService = {
settings: {
model: AIProviderModel.GPT_5_Nano,
model: AIProviderModel.GPT_5_4_Nano,
apiKeys: {
claude: 'test-claude-key',
openai: 'test-openai-key',

View file

@ -65,7 +65,7 @@ describe('SettingsService', () => {
it('should handle partially loaded settings and fill missing properties with defaults', () => {
const loadedSettings: Partial<IVaultkeeperAISettings> = {
model: AIProviderModel.GPT_5,
model: AIProviderModel.GPT_5_4,
apiKeys: {
claude: '',
openai: 'partial-key',
@ -76,7 +76,7 @@ describe('SettingsService', () => {
settingsService = new SettingsService(loadedSettings as IVaultkeeperAISettings);
expect(settingsService.settings.firstTimeStart).toBe(true); // Default
expect(settingsService.settings.model).toBe(AIProviderModel.GPT_5); // Loaded
expect(settingsService.settings.model).toBe(AIProviderModel.GPT_5_4); // Loaded
expect(settingsService.settings.apiKeys.openai).toBe('partial-key'); // Loaded
expect(settingsService.settings.exclusions).toEqual([]); // Default
expect(settingsService.settings.userInstruction).toBe(''); // Default
@ -159,8 +159,8 @@ describe('SettingsService', () => {
it('should return OpenAI key when current model is GPT', () => {
const loadedSettings: IVaultkeeperAISettings = {
firstTimeStart: false,
model: AIProviderModel.GPT_5_Mini,
planningModel: AIProviderModel.GPT_5,
model: AIProviderModel.GPT_5_4_Mini,
planningModel: AIProviderModel.GPT_5_4,
apiKeys: {
claude: 'claude-key',
openai: 'openai-key',
@ -223,7 +223,7 @@ describe('SettingsService', () => {
// Test with various GPT models
settingsService = new SettingsService({
model: AIProviderModel.GPT_5,
model: AIProviderModel.GPT_5_4,
apiKeys: { claude: '', openai: 'gpt5-key', gemini: '', mistral: '' }
});
expect(settingsService.getApiKeyForCurrentModel()).toBe('gpt5-key');
@ -380,10 +380,10 @@ describe('SettingsService', () => {
it('should correctly identify OpenAI models', () => {
const openaiModels = [
AIProviderModel.GPT_5_Nano,
AIProviderModel.GPT_5_Mini,
AIProviderModel.GPT_5,
AIProviderModel.GPT_5_Mini
AIProviderModel.GPT_5_4_Nano,
AIProviderModel.GPT_5_4_Mini,
AIProviderModel.GPT_5_4,
AIProviderModel.GPT_5_4_Mini
];
openaiModels.forEach(model => {

58
package-lock.json generated
View file

@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.87.0",
"@anthropic-ai/sdk": "^0.88.0",
"@google/genai": "^1.49.0",
"@shikijs/rehype": "^4.0.2",
"core-js": "^3.49.0",
@ -47,7 +47,7 @@
"@typescript-eslint/eslint-plugin": "8.58.1",
"@typescript-eslint/parser": "8.58.1",
"@vitest/ui": "^4.1.4",
"builtin-modules": "5.0.0",
"builtin-modules": "5.1.0",
"esbuild": "^0.28.0",
"esbuild-svelte": "^0.9.4",
"eslint": "^9.39.2",
@ -64,9 +64,9 @@
}
},
"node_modules/@anthropic-ai/sdk": {
"version": "0.87.0",
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.87.0.tgz",
"integrity": "sha512-ZvBWT5VkPTW6b8LIpugpuAkpcYPSLOXdWTcgQrpUqf4IeJ5ZrH5rT8sTsUDvxPCHAlRG3nF4VIWfjw6uLhJ18g==",
"version": "0.88.0",
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.88.0.tgz",
"integrity": "sha512-QQOtB5U9ZBJQj6y1ICmDZl14LWa4JCiJRoihI+0yuZ4OjbONrakP0yLwPv4DJFb3VYCtQM31bTOpCBMs2zghPw==",
"license": "MIT",
"dependencies": {
"json-schema-to-ts": "^3.1.1"
@ -680,9 +680,9 @@
"license": "MIT"
},
"node_modules/@eslint/config-array/node_modules/brace-expansion": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
"integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
"integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -761,9 +761,9 @@
"license": "MIT"
},
"node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
"integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
"integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -3019,9 +3019,9 @@
"license": "MIT"
},
"node_modules/builtin-modules": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.0.0.tgz",
"integrity": "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.1.0.tgz",
"integrity": "sha512-c5JxaDrzwRjq3WyJkI1AGR5xy6Gr6udlt7sQPbl09+3ckB+Zo2qqQ2KhCTBr7Q8dHB43bENGYEk4xddrFH/b7A==",
"dev": true,
"license": "MIT",
"engines": {
@ -4173,9 +4173,9 @@
"license": "MIT"
},
"node_modules/eslint-plugin-import/node_modules/brace-expansion": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
"integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
"integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -4270,9 +4270,9 @@
"license": "MIT"
},
"node_modules/eslint-plugin-json-schema-validator/node_modules/brace-expansion": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz",
"integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
"integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -4336,9 +4336,9 @@
"license": "MIT"
},
"node_modules/eslint-plugin-n/node_modules/brace-expansion": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz",
"integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
"integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -4504,9 +4504,9 @@
"license": "MIT"
},
"node_modules/eslint-plugin-react/node_modules/brace-expansion": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
"integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
"integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -4585,9 +4585,9 @@
"license": "MIT"
},
"node_modules/eslint/node_modules/brace-expansion": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
"integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
"integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
"dev": true,
"license": "MIT",
"dependencies": {

View file

@ -28,7 +28,7 @@
"@typescript-eslint/eslint-plugin": "8.58.1",
"@typescript-eslint/parser": "8.58.1",
"@vitest/ui": "^4.1.4",
"builtin-modules": "5.0.0",
"builtin-modules": "5.1.0",
"esbuild": "^0.28.0",
"esbuild-svelte": "^0.9.4",
"eslint": "^9.39.2",
@ -44,7 +44,7 @@
"vitest": "^4.1.4"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.87.0",
"@anthropic-ai/sdk": "^0.88.0",
"@google/genai": "^1.49.0",
"@shikijs/rehype": "^4.0.2",
"core-js": "^3.49.0",