Remove vertexai_service_account_json from oai_settings. And google.js.
| @@ -237,7 +237,6 @@ const sensitiveFields = [ | ||
| 237 | 237 | 'custom_include_headers', |
| 238 | 238 | 'vertexai_project_id', |
| 239 | 239 | 'vertexai_region', |
| 240 | - 'vertexai_service_account_json', | |
| 241 | 240 | ]; |
| 242 | 241 | |
| 243 | 242 | /** |
| @@ -312,7 +311,6 @@ export const settingsToUpdate = { | ||
| 312 | 311 | vertexai_auth_mode: ['#vertexai_auth_mode', 'vertexai_auth_mode', false, true], |
| 313 | 312 | vertexai_project_id: ['#vertexai_project_id', 'vertexai_project_id', false, true], |
| 314 | 313 | vertexai_region: ['#vertexai_region', 'vertexai_region', false, true], |
| 315 | - vertexai_service_account_json: ['#vertexai_service_account_json', 'vertexai_service_account_json', false, true], | |
| 316 | 314 | use_alt_scale: ['#use_alt_scale', 'use_alt_scale', true, true], |
| 317 | 315 | squash_system_messages: ['#squash_system_messages', 'squash_system_messages', true, false], |
| 318 | 316 | image_inlining: ['#openai_image_inlining', 'image_inlining', true, false], |
| @@ -397,7 +395,6 @@ const default_settings = { | ||
| 397 | 395 | vertexai_auth_mode: 'express', |
| 398 | 396 | vertexai_project_id: '', |
| 399 | 397 | vertexai_region: 'us-central1', |
| 400 | - vertexai_service_account_json: '', | |
| 401 | 398 | use_alt_scale: false, |
| 402 | 399 | squash_system_messages: false, |
| 403 | 400 | image_inlining: false, |
| @@ -485,7 +482,6 @@ const oai_settings = { | ||
| 485 | 482 | vertexai_auth_mode: 'express', |
| 486 | 483 | vertexai_project_id: '', |
| 487 | 484 | vertexai_region: 'us-central1', |
| 488 | - vertexai_service_account_json: '', | |
| 489 | 485 | use_alt_scale: false, |
| 490 | 486 | squash_system_messages: false, |
| 491 | 487 | image_inlining: false, |
| @@ -3836,7 +3832,6 @@ async function saveOpenAIPreset(name, settings, triggerUi = true) { | ||
| 3836 | 3832 | vertexai_auth_mode: settings.vertexai_auth_mode, |
| 3837 | 3833 | vertexai_project_id: settings.vertexai_project_id, |
| 3838 | 3834 | vertexai_region: settings.vertexai_region, |
| 3839 | - vertexai_service_account_json: settings.vertexai_service_account_json, | |
| 3840 | 3835 | use_alt_scale: settings.use_alt_scale, |
| 3841 | 3836 | squash_system_messages: settings.squash_system_messages, |
| 3842 | 3837 | image_inlining: settings.image_inlining, |
| @@ -5586,10 +5581,6 @@ async function onVertexAIValidateServiceAccount() { | ||
| 5586 | 5581 | // Save to backend secret storage |
| 5587 | 5582 | await writeSecret(SECRET_KEYS.VERTEXAI_SERVICE_ACCOUNT, jsonContent); |
| 5588 | 5583 | |
| 5589 | - // Clear the textarea and update settings | |
| 5590 | - $('#vertexai_service_account_json').val(''); | |
| 5591 | - oai_settings.vertexai_service_account_json = ''; | |
| 5592 | - | |
| 5593 | 5584 | // Show success status |
| 5594 | 5585 | updateVertexAIServiceAccountStatus(true, `Project: ${serviceAccount.project_id}, Email: ${serviceAccount.client_email}`); |
| 5595 | 5586 | |
| @@ -5607,7 +5598,6 @@ async function onVertexAIValidateServiceAccount() { | ||
| 5607 | 5598 | */ |
| 5608 | 5599 | async function onVertexAIClearServiceAccount() { |
| 5609 | 5600 | $('#vertexai_service_account_json').val(''); |
| 5610 | - oai_settings.vertexai_service_account_json = ''; | |
| 5611 | 5601 | |
| 5612 | 5602 | // Clear from backend secret storage |
| 5613 | 5603 | await writeSecret(SECRET_KEYS.VERTEXAI_SERVICE_ACCOUNT, ''); |
| @@ -5622,8 +5612,6 @@ async function onVertexAIClearServiceAccount() { | ||
| 5622 | 5612 | */ |
| 5623 | 5613 | function onVertexAIServiceAccountJsonChange() { |
| 5624 | 5614 | const jsonContent = String($(this).val()).trim(); |
| 5625 | - // Don't save to settings automatically - only save when validated | |
| 5626 | - // oai_settings.vertexai_service_account_json = jsonContent; | |
| 5627 | 5615 | |
| 5628 | 5616 | if (jsonContent) { |
| 5629 | 5617 | // Auto-validate when content is pasted |
| @@ -31,13 +31,8 @@ export async function getVertexAIAuth(request) { | ||
| 31 | 31 | } |
| 32 | 32 | throw new Error('API key is required for Vertex AI Express mode'); |
| 33 | 33 | } else if (authMode === 'full') { |
| 34 | 34 | // Try to getGet service account JSON from backend storage first |
| 35 | 35 | letconst serviceAccountJson = readSecret(request.user.directories, SECRET_KEYS.VERTEXAI_SERVICE_ACCOUNT); |
| 36 | - | |
| 37 | - // If not found in backend storage, try from request body (for backward compatibility) | |
| 38 | - if (!serviceAccountJson) { | |
| 39 | - serviceAccountJson = request.body.vertexai_service_account_json; | |
| 40 | - } | |
| 41 | 36 | |
| 42 | 37 | if (serviceAccountJson) { |
| 43 | 38 | try { |