{"record":{"id":"9bcbe762cd73c5e8","repo":"vercel/ai","slug":"the-number-of-multimodal-content-entries-multim","errorCode":null,"errorMessage":"The number of multimodal content entries (${multimodalContent.length}) must match the number of values (${values.length}).","messagePattern":"The number of multimodal content entries \\((.+?)\\) must match the number of values \\((.+?)\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/google/src/google-embedding-model.ts","lineNumber":96,"sourceCode":"        provider: this.provider,\n        modelId: this.modelId,\n        maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n        values,\n      });\n    }\n\n    const mergedHeaders = combineHeaders(\n      this.config.headers ? await resolve(this.config.headers) : undefined,\n      headers,\n    );\n\n    const multimodalContent = googleOptions?.content;\n\n    if (\n      multimodalContent != null &&\n      multimodalContent.length !== values.length\n    ) {\n      throw new Error(\n        `The number of multimodal content entries (${multimodalContent.length}) must match the number of values (${values.length}).`,\n      );\n    }\n\n    // For single embeddings, use the single endpoint\n    if (values.length === 1) {\n      const valueParts = multimodalContent?.[0];\n      const textPart = values[0] ? [{ text: values[0] }] : [];\n      const parts =\n        valueParts != null\n          ? [...textPart, ...valueParts]\n          : [{ text: values[0] }];\n\n      const {\n        responseHeaders,\n        value: response,\n        rawValue,\n      } = await postJsonToApi({","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/google/src/google-embedding-model.ts#L78-L114","documentation":"Error \"The number of multimodal content entries (${multimodalContent.length}) must match the number of values (${values.length}).\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/google/src/google-embedding-model.ts:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}