fix: Google Vertex embedMany sends oversized text-embedding batches (#19960)
## Background Google Vertex embedding consumers could receive HTTP 400 responses because embedMany sent 251 texts in a single :predict request instead of respecting Vertex's 250-text limit. ## Root Cause GoogleVertexEmbeddingModel hardcoded maxEmbeddingsPerCall as 2048 for :predict models. The reproduction confirmed this caused one 251-item request, while focused tests confirmed :embedContent models correctly require single-item calls. ## Summary Changed the advertised :predict embedding limit to 250, retained the :embedContent limit of 1, removed reproduction-only artifacts, and added a patch changeset. ## Testing Added regression coverage for the 250-value :predict limit, both single-value :embedContent model variants, and rejection at 251 values. ## End-to-end Validation - `replay_original_reproduction` (`pnpm -C examples/ai-functions exec tsx src/reproduction/google-vertex-embedding-batch-limit.ts`): exited successfully without the original oversized-request signal. - Live Vertex embedMany command: blocked before making a request because `GOOGLE_VERTEX_LOCATION` was unavailable; no successful live validation is claimed. ## Related Issues Fixes #19952 Closes #19957 --------- Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: n1ckoates <58091943+n1ckoates@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
1d9b13b4a3afca9f16cd4be86ca2a59bde1f9ac2
Parent: d2507af
Committed by GitHub <noreply@github.com>
on 8/28/2026, 9:26:34 PM