Skip to content

Comments

feat(cohere): add support for embeddingTypes in cohere embeddings#11934

Open
0xlakshan wants to merge 6 commits intovercel:mainfrom
0xlakshan:feat/cohere-embedding-type
Open

feat(cohere): add support for embeddingTypes in cohere embeddings#11934
0xlakshan wants to merge 6 commits intovercel:mainfrom
0xlakshan:feat/cohere-embedding-type

Conversation

@0xlakshan
Copy link
Contributor

@0xlakshan 0xlakshan commented Jan 21, 2026

Background

This PR exposes an embeddingTypes option so users can request embedding types like int8, uint8, binary, ubinary, and base64, matching what the Cohere API actually supports. #11272

This makes the provider more flexible and better aligned with Cohere’s API.

Cohere docs - https://docs.cohere.com/reference/embed

Summary

  • Made the embeddingTypes option configurable

Manual Verification

Checklist

  • 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)
  • I have reviewed this pull request (self-review)

Future Work

Related Issues

#11272

@vercel-ai-sdk vercel-ai-sdk bot added ai/provider feature New feature or request provider/cohere Issues related to the @ai-sdk/cohere provider labels Jan 21, 2026
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

Code accepts multiple embedding types but always returns float embeddings, failing when non-float types are requested

Fix on Vercel

0xlakshan and others added 2 commits January 22, 2026 00:54
Typo

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Typo

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
@aayush-kapoor aayush-kapoor added this to the v7.0 milestone Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider feature New feature or request provider/cohere Issues related to the @ai-sdk/cohere provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants