fix(embed): use config.models.embed from index.yml when set#625
Open
fix(embed): use config.models.embed from index.yml when set#625
Conversation
qmd embed was hardcoding DEFAULT_EMBED_MODEL_URI instead of reading the embed model from index.yml config. This meant custom embedding models configured via models.embed in index.yml were silently ignored during qmd embed runs. Fix: load config in the embed case and prefer config.models.embed over the default when set. Fixes: users configuring custom embedding models via index.yml seeing embeddinggemma used instead of their configured model.
qmd status was always displaying DEFAULT_EMBED_MODEL_URI regardless of what model was configured in index.yml. This was misleading for users who had configured custom models. Fix: read config in showStatus() and display the active configured models, falling back to defaults when not set.
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.
Problem
qmd embedhardcodesDEFAULT_EMBED_MODEL_URIinstead of readingthe configured embed model from
index.yml. This means users whoconfigure a custom embedding model via
models.embedinindex.ymlsee it silently ignored — embeddinggemma is always used regardless.
Fix
Load config in the
embedcase and preferconfig.models.embedover the default when set, falling back gracefully if config
can't be loaded.
Testing
Configured a local BGE-M3 GGUF in
index.yml:Before fix:
qmd embedused embeddinggemma regardless.After fix:
qmd embedcorrectly uses the configured model.Also fixes
qmd statuswas hardcodingDEFAULT_EMBED_MODEL_URIin the Modelssection regardless of what was configured in
index.yml. Status nowshows the actual active model from config, falling back to defaults
when not set.