feat(embedding): add ByteDance and Qwen embedding providers#7
Merged
Conversation
- ByteDance: uses Volcengine ArkRuntime SDK (CreateEmbeddings), supports api_key/base_url/region config, default model doubao-embedding-large - Qwen: wraps OpenAI embedder with DashScope compatible endpoint, default model text-embedding-v4 Made-with: Cursor
The standard /embeddings endpoint does not work with vision models like doubao-embedding-vision-251215. Auto-detect vision models by name and route to CreateMultiModalEmbeddings (/embeddings/multimodal). EmbedBatch falls back to sequential calls since the multimodal endpoint merges all inputs into a single vector. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CreateEmbeddings), supportingapi_key/base_url/regionconfig, default modeldoubao-embedding-largehttps://dashscope.aliyuncs.com/compatible-mode/v1), default modeltext-embedding-v4doc.goand integration test imports to include new providersTest plan
go build ./embedding/...passesgo vet ./embedding/...passesEMBEDDING_PROVIDER=bytedance(requires model activation in Volcengine console)EMBEDDING_PROVIDER=qwenMade with Cursor