Skip to content

reproduction: Google embedMany fails above 100 values when per-value - #21096

Draft
ai-sdk-factory[bot] wants to merge 1 commit into
mainfrom
bug-reproduction-21095-20260918082827184265
Draft

ai-sdk-factory[bot] wants to merge 1 commit into
mainfrom
bug-reproduction-21095-20260918082827184265

Conversation

@ai-sdk-factory

Copy link
Copy Markdown
Contributor

Bug

Google embedMany fails above 100 values when per-value content is provided

Reproduction

  • The checked-out main commit and reported package versions match exactly: ai@7.0.106, @ai-sdk/google@4.0.75, and @ai-sdk/provider-utils@5.0.44; the reported Zod version satisfies their peer ranges.
  • Added examples/ai-functions/src/reproduction/google-embed-many-content-batching.ts, covering 101 values with matching mixed null and per-value content entries.
  • The reproduction expected all 101 embeddings in value/content index order, but observed rejection before any HTTP request: matching 101-entry content was compared with the first 100-value batch.
  • packages/ai/src/embed/embed-many.ts slices values into provider-sized chunks while forwarding the unchanged providerOptions; packages/google/src/google-embedding-model.ts consequently rejects the unsliced content array.
  • Controls confirmed that 100 values with content succeed, 101 text-only values batch successfully, and genuinely mismatched content remains rejected.

Relevant Documentation

Related Issues

Reproduces #21095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant