{"record":{"id":"0bf802100a0806cc","repo":"CherryHQ/cherry-studio","slug":"vertex-ai-model-listing-failed-reason","errorCode":null,"errorMessage":"Vertex AI model listing failed: ${reason}","messagePattern":"Vertex AI model listing failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ai/provider/listModels/vertex.ts","lineNumber":66,"sourceCode":"  /^gemini[\\w.@-]*$/i,\n  /^learnlm[\\w.@-]*$/i,\n  /^gemma[\\w.@-]*$/i,\n  /^(?:text(?:-multilingual)?-embedding|gemini-embedding|multimodalembedding|textembedding-gecko(?:-multilingual)?|embedding-gecko(?:-multilingual)?)[\\w.@-]*$/i,\n  /^deepseek[\\w.@-]*$/i,\n  /^kimi[\\w.@-]*$/i,\n  /^glm[\\w.@-]*$/i,\n  /^gpt[\\w.@-]*$/i,\n  /^llama[\\w.@-]*$/i,\n  /^qwen[\\w.@-]*$/i\n] as const\n\nexport async function createVertexModelListRequest(\n  provider: Provider,\n  options?: { throwOnError?: boolean }\n): Promise<VertexModelListRequest | undefined> {\n  const failOrSkip = (reason: string, context: Record<string, unknown>): undefined => {\n    if (options?.throwOnError) {\n      throw new Error(`Vertex AI model listing failed: ${reason}`)\n    }\n    logger.warn(`Vertex AI model listing skipped — ${reason}`, context)\n    return undefined\n  }\n\n  const authConfig = providerService.getAuthConfig(provider.id)\n  if (authConfig?.type !== 'iam-gcp') {\n    return failOrSkip('provider is not configured with iam-gcp auth', {\n      providerId: provider.id,\n      authType: authConfig?.type\n    })\n  }\n\n  const { project, location, credentials } = authConfig\n  const { privateKey, clientEmail } = normalizeVertexCredentials(credentials)\n\n  const missing: string[] = []\n  if (!project) missing.push('project')","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/CherryHQ/cherry-studio/blob/726446b54cd69ffe51a276638672f6d95ca0768c/src/main/ai/provider/listModels/vertex.ts#L48-L84","documentation":"Error \"Vertex AI model listing failed: ${reason}\" thrown in CherryHQ/cherry-studio.","triggerScenarios":"createVertexModelListRequest cannot build a valid model-list request for a Vertex provider and options.throwOnError is set — e.g. the provider is not configured with iam-gcp auth.","commonSituations":"Raised when the Vertex provider lacks iam-gcp auth configuration or another prerequisite for building the listing request. Without throwOnError the same condition is logged and the listing is skipped instead.","solutions":["Read the reason included in the message to identify the specific Vertex AI listing failure.","Verify credentials, project id, and location configuration for the Vertex AI provider.","Check that the Vertex AI API is enabled and the account has model listing permissions, then retry."],"exampleFix":"Correct the provider config: set the proper projectId and location, and re-run the model list refresh.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"726446b54cd69ffe51a276638672f6d95ca0768c","analyzedAt":"2026-08-12T17:30:37.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}