Repository navigation
fix(cohere): expose custom and embed-v4.0 text embedding models - #3769
Merged
crazywoola merged 2 commits intoSep 3, 2026
Merged
crazywoola merged 2 commits into
crazywoola merged 2 commits into
Conversation
Add embed-v4.0 as a predefined model and implement get_customizable_model_schema for Cohere text embeddings so custom model credentials appear in Knowledge Base pickers. Fixes langgenius/dify#41422
crazywoola
approved these changes
Aug 31, 2026
crazywoola
had a problem deploying
to
models/cohere
August 31, 2026 02:55 — with
GitHub Actions
Failure
crazywoola
approved these changes
Sep 3, 2026
This branch was successfully deployed
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.
Fixes langgenius/dify#41422
Summary
Custom Cohere text-embedding models (e.g.
embed-v4.0) could be configured in Model Provider settings but were silently omitted from Knowledge Base embedding pickers.embed-v4.0as a predefined text-embedding modelget_customizable_model_schema()onCohereTextEmbeddingModelso user-added custom embedding model names synthesize a schema instead of being skipped0.0.18Root cause
Dify's provider configuration layer skips custom models when
get_model_schema()returnsNone. The Cohere LLM class already implementedget_customizable_model_schema(), but the text-embedding class did not.Release Notes
embed-v4.0as a predefined text embedding modelTest plan
uv run --with pytest pytest models/cohere/tests/test_text_embedding_custom_schema.py