Skip to content

feat(embed-many): respect supportsParallelCalls & concurrency#6108

Merged
samdenty merged 11 commits intov5from
v5-supportsParallel
May 2, 2025
Merged

feat(embed-many): respect supportsParallelCalls & concurrency#6108
samdenty merged 11 commits intov5from
v5-supportsParallel

Conversation

@samdenty
Copy link
Contributor

@samdenty samdenty commented May 2, 2025

Background

We didn't actually read the supportsParallelCalls field at all, and we did everything serially in embedding model

Summary

This makes the embedding model actually respect supportsParallel calls

Verification

Tasks

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)

Future Work

Related Issues

@samdenty samdenty changed the base branch from main to v5 May 2, 2025 09:56
@samdenty samdenty changed the title V5 supports parallel fix(embedding-model): respect supportsParallelCalls May 2, 2025
@samdenty samdenty changed the title fix(embedding-model): respect supportsParallelCalls feat(embedding-model): respect supportsParallelCalls & concurrency May 2, 2025
@samdenty samdenty changed the title feat(embedding-model): respect supportsParallelCalls & concurrency feat(embed-many): respect supportsParallelCalls & concurrency May 2, 2025
@samdenty samdenty merged commit a8c8bd5 into v5 May 2, 2025
8 checks passed
@samdenty samdenty deleted the v5-supportsParallel branch May 2, 2025 15:16
Comment on lines -89 to -95
it('should handle multiple input values and extract usage', async () => {
const { usage } = await model.doEmbed({
values: testValues,
});

expect(usage?.tokens).toStrictEqual(16);
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this test removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed because we now throw an error 👍
image

samdenty added a commit that referenced this pull request May 5, 2025
* origin/v5: (23 commits)
  chore (ai): remove StreamData and mergeStreams (#6150)
  chore (build): fix typecheck setup (#6151)
  chore (ai): remove IdGenerator duplication (#6147)
  chore (ai): remove content from ui messages (#6145)
  Version Packages (canary) (#6115)
  feat (provider): support reasoning tokens, cached input tokens, total token in usage information (#6140)
  test (ai): use `mock-provider` instead of `openai` to match used `MockImageModelV2` (#6132)
  fix(providers): always use optional instead of mix of nullish for providerOptions (#6122)
  chore (ai): remove sendExtraMessageFields (#6120)
  chore(provider-utils): move ToolResultContent to provider-utils (#6121)
  feat(embed-many): respect supportsParallelCalls & concurrency (#6108)
  chore (provider-utils): return IdGenerator interface (#6118)
  chore (provider): improve jsdoc comments (#6117)
  chore (ai): remove outdated typecasts (#6116)
  chore (ai): remove useChat keepLastMessageOnError (#6114)
  fix(providers/openai): logprobs for stream alongside completion model (#6091)
  chore (ai): move maxSteps into UseChatOptions (#6113)
  docs (ai): add notes on schema .optional() (#6111)
  chore: update references to use ai-sdk.dev (#6076) (#6107)
  Version Packages (canary) (#6069)
  ...
iteratetograceness pushed a commit to iteratetograceness/ai that referenced this pull request May 9, 2025
…#6108)

## Background

We didn't actually read the supportsParallelCalls field at all, and we
did everything serially in embedding model

## Summary

This makes the embedding model actually respect supportsParallel calls

Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
@gr2m gr2m added ai/provider provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider labels Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants