Skip to content

fix: volcanic engine embedding endpoint (ep-xxx-xx) not working with multimodal API#6135

Open
hanliang97 wants to merge 1 commit into
1Panel-dev:v2from
hanliang97:fix/volcanic-embedding-ep-endpoint
Open

fix: volcanic engine embedding endpoint (ep-xxx-xx) not working with multimodal API#6135
hanliang97 wants to merge 1 commit into
1Panel-dev:v2from
hanliang97:fix/volcanic-embedding-ep-endpoint

Conversation

@hanliang97
Copy link
Copy Markdown

Problem\n\nVolcanic engine embedding models with `ep-xxx-xx` endpoint IDs fail with "list index out of range" error during credential verification. Only `doubao-xxx` model names worked correctly.\n\n## Root Cause\n\nTwo issues:\n\n1. The code only routed `doubao-embedding-vision-` prefixed models to the multimodal embeddings API (`/embeddings/multimodal`), while `ep-xxx-xx` endpoint models fell through to the standard embeddings API (`/embeddings`) which doesn't support multimodal endpoints.\n\n2. The multimodal embeddings API returns `resp.data` as a single `MultimodalEmbedding` object with an `.embedding` attribute, not a list. The extraction logic was incorrectly treating it as a list.\n\n## Fix\n\n- Unify all volcanic engine embedding calls to use `multimodal_embeddings.create()` API (compatible with both pure text and multimodal inputs)\n- Fix `_extract_embedding` to check `hasattr(data, 'embedding')` first, correctly handling single MultimodalEmbedding objects\n- Both `ep-xxx-xx` endpoint IDs and `doubao-xxx` model names now work correctly\n\n## Testing\n\nTested with endpoint `ep-20260527164729-5mshx` (doubao-embedding-vision based) - credential verification and embedding generation both pass.

@hanliang97
Copy link
Copy Markdown
Author

为了解决 火山向量模型 sp-xxx-xxx无法添加问题

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant