feat: implement dynamic model detection support for inference providers using litellm#2886
Merged
ashwinb merged 1 commit intollamastack:mainfrom Jul 28, 2025
Merged
Conversation
This was referenced Jul 24, 2025
ashwinb
requested changes
Jul 24, 2025
| api_key_from_config: str | None, | ||
| provider_data_api_key_field: str, | ||
| openai_compat_api_base: str | None = None, | ||
| litellm_provider_name: str | None = None, |
Contributor
There was a problem hiding this comment.
can we make this required?
Collaborator
Author
There was a problem hiding this comment.
we can. if i make it required right now it'll step on other related changes in flight by new developers.
ok to file a follow up issue to make it required?
Contributor
There was a problem hiding this comment.
I think that is fine because in my opinion check_model_availability cannot be half-assed and say "I can't do my job because you did not provide me with very important information earlier". I also do need this in my own work. Let's make this required.
Collaborator
Author
Contributor
Collaborator
Author
b83c24a to
3272221
Compare
…rs using litellm This enhancement allows inference providers using LiteLLMOpenAIMixin to validate model availability against LiteLLM's official provider model listings, improving reliability and user experience when working with different AI service providers. - Add litellm_provider_name parameter to LiteLLMOpenAIMixin constructor - Add check_model_availability method to LiteLLMOpenAIMixin using litellm.models_by_provider - Update Anthropic, OpenAI, Llama, Gemini, Groq, and SambaNova inference adapters to pass litellm_provider_name
3272221 to
923c08c
Compare
eranco74
added a commit
to eranco74/assisted-chat
that referenced
this pull request
Jul 30, 2025
- Specify the default model and provider in the LSC config This is required because following llamastack/llama-stack#2886 llama-stack discover the models dynamically, if we don't pass a provider and model it falls back to the firt model it finds (regadless of what we have in the llama-stack config.yaml) Note that it's also listing vertexAI models (which work with the vertexAI API)! Signed-off-by: Eran Cohen <eranco@redhat.com>
eranco74
added a commit
to eranco74/assisted-chat
that referenced
this pull request
Jul 30, 2025
Specify the default model and provider in the LSC config This is required because following llamastack/llama-stack#2886 llama-stack discovers the models dynamically, if we don't pass a provider and model, it falls back to the first model it finds (regardless of what we have in the llama-stack config.yaml) Note that it's also listing vertexAI models (which work with the vertexAI API)! Signed-off-by: Eran Cohen <eranco@redhat.com>
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.

What does this PR do?
This enhancement allows inference providers using LiteLLMOpenAIMixin to validate model availability against LiteLLM's official provider model listings, improving reliability and user experience when working with different AI service providers.
Test Plan
standard CI.