fix(providers): surface a connected Ollama's pulled models in the picker - #387
Open
aniketshukla1 wants to merge 1 commit into
Open
fix(providers): surface a connected Ollama's pulled models in the picker#387aniketshukla1 wants to merge 1 commit into
aniketshukla1 wants to merge 1 commit into
Conversation
The composer's model picker comes from get_settings()["models"], which lists the curated matrix plus user-added ids. Ollama has no matrix entries — its models are whatever the user pulled locally — and the live /api/tags list was only used for the provider's "suggested models" hint, never merged into the picker. So a user who connects Ollama and has models pulled sees nothing selectable and cannot run any Ollama model. Merge the live _ollama_models() list into the selectable set in get_settings when the cached liveness probe reports Ollama is up, de-duplicated against curated / user-added ids. Adds regression tests: live models appear, are hidden when the server is down, and are not duplicated when the user has also added one by hand.
Author
|
@andrewyng any news on this one ? Can we merge this ? |
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.
Closes #386
The composer's model picker comes from get_settings()["models"], which lists the curated matrix plus user-added ids. Ollama has no matrix entries — its models are whatever the user pulled locally — and the live /api/tags list was only used for the provider's "suggested models" hint, never merged into the picker. So a user who connects Ollama and has models pulled sees nothing selectable and cannot run any Ollama model.
Merge the live _ollama_models() list into the selectable set in get_settings when the cached liveness probe reports Ollama is up, de-duplicated against curated / user-added ids.
Adds regression tests: live models appear, are hidden when the server is down, and are not duplicated when the user has also added one by hand.