{"record":{"id":"334a8ebd7b96340a","repo":"vercel/ai","slug":"too-many-embedding-values-for-a-single-call-model","errorCode":null,"errorMessage":"Too many embedding values for a single call. Model \"${modelId}\" can only embed up to ${maxEmbeddingsPerCall} values per call.","messagePattern":"Too many embedding values for a single call\\. Model \"(.+?)\" can only embed up to (.+?) values per call\\.","errorType":"validation","errorClass":"TooManyEmbeddingValuesForCallError","httpStatus":null,"severity":"error","filePath":"packages/google-vertex/src/google-vertex-embedding-model.ts","lineNumber":95,"sourceCode":"      googleOptions = await parseProviderOptions({\n        provider: 'vertex',\n        providerOptions,\n        schema: googleVertexEmbeddingModelOptions,\n      });\n    }\n\n    if (googleOptions == null) {\n      googleOptions = await parseProviderOptions({\n        provider: 'google',\n        providerOptions,\n        schema: googleVertexEmbeddingModelOptions,\n      });\n    }\n\n    googleOptions = googleOptions ?? {};\n\n    if (values.length > this.maxEmbeddingsPerCall) {\n      throw new TooManyEmbeddingValuesForCallError({\n        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    if (usesEmbedContentEndpoint(this.modelId)) {\n      const {\n        responseHeaders,\n        value: response,\n        rawValue,\n      } = await postJsonToApi({","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/google-vertex/src/google-vertex-embedding-model.ts#L77-L113","documentation":"Error \"Too many embedding values for a single call. Model \"${modelId}\" can only embed up to ${maxEmbeddingsPerCall} values per call.\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/google-vertex/src/google-vertex-embedding-model.ts:95 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"}