{"record":{"id":"fd8531b9ad777663","repo":"continuedev/continue","slug":"failed-to-parse-config-json-e","errorCode":null,"errorMessage":"Failed to parse config.json: ${e}","messagePattern":"Failed to parse config\\.json: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/config/load.ts","lineNumber":124,"sourceCode":"    return a.name === b.name && a.params?.url === b.params?.url;\n  },\n  slashCommands: (a: any, b: any) => a.name === b.name,\n  customCommands: (a: any, b: any) => a.name === b.name,\n};\n\nfunction loadSerializedConfig(\n  workspaceConfigs: ContinueRcJson[],\n  ideSettings: IdeSettings,\n  ideType: IdeType,\n  overrideConfigJson: SerializedContinueConfig | undefined,\n  ide: IDE,\n): ConfigResult<SerializedContinueConfig> {\n  let config: SerializedContinueConfig = overrideConfigJson!;\n  if (!config) {\n    try {\n      config = resolveSerializedConfig(getConfigJsonPath());\n    } catch (e) {\n      throw new Error(`Failed to parse config.json: ${e}`);\n    }\n  }\n\n  const errors = validateConfig(config);\n\n  if (errors?.some((error) => error.fatal)) {\n    return {\n      errors,\n      config: undefined,\n      configLoadInterrupted: true,\n    };\n  }\n\n  if (config.allowAnonymousTelemetry === undefined) {\n    config.allowAnonymousTelemetry = true;\n  }\n\n  if (ideSettings.remoteConfigServerUrl) {","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/config/load.ts#L106-L142","documentation":"Vertex AI express mode (API key auth) only supports Gemini endpoints; the adapter detects this combination during non-streaming chat and rejects it before making a request. Anthropic-on-Vertex and Mistral-on-Vertex require service-account OAuth.","triggerScenarios":"config.apiKey is set AND body.model resolves to a non-gemini provider (claude-* or mistral model) in chatCompletionNonStream.","commonSituations":"Developer reuses an OpenAI-style API key config then switches the model to claude-3-5-sonnet or codestral; or assumes the Vertex API key authenticates all publisher models.","solutions":["Switch to service-account auth: remove apiKey and set keyJson/keyFile (or ADC) for non-gemini models","Or keep a gemini-* model when using express apiKey mode","Configure separate adapter instances per auth mode if you need both"],"exampleFix":"// before\nnew VertexAIApi({ apiKey: process.env.VERTEX_API_KEY, ... });\nawait api.chatCompletionNonStream({ model: 'claude-3-5-sonnet@...', ... }, signal);\n\n// after\nnew VertexAIApi({ keyJson: SA_JSON, ... });\nawait api.chatCompletionNonStream({ model: 'claude-3-5-sonnet@...', ... }, signal);","handlingStrategy":"validation","validationCode":"const expressOk = (model: string, hasApiKey: boolean) => !hasApiKey || /gemini/i.test(model);","typeGuard":"const isGeminiModel = (m: string): boolean => /gemini/i.test(m);","tryCatchPattern":"try { ... } catch (e) { if ((e as Error).message.includes('express (apiKey) mode')) { /* switch to service-account auth or a gemini model */ } throw e; }","preventionTips":["Map auth mode to model family up front in config","Keep two adapter instances: one express/gemini, one OAuth/anthropic-mistral"],"tags":["vertexai","api-key","express-mode","model-config"],"backgroundTag":"auth-mode-unsupported-for-model","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}